aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: split Teltonika RUT955 to support other RUT9xx modelsDaniel Golle2020-04-292-171/+198
| | | | | | | | | Split device-tree of Teltonika RUT955 into a generic RUT9xx part and a part specific to that version of RUT955 already supported. Also harmonize GPIO and LED names with what is used by the vendor firmware and assign RS485 DTR signal. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ath79: add SUPPORTED_DEVICES based on ar71xx for some devicesAdrian Schmutzler2020-04-282-0/+13
| | | | | | | | | This adds some still-missing board names for old TP-Link devices to ath79 SUPPORTED_DEVICES. Fixes: FS#3017 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath10k-ct-firmware: rename ct-htt packagesÁlvaro Fernández Rojas2020-04-281-1/+1
| | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* ath79: indicate boot/failsafe/upgrade for NanoBeam/Nanostation ACAdrian Schmutzler2020-04-272-2/+14
| | | | | | | | Like for Ubiquiti PowerBeam 5AC Gen2, the highest RSSI LED can be exploited to indicate boot/failsafe/upgrade for the NanoBeam AC and Nanostation AC as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBeam 5AC Gen2Roger Pueyo Centelles2020-04-275-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | The Ubiquiti PowerBeam 5AC Gen 2 (PBE-5AC-Gen2) is an outdoor 802.11ac 5 GHz bridge with a radio feed and a dish antenna. The device is hardware-compatible with the LiteBeam AC Gen2, plus the 4 extra LEDs. Specifications: - SoC: Qualcomm Atheros AR9342 rev 2 - RAM: 64 MB DDR2 - Flash: 16 MB SPI NOR (mx25l12805d) - Ethernet: 1x 10/100/1000 Mbps Atheros 8035, 24 Vdc PoE-in - WiFi 5 GHz: QCA988x HW2.0 Ubiquiti target 0x4100016c chip_id 0x043222ff - WiFi 2.4 GHz: Atheros AR9340 (SoC-based) - Buttons: 1x (reset) - LEDs: 1x power, 1x Ethernet, 4x RSSI via GPIO. All blue. - UART: not tested Installation from stock airOS firmware: - Follow instructions for WA-type Ubiquiti devices on OpenWrt wiki Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [changed device name in commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable SGMII workaround for affected boardsDavid Bauer2020-04-273-0/+8
| | | | | | | These boards suffer from a sudden inability to establish a link on the SGMII. Enable the workaround to fix the link when it dies. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: ag71xx: unify version dependent codeDavid Bauer2020-04-271-5/+1
| | | | | | | Use IS_ERR_OR_NULL macro to use the same code on kernel 4.19 as well as 5.4. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: ag71xx: remove code for legacy kernelsDavid Bauer2020-04-271-32/+0
| | | | | | | ath79 does not support kernels prior to 4.19 anymore. Remove legacy code for those kernels from the ag71xx driver. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: remove unused TP-Link partition parserDavid Bauer2020-04-274-496/+0
| | | | | | | This parser was added with the target, but no device seems to use it currently, as all partitions are specified in the device-tree. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix QCA953x DDR and GPIO compatible bindingsDavid Bauer2020-04-241-2/+2
| | | | | | | The memory as well as GPIO controller had the wrong SoC name used for their compatible binding. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: correct QCA9550 machine compatible bindingDavid Bauer2020-04-2414-14/+14
| | | | | | | Some boards using a QCA9556 or QCA9558 had their machine compatible binding incorrectly set to qca,qca9557. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: rename qca9557.dtsi to qca955x.dtsiDavid Bauer2020-04-2426-29/+29
| | | | | | | | | | | There are at least 3 different chips in the Scorpion series of SoCs. Rename the common DTSI to better reflect it's purpose for the whole series. Also rename the compatible bindings from qca,ar9557 and qca,qca9557 to qca,qca9550. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: move tplinkpart.c parser to patchesAdrian Schmutzler2020-04-243-253/+462
| | | | | | | | | | | | | Between 4.19 and 5.4, mtd parsers have been moved to "parsers" subdirectory. Like for myloader.c in the previous patch, this patch moves tplinkpart.c to the kernel patches, so the code and the kernel includes are at the same location and the path can be adjusted per kernel. While at it, remove some outdated kernel version switches from the C code. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: fix include of myloader.o since kernel 5.4Adrian Schmutzler2020-04-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | Between 4.19 and 5.4, mtd parsers have been moved to "parsers" subdirectory. Based on this, the selection of myloader.o in OpenWrt was also moved to that subdirectory, while the Kconfig and our local myloader.c file remained in /drivers/mtd. This resulted in linking errors like the following (on ath25@5.4): make[8]: *** No rule to make target 'drivers/mtd/parsers/myloader.o', ... needed by 'drivers/mtd/parsers/built-in.a'. Stop. make[7]: *** [scripts/Makefile.build:500: drivers/mtd/parsers] Error 2 make[6]: *** [scripts/Makefile.build:500: drivers/mtd] Error 2 Since myloader.c is not too big, this patch moves it to the kernel patches, allowing to adjust the path for kernel 5.4 and keeping Makefiles and file paths better in sync. Other patches have been refreshed accordingly. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for AVM FRITZ!WLAN Repeater 450EDavid Bauer2020-04-198-90/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC: Qualcomm QCA9556 (Scorpion) 560MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 INPUT: WPS button LED: Power, WiFi, LAN, RSSI indicator Serial: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 192.168.178.1. Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. You need to powercycle the device afterwards to boot OpenWRT. Tested-by: Andreas Ziegler <dev@andreas-ziegler.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: remove stray pipeDavid Bauer2020-04-171-1/+1
| | | | | | Fixes: 8918c038f330 ("ath79: add support for AVM FRITZ!WLAN Repeater 1750E") Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for AVM FRITZ!WLAN Repeater 1750EDavid Bauer2020-04-177-13/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the AVM Fritz!WLAN Repeater 1750E SOC: Qualcomm QCA9556 (Scorpion) 720MHz MIPS74Kc RAM: 64MB Zentel A3R12E40CBF DDR2 FLASH: 16MiB Winbond W25Q128 SPI NOR WLAN1: QCA9556 2.4 GHz 802.11b/g/n 3x3 WLAN2: QCA9880 5 GHz 802.11 n/ac 3x3 INPUT: WPS button LED: Power, WiFi, LAN, RSSI indicator Serial: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi (correct MAC) - 5 GHz WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 192.168.178.1. Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. You need to powercycle the Device afterwards to boot OpenWRT. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add QCA9550 reset sequenceDavid Bauer2020-04-177-2/+280
| | | | | | | | | | | | | | | | | The QCA9550 family of SoCs have a slightly different reset sequence compared to older chips. Normally the bootloader performs this sequence, however some bootloader implementation expect the operating system to clear the reset. Also get the PCIe resets from OF to support the second RC of the QCA9558. This is required for the AVM FRITZ!WLAN Repeater 1750E to work, as EVA leaves the PCIe bus in reset. Tested: AVM FRITZ!WLAN Repeater 1750E - OCEDO Koala Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: reduce spi-max-frequency for Mikrotik wAP G-5HacT2HnDRoger Pueyo Centelles2020-04-161-1/+1
| | | | | | | | The previous spi-max-frequency value did not work with all the CPU speed settings (configurable with rbcfg or from the stock firmware); the new one does for the three of them. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: MikroTik: fix missing nand on kernel 5.4Koen Vandeputte2020-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | Following symbol got renamed upstream: CONFIG_MTD_NAND --> CONFIG_MTD_RAW_NAND Also add this renamed symbol so NAND also works on kernel 5.4. After: [ 0.628372] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1 [ 0.634862] nand: Samsung NAND 128MiB 3,3V 8-bit [ 0.639554] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.647263] Scanning device for bad blocks [ 0.656228] random: fast init done [ 0.789652] 3 fixed-partitions partitions found on MTD device ar934x-nand [ 0.796550] Creating 3 MTD partitions on "ar934x-nand": [ 0.801874] 0x000000000000-0x000000040000 : "booter" [ 0.807715] 0x000000040000-0x000000400000 : "kernel" [ 0.813551] 0x000000400000-0x000008000000 : "ubi" Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.19 to 4.19.115Koen Vandeputte2020-04-164-21/+19
| | | | | | | | | | | | | | | | | | Refreshed all patches. Remove upstreamed: - 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch - 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch Fixes: - CVE-2020-8647 - CVE-2020-8648 (potentially) - CVE-2020-8649 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: improve status LED definitions for GL-AR750Hannu Nyman2020-04-161-1/+5
| | | | | | | | Improve the status LED functionality in GL-AR750 by adding the definitions for different statuses (boot, failsafe, running, flashing). Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* ath79: add SUPPORTED_DEVICES for TP-Link TL-WA901ND v2Adrian Schmutzler2020-04-151-0/+1
| | | | | | | This adds the board name from ar71xx to support upgrade without -F for the TP-Link TL-WA901ND v2. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.32Petr Štetiar2020-04-141-4/+2
| | | | | | | | | | | Refreshed patches, removed upstreamed patches: generic: 746-stable-net-dsa-mt7530-fix-null-pointer-dereferencing-in-por.patch Run tested: qemu-x86-64, apalis Build tested: x86/64, imx6, sunxi/a53 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: further fixes for ZyXEL NBG6716Adrian Schmutzler2020-04-141-7/+10
| | | | | | | | | | | | | | | | | | This applies further fixes to the DTS of ZyXEL NBG6716 based on what is found in ar71xx (mach-nbg6716.c): - use WiFi label names as in ar71xx - fix WPS gpio number - fix GPIO_ACTIVE_HIGH and mode for WiFi switch - add codes for USB eject buttons - fix node name for "internet" LED This device has separate LEDs for WAN and "Internet". As the WAN-LED (and the four LAN-LEDs) are driven independent of the setup in DT/01_leds, the "internet" LED is left unassigned (in contrast to ar71xx, where it was set up effectively as a second WAN LED) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable m25p,fast-read for tplink,tl-wr1043-v1Luiz Angelo Daros de Luca2020-04-141-0/+1
| | | | | | Enables spi-mem interface for 3x faster flash read. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* ath79: enable m25p,fast-read for tplink,tl-wr2543-v1Luiz Angelo Daros de Luca2020-04-141-0/+1
| | | | | | | | | | Enables spi-mem interface usage. It speeds up flash read in about 3x while it also workaround a possible hardware bug when normal spi read is used. Fixes: FS#2742 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* ath79: add read support using spi-memLuiz Angelo Daros de Luca2020-04-142-0/+140
| | | | | | | | | | | | | | | | Reimplements read optimization on top of spi-mem. Similar to what 461-spi-ath79-add-fast-flash-read.patch used to do with the dropped flash read interface. It accelerate only fast-read op reading flash directly from memory mapped region. 'm25p,fast-read' must be set in order to use the new spi-mem. It improved read speed up to 3x on old devices (tplink,tl-wr2543-v1) while no speed improvement was noticed on newer devices like (tplink,archer-c7-v2). Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* ath79: fix USB port LED assignment for ZyXEL NBG6716Adrian Schmutzler2020-04-131-2/+2
| | | | | | | | | | | The USB LED assignment to internal ports was swapped. Fix it. We also explicitly checked that the LED label numbers match those on the device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix wmac initialization for Zyxel NBG6716Guillaume Lefebvre2020-04-133-4/+20
| | | | | | | | | | | | | | | | | | 2.4 GHz Wifi on ath79 is set up in 10-ath9k-eeprom, but in ar71xx it was done with ath79_register_wmac. Thus, the following errors are observed on the device: ath: phy1: Unable to initialize hardware; initialization status: -5 ath9k 18100000.wmac: failed to initialize device ath9k: probe of 18100000.wmac failed with error -5 This patch changes the ath79 support to properly use wmac as well. This will also require fixing the MAC address in a different way. Signed-off-by: Guillaume Lefebvre <guillaume@zelig.ch> [several adjustments to 10-fix-wifi-mac, use correct MAC address, rewrite commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Comfast CF-WR752AC v1Roman Hampel2020-04-095-4/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - Qualcomm QCA9531 + QCA9886 - dual band, antenna 2*3dBi - Output power 50mW (17dBm) - 1x 10/100 Mbps LAN RJ45 - 128 MB RAM / 16 MB FLASH (w25q128) - 3 LEDs (red/green/blue) incorporated in "color wheel reset switch" - UART 115200 8N1 Flashing instructions: The U-boot bootloader contains a recovery HTTP server to upload the firmware. Push the reset button while powering the device on and keep it pressed for ~10 seconds. The device's LEDs will blink several times and the recovery page will be at http://192.168.1.1; use it to upload the sysupgrade image. Alternatively, the original firmware is based on OpenWrt so a sysupgrade image can be installed via the stock web GUI. Settings from the original firmware will be saved and restored on the new one, so a factory reset will be needed. To do so, once the new firmware is flashed, enter into failsafe mode by pressing the reset button several times during the boot process, until it starts flashing. Once in failsafe mode, perform a factory reset as usual. LED-Info: The LEDs on the Comfast stock fw have a very proprietary behaviour, corresponding to the user selected working mode (AP, ROUTER or REPEATER). In the first two cases, only blue is used for status and LAN signaling. When using the latter, blue is always off (except for sysupgrade), either red signals bad rssi on master-link, or green good. Since the default working mode of OpenWrt resembles that of a router/AP, the default behavior is implemented accordingly. MAC addresses (art partition): location address (example) use in vendor firmware 0x0 xx:xx:xx:xx:xc:f8 -> eth0 0x6 xx:xx:xx:xx:xc:fa -> wlan5g (+2) 0x1002 xx:xx:xx:xx:xc:f9 -> not used 0x5006 xx:xx:xx:xx:xc:fb -> not used --- xx:xx:xx:xx:xd:02 -> wlan2g (+10) The same strange situation has already been observed and documented for COMFAST CF-E560AC. Signed-off-by: Roman Hampel <rhamp@arcor.de> Co-developed-by: Joao Albuquerque <joaohccalbu@gmail.com> Signed-off-by: Joao Albuquerque <joaohccalbu@gmail.com> [adjust and extend commit message, rebase, minor DTS adjustments, add correct MAC address for wmac, change RSSI LED names and behavior] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix MAC addresses for ethernet on ZyXEL NBG6716Adrian Schmutzler2020-04-082-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MAC addresses of the ethernet devices (eth0 & eth1) are randomly set at boot time by the ag71xx driver, because it is currently not possible to retrieve MAC addresses in ASCII format within the DTS file. This commit works around this behaviour by setting the MAC addresses during the preinit phase. The same has been implemented recently for the Siemens WS-AP3610 in d2b8ccb1c04d ("ath79: add support for Siemens WS-AP3610"). MAC assignment in vendor firmware is as follows: use vendor address OpenWrt 2g wifi0 ethaddr -> wlan1 5g wifi1 ethaddr +1 -> wlan0 lan eth1 ethaddr +2 -> eth0 wan eth0 ethaddr +3 -> eth1 ethaddr is retrieved by $(mtd_get_mac_ascii u-boot-env ethaddr) Note that both Wifi and ethernet indexing is swapped in OpenWrt compared to vendor firmware. Suggested-by: Guillaume Lefebvre <guillaume@zelig.ch> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Kevin Gagnon <kevin_gagnon@videotron.ca>
* ath79: add support for Comfast CF-EW72Chris Morgan2020-04-074-1/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: Qualcomm/Atheros QCA9531 + QCA9886 2x 10/100 Mbps Ethernet, with 48v PoE 2T2R 2.4 GHz, 802.11b/g/n 2T2R 5 GHz, 802.11a/n/ac 128MB RAM 16MB SPI Flash 4x LED (Always On Power, LAN, WAN, WLAN) Flashing Instructions: Original firmware is based on OpenWRT, so flashing the sysupgrade image on the factory firmware is sufficient. Tested: Reset button, WAN LED, LAN LED, Power LED (always on, not much to test), WLAN LED (one LED only for 2 interfaces, by default it gets assigned to the first interface), MAC addresses (match factory firmware). My LAN factory MAC address ends in F2. use stock_mac art_loc lan :f2 0x0 wan :f3 0x1002 5g :f4 0x6 2g :f5 0x5006 Since MAC address flash locations do not really match their use in vendor firmware (e.g. address from 5 GHz calibration data is assigned to 2.4 GHz WiFi), just calculate the MAC addresses with an offset based on 0x0 address. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> [add MAC address comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-MR3420 v3Lim Guo Wei2020-04-064-10/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the TP-Link TL-MR3420 v3, a later revision of the v2 with an external gpiochip similar to TP-Link Archer C7 v4. Specifications: SOC: Qualcomm Atheros QCA9531 CPU: 650MHz Flash: 4 MiB RAM: 32 MiB WLAN: Qualcomm Atheros QCA9531 bgn 2T2R 2.4 GHz Ethernet: 5 ports (100M) Flashing instructions: - Flash factory image from OEM WebUI: openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-factory.bin - Sysupgrade from ath79 image: openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-sysupgrade.bin Signed-off-by: Lim Guo Wei <limguowei@gmail.com> [remove SUPPORTED devices, some typo adjustments, fix WAN MAC address, fix sorting in 01_leds] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: improve mikrotik-caldata.shThibaut VARÈNE2020-04-041-2/+7
| | | | | | | | | | Reduce unnecessary flash wear and be tidy: - Run the extraction only if necessary - Extract temporary file to /tmp - cleanup after execution Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: bump 5.4 to 5.4.28Petr Štetiar2020-03-282-16/+16
| | | | | | | | | | | | | | | | | | | | Changelog since 5.4.24 mentions CVE-2019-19769, CVE-2020-8648, CVE-2020-8649 and CVE-2020-8647. Removed upstreamed: generic: 507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch generic: 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch bcm27xx: 950-0435-ASoC-pcm512x-Fix-unbalanced-regulator-enable-call-in.patch ipq806x: 701-stmmac-fix-notifier-registration.patch lantiq: 002-pinctrl-falcon-fix-syntax-error.patch octeontx: 0002-net-thunderx-workaround-BGX-TX-Underflow-issue.patch Run tested: apu2, qemu-x86-64, apalis, a64-olinuxino, nbg6617 Build tested: sunxi/a53, imx6, x86/64, ipq40xx Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: rename Mikrotik RB 922UAGS-5HPacD mtd partitionThibaut VARÈNE2020-03-272-4/+4
| | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix Mikrotik wAP G-5HacT2HnD mtd partitionsThibaut VARÈNE2020-03-273-29/+38
| | | | | | | | | | | | | | | | | | | | | | In RouterBOARD parlance there never was an "art" partition. This partition has always been named 'hard_config' on ar71xx. This partition contains more than just ART (Atheros Radio Test) data. It includes the hardware description (product code, serial, board identifier, name, hardware options, MAC address), as well as other bits affecting the operation of RouterBoot. To avoid confusion with regular ART data, this partition is renamed in line with historical ar71xx and ramips nomenclature as 'hard_config'. This commit fixes the previous support files and implements the nested RouterBoot partition scheme as already used by ramips-based SPI-NOR RouterBOARD DTSes, as previously reviewed and implemented in bbe2cf657ca7 ("ramips: fix RBM11G partitioning"). Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WA860RE v1Adrian Schmutzler2020-03-264-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA860RE v1 range extender from ar71xx to ath79. Specifications: Board: AP123 / AR9341 rev. 3 Flash/RAM: 4/32 MiB CPU: 535 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Two external antennas Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Recovery: Note that this device does not provide TFTP via ethernet like many other TP-Link devices do. You will have to open the case if you require recovery beyond failsafe. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Sebastian Knapp <sebastian4842@outlook.com>
* ath79: add support for TP-Link TL-WDR4310 v1Adrian Schmutzler2020-03-265-2/+25
| | | | | | | | | This device seems to be identical to the TL-WDR4300, just with different release date/region and TPLINK_HWID. Support is added based on the ar71xx implementation. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix missing return statement in ar934x_nandDavid Bauer2020-03-221-4/+12
| | | | | | | | | | | The reset assert and deassert methods currently miss a return value, leading to a compilation warning. Return the return-value of reset_control_assert and reset_control_deassert to fix these warnings. Suggested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix NAND driver compilation for kernel 5.4David Bauer2020-03-221-5/+122
| | | | | | | | | | | | | | | This fixes the compilation of the AR934x NAND controller driver for kernel 5.4 while leaving it untouched for kernel 4.19. This change is currently not run-tested, as i do not have such a device at hand. CC: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> CC: André Valentin <avalentin@marcant.net> CC: WeiDong Jia <jwdsccd@gmail.com> Signed-off-by: David Bauer <mail@david-bauer.net> Tested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
* ath79: align Ubiquiti AC Pro ethernet map to factoryDavid Bauer2020-03-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | The Uniquiti AC Pro and Ubiquiti AC Mesh Pro currently have the "Primary" and "Secondary" ethernet ports configured to offer LAN as well as WAN. However, Uiquiti describes the following behavior for the devices Ethernet ports: > Secondary UniFi Access Point (UAP) Ethernet ports don't > provide PoE passthrough (to run current to a second powered > device), but they do support data passthrough. > It serves as a bridged interface between main / secondary > Ethernet port. To reduce confusion for users (as LAN and WAN functionality is not visible on the device itself), configure both ports to offer LAN functionality. Users can still configure a WAN interface on a port they are able to choose. CC: Lucian Cristian <lucian.cristian@gmail.com> Reported-by: Florian Klink <flokli@flokli.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Ubiquiti NanoBridge M (XM)Roger Pueyo Centelles2020-03-225-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Ubiquiti NanoBridge M (XM), a 802.11n wireless with a feed+dish form factor, with the same board definition as the Bullet M (XM). Specifications: - Atheros AR7241 SoC - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Upload the factory image via AirOS web GUI. Flashing via TFTP: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Use a pointy tool (e.g., pen cap, slotted screwdriver) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanobridge-m-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, fix includes in DTS, add label MAC address, add SOC and fix sorting in generic-ubnt.mk] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: omit IMAGE_SIZE argument from check-sizeSungbo Eo2020-03-2110-54/+54
| | | | | | | | | Now that check-size uses IMAGE_SIZE by default, we can skip the argument from image recipes to reduce redundancy. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: gather DEVICE_VARS into one placeSungbo Eo2020-03-211-1/+2
| | | | | | | | | | | Place DEVICE_VARS assignments at the top of the file or above Device/Default to make them easier to find. For ramips, remove redundant values already present in parent file. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [do not touch ar71xx, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for ubnt_bullet-m-ar7240 variantRussell Senior2020-03-215-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Ubiquiti Bullet M (AR7240). Specifications: - AR7240 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - External antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Attention: airOS firmware versions >= 5.6 have a new bootloader with an incompatible partition table! Please downgrade to <= 5.5 _before_ flashing OpenWrt! Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other Ubiquiti M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_bullet-m-ar7240-squashfs-factory.bin The "fixed-link" section of the device tree is needed to avoid errors like this: Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings? With "fixed-link", the errors go away and eth0 comes up reliably. Signed-off-by: Russell Senior <russell@personaltelco.net> [fix SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link Archer D7/D7b v1Davide Fioravanti2020-03-187-0/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer D7 v1 is a dual-band AC1750 router + modem. The router section is based on Qualcomm/Atheros QCA9558 + QCA9880. The "DSL" section is based on BCM6318 but it's currently not supported. The Archer D7b seems to differ from the Archer D7 only in the partition table. Router section - Specification: 775/650/258 MHz (CPU/DDR/AHB) 128 MB of RAM (DDR2) 16 MB of FLASH (SPI NOR) 3T3R 2.4 GHz 3T3R 5 GHz 4x 10/100/1000 Mbps Ethernet 7x LED, 2x button UART header on PCB Known issues: - Broadband LED (missing GPIO - probably driven by the BCM6318) - Internet LED (missing GPIO - probably driven by the BCM6318) - WIFI LED (working only for one interface at a time, while in the OEM firmware works for both wifi interfaces; thus, this patch does not set a trigger by default) - DSL not working (eth0) UART connection --------------- J1 HEADER (Qualcomm CPU) . VCC . GND . RX O TX J41 HEADER (Broadcom CPU) . VCC . GND . RX O TX The following instructions require a connection to the J1 UART header and are tested for the Archer D7 v1. For the Archer D7b v1, names should be changed accordingly. Flash instructions under U-Boot, using UART ------------------------------------------ 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-squashfs-sysupgrade.bin erase 0x9f020000 +f90000 cp.b 0x81000000 0x9f020000 0xf90000 reset Initramfs instructions under U-Boot for testing, using UART ---------------------------------------------------------- 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access. 2. Setup ip addresses for U-Boot and your tftp server. 3. Issue below commands: tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-initramfs-kernel.bin bootm 0x81000000 4. Here you can backup the original firmware and/or flash the sysupgrade openwrt if you want Restore the original firmware ----------------------------- 0. Backup every partition using the OpenWrt web interface 1. Download the OEM firmware from the TP-Link website 2. Extract the bin file in a folder (eg. Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin) 3. Remove the U-Boot and the Broadcom image part from the file. Issue the following command: dd if="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin" of="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod" skip=257 bs=512 count=31872 4. Double check the .mod file size. It must be 16318464 bytes. 5. Flash it using the OpenWrt web interface. Force the update if needed. WARNING: Remember to NOT keep settings. 5b. (Alternative to 5.) Flash it using the U-Boot and UART connection. Issue below commands in the U-Boot: tftpboot 0x81000000 Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod erase 0x9f020000 +f90000 cp.b 0x81000000 0x9f020000 0xf90000 reset Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com> [cosmetic DTS changes, remove TPLINK_HWREVADD := 0, do not use two phyXtpt at once, add missing buttons, minor commit message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link Archer C60 v3Adrian Schmutzler2020-03-188-12/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link Archer C60 v3 is a dual-band AC1350 router, based on Qualcomm/Atheros QCA9561 + QCA9886. It seems to be identical to the v2 revision, except that it lacks a WPS LED and has different GPIO for amber WAN LED. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - 6x LED, 2x button - UART header on PCB Flash instruction (WebUI): Download *-factory.bin image and upload it via the firmwary upgrade function of the stock firmware WebUI. Flash instruction (TFTP): 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery While TFTP works for OpenWrt images, my device didn't accept the only available official firmware "Archer C60(EU)_V3.0_190115.bin". In contrast to earlier revisions (v2), the v3 contains the (same) MAC address twice, once in 0x1fa08 and again in 0x1fb08. While the partition-table on the device refers to the latter, the firmware image contains a different partition-table for that region: name device firmware factory-boot 0x00000-0x1fb00 0x00000-0x1fa00 default-mac 0x1fb00-0x1fd00 0x1fa00-0x1fc00 pin 0x1fd00-0x1fe00 0x1fc00-0x1fd00 product-info 0x1fe00-0x1ff00 0x1fd00-0x1ff00 device-id 0x1ff00-0x20000 0x1ff00-0x20000 While the MAC address is present twice, other data like the PIN isn't, so with the partitioning from the firmware image the PIN on the device would actually be outside of its partition. Consequently, the patch uses the MAC location from the device (which is the same as for the v2). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: rename ubnt_bullet-m to ubnt_bullet-m-ar7241Russell Senior2020-03-185-9/+10
| | | | | | | | | | | Since there exists another variant of the Bullet M with AR7240 SoC under the same name, this patch introduces the SoC into the device name to be able to distinguish these variants. Signed-off-by: Russell Senior <russell@personaltelco.net> [add commit message, adjust model in DTS, fix 02_network and SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>