aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* IB: fix generating .profile.mk for profiles without metadataDaniel Golle2019-03-271-1/+1
| | | | | | Fixes d6fa04a437 ("IB: include SUPPORTED_DEVICES in 'make info' output") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* wireguard: do not add host-dependencies if fwmark is setDaniel Golle2019-03-271-6/+8
| | | | | | | | | | The 'fwmark' option is used to define routing traffic to wireguard endpoints to go through specific routing tables. In that case it doesn't make sense to setup routes for host-dependencies in the 'main' table, so skip setting host dependencies if 'fwmark' is set. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* odhcpd: update to latest git HEAD (FS#2204)Hans Dedecker2019-03-271-3/+3
| | | | | | 420945c netlink: fix IPv6 address updates (FS#2204) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* kernel: fix missing dependency in 4.14.108Koen Vandeputte2019-03-271-1/+1
| | | | | | | | | | | | The 4.14.108 bump introduced a missing dependency when building specific netfilters. Thsi was not seen as the error does not occur on all targets. Thanks to Jo-Philipp Wich for providing the fix Fixes: af6c86dbe56e ("kernel: bump 4.14 to 4.14.108") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* mt76: update to the latest versionFelix Fietkau2019-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f2a18f5 mt76x02: introduce mt76x02_beacon.c 91ade88 mt76x02: add hrtimer for pre TBTT for USB 6370485 mt76x02: introduce beacon_ops 37af803 mt76x02u: implement beacon_ops 41d6190 mt76x02: generalize some mmio beaconing functions dcccc04 mt76x02u: add sta_ps 5ac5289 mt76x02: disable HW encryption for group frames e284cc2 mt76x02u: implement pre TBTT work for USB 77e56b8 mt76x02: make beacon slots bigger for USB d4c740f mt76x02u: add mt76_release_buffered_frames 65e6344 mt76: unify set_tim f720e49 mt76x02: enable AP mode for USB cf1838d mt76usb: change mt76u_submit_buf 16b2ccf mt76: remove rx_page_lock e1bfbeb mt76usb: change mt76u_fill_rx_sg arguments e9c0171 mt76usb: use usb_dev private data a4eb5db mt76usb: remove mt76u_buf redundant fileds 3f9b68d mt76usb: move mt76u_buf->done to queue entry 4a366bd mt76usb: remove mt76u_buf and use urb directly 0904bc4 mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_alloc 42f2899 mt76usb: resue mt76u_urb_alloc for tx 4d4d73a mt76usb: remove unneded sg_init_table 57309c7 mt76usb: allocate urb and sg as linear data 2e89721 mt76usb: remove queue variable from rx_tasklet 30a256a mt76x02: remove extra_tx_headroom (obsoleted by mac8211 skb aligning) ae166b0 Revert "mt76: mt7603: store software PN/IV in wcid" bf6e72d Revert "mt76: mt76x02: store software PN/IV in wcid" a11b673 mt76: fix tx power issues Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: bump 4.14 to 4.14.108Koen Vandeputte2019-03-2710-25/+26
| | | | | | | | | | | | Refreshed all patches. Altered patches: - 950-0033-i2c-bcm2835-Add-debug-support.patch Compile-tested on: ar71xx, cns3xxx, imx6, x86_64 Runtime-tested on: ar71xx, cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.9 to 4.9.165Koen Vandeputte2019-03-272-3/+3
| | | | | | | | | Refreshed all patches. Compile-tested on: ar7 Runtime-tested on: none Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* scripts/gen_image_generic.sh: fail on errorsStijn Tintel2019-03-271-1/+1
| | | | | | | | | | | The script always exits with value 0, even if some of the commands fail. This can potentially create broken, unbootable images, e.g. when make_ext4fs fails due to TARGET_KERNEL_PARTSIZE being too small for the kernel. Avoid this by failing the script when any command fails. Acked-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ar71xx: add support for MikroTik RouterBOARD 922UAGS-5HPacDKoen Vandeputte2019-03-266-29/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the MikroTik RouterBOARD 922UAGS-5HPacD with a built-in 802.11ac High-Power radio (31dBm). See https://mikrotik.com/product/RB922UAGS-5HPacD for more info. Specifications: - SoC: Qualcomm Atheros QCA9557 (720 MHz) - RAM: 128 MB - Storage: 128 MB NAND - Wireless: external QCA9882 802.11a/ac 2x2:2 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE-in 24V - SFP: 1x host - USB: 1x 2.0 type A - PCIe: 1x Mini slot (also contains USB 2.0 for 3G/LTE modems) - SIM slot: 1x mini-SIM Working: - Board/system detection - NAND storage detection - PCIe - USB: Type A & mini PCIe - Wireless - Ethernet - LED's (excl. SFP and RSSI levels) - Reset button - Sysupgrade Not working: - SFP cage Installation: - Boot vmlinux-initramfs image via BOOTP/TFTP and then flash sysupgrade image using "sysupgrade -n" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* mvebu: Add dependency to kmod-i2c-mux-pca954x for armada-macchiatobinHauke Mehrtens2019-03-261-1/+1
| | | | | | This driver is needed for the I2C mux on the board. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* mvebu: Refresh kernel configurationHauke Mehrtens2019-03-263-12/+16
| | | | | | | | | | | | | | | | | This refreshes the current kernel configuration to remove unneeded options, add some automatically added ones and reorders them. The normal build did this automatically, so the builds already used this configuration. CONFIG_HW_RANDOM_OMAP is explicitly activated for the cortexa72 subtarget because it has an inside-secure,safexcel-eip76 IP core. This was done with this command on the cortexa9 subtarget: make kernel_oldconfig and this one on the other subtargets: make kernel_oldconfig CONFIG_TARGET=subtarget Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mvebu: Fix typo in MACCHIATOBin detectionHauke Mehrtens2019-03-251-1/+1
| | | | | | The name in the device tree file is written with two C. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* linux: Add kmod-sched-act-vlanHauke Mehrtens2019-03-251-0/+16
| | | | | | This allows to configure rules to push or pop vlan headers. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* linux: Add kmod-sched-flowerHauke Mehrtens2019-03-251-0/+16
| | | | | | | This allows to classify packets based on a configurable combination of packet keys and masks. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* linux: Add kmod-sched-mqprioHauke Mehrtens2019-03-251-0/+16
| | | | | | This adds Multi-queue priority scheduler (MQPRIO). Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* linux: Add kmod-crxypto-xcbcHauke Mehrtens2019-03-251-0/+12
| | | | | | This can be used for IPsec. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* dropbear: split ECC support to basic and fullKonstantin Demin2019-03-252-8/+31
| | | | | | | | | | - limit ECC support to ec*-sha2-nistp256: * DROPBEAR_ECC now provides only basic support for ECC - provide full ECC support as an option: * DROPBEAR_ECC_FULL brings back support for ec{dh,dsa}-sha2-nistp{384,521} - update feature costs in binary size Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: rewrite init script startup logic to handle both host key filesKonstantin Demin2019-03-251-24/+38
| | | | Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: change type of config option "Port" to scalar type "port"Konstantin Demin2019-03-251-1/+1
| | | | | | it was never used anywhere, even LuCI works with "Port" as scalar type. Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: introduce config option "keyfile" (replacement for "rsakeyfile")Konstantin Demin2019-03-251-1/+56
| | | | | | | | | | | | * option "keyfile" is more generic than "rsakeyfile". * option "rsakeyfile" is considered to be deprecated and should be removed in future releases. * warn user (in syslog) if option "rsakeyfile" is used * better check options ("rsakeyfile" and "keyfile"): don't append "-r keyfile" to command line if file is absent (doesn't exist or empty), warn user (in syslog) about such files Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: add initial support for ECC host keyKonstantin Demin2019-03-251-0/+2
| | | | Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: fix regression where TTY modes weren't reset for clientKonstantin Demin2019-03-251-0/+46
| | | | | | cherry-pick upstream commit 7bc6280613f5ab4ee86c14c779739070e5784dfe Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: honour CFLAGS while building bundled libtomcrypt/libtommathKonstantin Demin2019-03-251-0/+48
| | | | | | | | Felix Fietkau pointed out that bundled libtomcrypt/libtommath do funny stuff with CFLAGS. fix this with checking environment variable OPENWRT_BUILD in both libs. change in dropbear binary size is drastical: 221621 -> 164277. Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: fix hardening flags during configureKonstantin Demin2019-03-251-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiler complains about messed up CFLAGS in build log: <command-line>: warning: "_FORTIFY_SOURCE" redefined <command-line>: note: this is the location of the previous definition and then linker fails: mips-openwrt-linux-musl-gcc [...] -o dropbearmulti [...] collect2: fatal error: ld terminated with signal 11 [Segmentation fault] compilation terminated. /staging_dir/toolchain-mips_24kc_gcc-8.2.0_musl/mips-openwrt-linux-musl/bin/ld: /tmp/cc27zORz.ltrans0.ltrans.o: relocation R_MIPS_HI16 against `cipher_descriptor' can not be used when making a shared object; recompile with -fPIC /staging_dir/toolchain-mips_24kc_gcc-8.2.0_musl/mips-openwrt-linux-musl/bin/ld: /tmp/cc27zORz.ltrans1.ltrans.o: relocation R_MIPS_HI16 against `ses' can not be used when making a shared object; recompile with -fPIC /staging_dir/toolchain-mips_24kc_gcc-8.2.0_musl/mips-openwrt-linux-musl/bin/ld: /tmp/cc27zORz.ltrans2.ltrans.o: relocation R_MIPS_HI16 against `cipher_descriptor' can not be used when making a shared object; recompile with -fPIC /staging_dir/toolchain-mips_24kc_gcc-8.2.0_musl/mips-openwrt-linux-musl/bin/ld: BFD (GNU Binutils) 2.31.1 assertion fail elfxx-mips.c:6550 [...] /staging_dir/toolchain-mips_24kc_gcc-8.2.0_musl/mips-openwrt-linux-musl/bin/ld: BFD (GNU Binutils) 2.31.1 assertion fail elfxx-mips.c:6550 make[3]: *** [Makefile:198: dropbearmulti] Error 1 make[3]: *** Deleting file 'dropbearmulti' make[3]: Leaving directory '/build_dir/target-mips_24kc_musl/dropbear-2018.76' make[2]: *** [Makefile:158: /build_dir/target-mips_24kc_musl/dropbear-2018.76/.built] Error 2 make[2]: Leaving directory '/package/network/services/dropbear' This FTBFS issue was caused by hardening flags set up by dropbear's configure script. By default, Dropbear offers hardening via CFLAGS and LDFLAGS, but this may break or confuse OpenWrt settings. Remove most Dropbear's hardening settings in favour of precise build, but preserve Spectre v2 mitigations: * -mfunction-return=thunk * -mindirect-branch=thunk Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* dropbear: bump to 2019.77Konstantin Demin2019-03-2512-517/+52
| | | | | | | | | | | | | - drop patches applied upstream: * 010-runtime-maxauthtries.patch * 020-Wait-to-fail-invalid-usernames.patch * 150-dbconvert_standalone.patch * 610-skip-default-keys-in-custom-runs.patch - refresh patches - move OpenWrt configuration from patch to Build/Configure recipe, thus drop patch 120-openwrt_options.patch Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
* ath10k-ct: Update to 2019-03-25Christian Lamparter2019-03-256-23/+23
| | | | | | | | 2e917efb607f ath10k: Add slow-pci bus work-around, sw-crypt blockack support. cc73ceb0dbc7 ath10k: Fix out-of-tree compile for 4.16 driver. 4b3cf7c20972 ath10k: Improve tx-status reporting. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath10k-firmware: update Candela Tech firmware imagesChristian Lamparter2019-03-251-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release notes since last time: Release notes for wave-1: - 2019-03-12: Add btcoex feature flag for 2.4Ghz only adapters, backported from upstream 10.2 firmware. - 2019-03-12: Support offloading decrypt of PMF blockack frames to the host. This lets us do blockack with PMF and rx-sw-crypt. Normal hwcrypt scenarios would not need this. Release notes for wave-2: - 2019-03-12: Fix crash when tearing down VI TID when pending frames exist. Could reproduce this while doing rmmod when VI traffic was flowing and PMF was enabled but broken. Bad luck could rarely cause it to happen in more normal config too. - 2019-03-12: Support offloading decrypt of PMF blockack frames to the host. This lets us do blockack with PMF and rx-sw-crypt. Normal hwcrypt scenarios would not need this. - 2019-03-12: Re-work problematic patch that attempted to fix transmit on non-QOS tids. It appears buggy in several ways, hopefully improved now. This was introduced last fall. See github bug 78. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* gemini: Classify Raidsonic NAS IB-4220-B as a NASChristian Lamparter2019-03-251-0/+1
| | | | Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* gemini: D-Link DNS-313 is a NASChristian Lamparter2019-03-251-0/+1
| | | | Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* apm821xx: MBL: set DEVICE_TYPE to NASChristian Lamparter2019-03-251-0/+1
| | | | | | The MyBook Live is a NAS. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* toolchain: ARM: Fix option conflict with multiarchBoris Krasnovskiy2019-03-251-0/+5
| | | | | | | | | | | | This problem exposed when compiling glibc, but applicable across the board. gcc compiles runtime libraries for all supported architectures, unless otherwise specified, and later selects applicable library based -m[arch,cpu,*] options, thus these options should not be passed to gcc as they break the compilation process. Signed-off-by: Boris Krasnovskiy <borkra@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [modified so it only touches ARM - I'm too chicken, changed authors email]
* toolchain: ARM: Fix toolchain compilation for gcc 8.xBoris Krasnovskiy2019-03-252-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | Set the toolchain's ARM CPU and FPU architectures by utilizing' gcc's --with-cpu / --with-fpu configure options that: "Specify which cpu variant the compiler should generate code for by default. cpu will be used as the default value of the -mcpu= switch." This will resolve the following kernel compilation failures under gcc 8.x on ARM because the kernel wants to set (possibly conflicting) optimization flags. .../ccyVnmrs.s:204: Error: selected processor does not support `dmb ish' in ARM mode .../ccyVnmrs.s:215: Error: architectural extension `mp' is not allowed for the current base architecture .../ccyVnmrs.s:216: Error: selected processor does not support `pldw [r4]' in ARM mode Because this is a big change, the .config and toolchain need to be refreshed (as in removed and regenerated). Reported-by: Ansuel Smith <ansuelsmth@gmail.com> Reported-by: Daniel Engberg <daniel.engberg.lists@pyret.net> [#1203] Signed-off-by: Boris Krasnovskiy <borkra@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [extended commit message, removed now-deprecated CPU_CFLAGS, changed author to gmail address]
* ipq40xx: essedma: Add fix for memory allocation issuesChristian Lamparter2019-03-242-0/+394
| | | | | | | | | | | | | This patch adds a ChromiumOS 3.18 patch [0] that fixes memory allocation issues under memory pressure by keeping track of missed allocs and rectify the omission at a later date. It also adds ethtool counters for memory allocation failures accounting so this can be verified. [0] <https://chromium.googlesource.com/chromiumos/third_party/kernel/+/d4e1e4ce6801f9eddce056c58f5a288864955265> Reported-by: Chen Minqiang <ptpt52@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* tools/ccache: update to 3.6Deng Qingfang2019-03-242-3/+3
| | | | | | Update ccache to 3.6 Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
* ramips: allow packets with ttl=0Felix Fietkau2019-03-241-2/+2
| | | | | | | Some broken ISPs (e.g. Comcast) send DHCPv6 packets with hop limit=0. This trips up the TTL=0 check in the PPE if enabled. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ath79: add support for COMFAST CF-E5/E7Ding Tengfei2019-03-245-10/+175
| | | | | | | | | | | | | | | | | | | | | | | | COMFAST CF-E5/E7 is a outdoor 4G LTE AP with PoE support, based on Qualcomm/Atheros QCA9531. Short specification: 2x 10/100 Mbps Ethernet, with 24v PoE support 64 MB of RAM (DDR2) 16 MB of FLASH (SPI) 2T2R 2.4 GHz, 802.11b/g/n built-in 1x 3 dBi antennas output power (max): 80 mW (19 dBm) Qucetel EC20 LTE MODULE(1x external detachable antenna) Flash instruction: Original firmware is based on OpenWrt. Use sysupgrade image directly in vendor GUI. Signed-off-by: Ding Tengfei <dtf@comfast.cn> [commit subject fix] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: add TP-Link TL-WR710N v1Marcin Jurkowski2019-03-244-0/+149
| | | | | | | | | | | | | | | | | | | | | This commit adds support for TP-Link TL-WR710N v1 router. CPU: Atheros AR9331 400MHz RAM: 32MB FLASH: 8MiB PORTS: 1 Port 100/10 LAN (connected to a switch), 1 Port 100/10 WAN WiFi: Atheros AR9331 1x2:1 bgn USB: ChipIdea HDRC USB2.0 LED: SYS BTN: Reset Sysupgrade from `ar71xx` works without glitches. Network interfaces assigned for LAN and WAN ports are `eth1` and `eth0` respectively, what's consistent with `ar71xx` target. Wireless radio path is automatically upgraded from `platform/ar933x_wmac` to `platform/ahb/18100000.wmac`. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
* ath79: add support for TP-Link TL-WR941N v7 (CN)Chuanhong Guo2019-03-243-2/+138
| | | | | | | | | | | | | | | | | This adds support for the Chinese version of TL-WR941N v7. It uses QCA9558+AR8236 while the international version uses TP9343 instead. Specification: - SoC: Qualcomm Atheros QCA9558 - Flash: 4 MB - RAM: 64 MB - Ethernet: Atheros AR8236 with 5 FE ports Flash instruction: Upload the generated factory firmware on web interface. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: remove switch driver in ag71xxChuanhong Guo2019-03-242-1345/+0
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: use ar8216 for builtin switchChuanhong Guo2019-03-247-10/+17
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: introduce qca,mib-poll-interval propertyChuanhong Guo2019-03-242-2/+13
| | | | | | | | This allows users to specify a shorter mib poll interval so that the swconfig leds could behave normal with current get_port_stats() implementation. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: do a software reset for switch during hw_initChuanhong Guo2019-03-241-0/+3
| | | | | | | | | | | | | | This applies to ar8216 and ar8236. QCA's newer U-boot will enable the switch mdio master for FE switches which makes phy inaccessible from CPU mdio. (e.g. on TP-Link TL-WR941N v7 Chinese version which uses QCA9558+AR8236.) For these devices PHY probing is broken and mdio device probing is a must. We also need to disable switch mdio master in driver for later PHY initialization. Do a soft reset during hw_init so that mdio master can be disabled and expose PHYs to CPU mdio for later PHY accessing. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: mib_work_func: read all port mibs everytimeChuanhong Guo2019-03-242-9/+5
| | | | | | | | ar8xxx_mib_capture will update mib counters for all ports. Current code only update one port at a time and the data for other ports are lost. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: add support for get_port_stats()Chuanhong Guo2019-03-243-25/+59
| | | | | | | | | | | | | | | | | | | | | | | Partially reverts commit eff3549c5883a9abc5dbff00c084cabbcfdf4437. AR7240 and AR9341 have buggy hardware switch LED trigger. The AR7240 one doesn't blink and the blinking of port0/port5 is reversed on AR9341 if we swap PHY0 and PHY4. (Only blinking is reversed, which means LED for PHY0 will lit when PHY0 is link up and will blink when PHY4 has active link and vice versa.) On these two chips a software swconfig LED trigger is required. This commit adds swconfig port stats back but: 1. move checking of mib_t/rxb_id into ar8xxx_chip since we can't distinguish ar7240sw and ar8216 using only chip id. 2. don't update mib counter in get_port_stat. This function is called every 0.01s and this capturing procedure will take up a lot of CPU. We already have a mib_work_func updating mib counters every 2s so return the saved counter instead of fetching new data. The blinking rate will be weird but it should solve the previously mentioned CPU time problem. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: add support for ar724x/ar933x builtin switchChuanhong Guo2019-03-242-6/+112
| | | | | | | | | | | | | | This builtin switch is a bugless ar8216 with different mib counters and gigabit cpu port. Atheros uses the same device ID and it's impossible to distinguish the standalone one and the builtin one. So we add support to mdio device probe only. This switch doesn't have buggy vlan tag so it's not needed to enable atheros header. This commit changed ar8216_setup_port so that it can be reused for this switch. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: mdiodev: add qca,phy4-mii-enable optionChuanhong Guo2019-03-241-0/+6
| | | | | | This option allows setting phy4 as a phy connected directly to CPU. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: ar8229: add phy_read/phy_writeChuanhong Guo2019-03-242-0/+57
| | | | | | | the added function also works for ar8216 and will be used in the following ar7240 support. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: add support for separated mdio bus for phy accessChuanhong Guo2019-03-242-1/+37
| | | | | | | | | | | | | | Atheros FE switches have a builtin mdio master available for PHY accessing and on ar724x/ar933x builtin switches this mdio master is the only way of accessing PHYs. After this patch if there is phy_read/phy_write method available in ar8xxx_chip we register a separated mdio bus for accessing PHYs. Still adds support for mdio device probing only since this isn't needed for those switches registered using PHY probing. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: add support for ar8229Chuanhong Guo2019-03-242-5/+144
| | | | | | | | | | | | | | | | ar8229 is the builtin switch in ar934x and later chips. There is also a standalone version available and their registers/functions are the same. This commit added support for the builtin ar8229. The only thing missing for standalone ar8229 should be phy modes. Since I don't have a router using that, this commit doesn't add support for other phy modes. Only add its support for mdio-device probing method because the current PHY probing can't return 1G speed when it's a FE switch. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* generic: ar8216: add mdio-device probing supportChuanhong Guo2019-03-241-1/+134
| | | | | | | currently only ar8327 and ar8236 are added since they are the only two I could verify. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>