aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: do not build TP-Link tiny images by defaultAdrian Schmutzler2020-06-281-0/+2
| | | | | | | | | | | | | | | For quite some time, the tiny (4M flash) TP-Link sysupgrade and factory images cannot be built anymore by the buildbots, just the initramfs-kernel.bin files are still there. Disable these images for the buildbots and don't waste build resources. Note that these devices still build fine with default settings, just not with the additional packages and config symbols for the buildbots. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: drop and consolidate redundant chosen/bootargsAdrian Schmutzler2020-06-2850-190/+12
| | | | | | | | | | | | | | | | | In ath79, for several SoCs the console bootargs are defined to the very same value in every device's DTS. Consolidate these definitions in the SoC dtsi files and drop further redundant definitions elsewhere. The only device without any bootargs set has been OpenMesh OM5P-AC V2. This will now inherit the setting from qca955x.dtsi While this is a cosmetic change, backporting it to 19.07 will be a major help for anyone doing backports of device support. Without it, every backporter would have to remember to manually add the chosen node to the device's DTS. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 635f111148c3f7ccb0ecc92863a3b1a142f6ebeb)
* ath79: add support for TP-Link TL-WA801ND v3/v4Adrian Schmutzler2020-06-216-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for these devices from ar71xx. Specification: - System-On-Chip: Qualcomm Atheros QCA9533 - CPU/Speed: v3: 560 MHz, v4: 650 MHz - Flash: 4096 KiB - RAM: 32 MiB - Ethernet: 1 port @ 100M - Wireless: SoC-integrated: QCA9533 2.4GHz 802.11bgn In contrast to the implementation in ar71xx (reset and WiFi button), the device actually features reset and WPS buttons. Flashing instructions: Upload the ...-factory.bin file via OEM web interface. TFTP Recovery: 1. Set PC to fixed IP address 192.168.0.66 2. Download *-factory.bin image and rename it to wa801ndv3_tp_recovery.bin 3. Start a tftp server with the image file 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. TFTP recovery has only been tested with v3, and the Wiki states that the procedure won't work for v4, which cannot be verified or falsified at the moment. Tested by Tim Ward (see forum): https://forum.openwrt.org/t/ath79-support-for-tp-link-tl-wa901nd-v3-v4-v5/61246/13 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 9a477b833ab2aea96b9eee55acb5f9e7b01b36d8)
* ath79: wndr3700 series: fix wifi range & throughputChristian Lamparter2020-06-092-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ar71xx's GPIO setup for the 2.4GHz and 5GHz antennae demultiplexer: | 158 /* 2.4 GHz uses the first fixed antenna group (1, 0, 1, 0) */ | 159 ap9x_pci_setup_wmac_gpio(0, (0xf << 6), (0xa << 6)); | 160 | 161 /* 5 GHz uses the second fixed antenna group (0, 1, 1, 0) */ | 162 ap9x_pci_setup_wmac_gpio(1, (0xf << 6), (0x6 << 6)); This should restore the range and throughput of the 2.4GHz radio on all the derived wndr3700 variants and versions with the AR7161 SoC. A special case is the 5GHz radio. The original wndr3700(v1) will benefit from this change. However the wndr3700v2 and later revisions were unaffected by the missing bits, as there is no demultiplexer present in the later designs. This patch uses gpio-hogs within the device-tree for all wndr3700/wndr3800/wndrmac variants. Notes: Based on the PCB pictures, the WNDR3700(v1) really had eight independent antennae. Four antennae for each radio and all of those were printed on the circut board. The WNDR3700v2 and later have just six antennae. Four of those are printed on the circuit board and serve the 2.4GHz radio. Whereas the remaining two are special 5GHz Rayspan Patch Antennae which are directly connected to the 5GHz radio. Hannu Nyman dug pretty deep and unearthed a treasure of information regarding the history of how these values came to be in the OpenWrt archives: <https://dev.archive.openwrt.org/ticket/6533.html>. Mark Mentovai came across the fixed antenna group when he was looking into the driver: fixed_antenna_group 1, (0, 1, 0, 1) fixed_antenna_group 2, (0, 1, 1, 0) fixed_antenna_group 3, (1, 0, 0, 1) fixed_antenna_group 4, (1, 0, 1, 0) Fixes: FS#3088 Reported-by: Luca Bensi Reported-by: Maciej Mazur Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Debugged-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 61307544d1f1ab81a2eb3a200164456c59308d81)
* ath79: add support for TP-Link TL-WR802N V1 and V2Lech Perczak2020-06-036-2/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - SoC: Qualcomm Atheros QCA9533 (560 MHz, MIPS 24Kc) - RAM: 32 MiB - Storage: 4 MiB of Flash on board - Wireless: Built into QCA9533 (Honey Bee), PHY modes b/g/n - Ethernet: 1x100M (port0) Installation through OEM Web Interface: - Connect to TL-WR802N by Ethernet or Wi-Fi - Go to web interface: [V1] http://192.168.0.1 [V2] http://192.168.0.254 Default user is "admin" & password is "admin". On V2, there is no DHCP server running by default, so remember to set IP manually. - Go to "System Tools -> Firmware Upgrade" - Browse for firmware: [V1] "*.factory.bin" [V2] "*.factory-us.bin" or "*.factory-eu.bin" for eu model Web interface may complain if filename is too long. In such case, rename .bin to something shorter. - Click upgrade Installation through tftp: Note: T_OUT, T_IN and GND on the board must be connected to USB TTL Serial Configuration 115200 8n1 - Boot the TL-WR802N - When "Autobooting in 1 seconds" appears type "tpl" followed by enter - Connect to the board Ethernet port (IPADDR: 192.168.1.1, ServerIP: 192.168.1.10) - tftpboot 0x80000000 <Firmware Image Name> - Record the result of "printenv bootcmd" - Enter "erase <Result of 'printenv bootcmd'> +0x3c0000" (e.g erase 0x9f020000 +0x3c0000) - Enter "cp.b 0x80000000 <Result of 'printenv bootcmd'> 0x3c0000" (e.g cp.b 0x80000000 0x9f020000 0x3c0000) - Enter "bootm <Result of 'printenv bootcmd'>" (e.g bootm 0x9f020000) Notes: When porting from ar71xx target to ath79, I found out that on V2, reset button is on GPIO12 and active low, instead of GPIO11 and active high. By cross-flashing V1 firmware to V2, I confirmed the same is true for V1. Also according to manual of V1, this one also has green LED instead of blue - both of those issues were fixed accordingly. The MAC address assignment has been checked with OEM firmware. Installation manual based on ar71xx support by Thomas Roberts Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [slightly adjust commit message, add MAC address comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 7e513136c63108bf55b38be4d2b65aa00b0d2b26)
* ath79: update WA/XC devices UBNT_VERSION to 8.5.3Roger Pueyo Centelles2020-06-031-2/+2
| | | | | | | | | | | | | | | Ubiquiti WA devices with newer hw version 2011K require UBNT_VERSION to be at least 8.5.3, otherwise the image is rejected: New ver: WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3 Versions: New(525568) 8.5.0, Required(525571) 8.5.3 Invalid version 'WA.ar934x.v8.5.0-42.OpenWrt-r10947-65030d81f3' For consistency, also increase version number for XC devices. Tested-by: Pedro <pedrowrt@cas.cat> Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (cherry picked from commit 95caa3436d98dac3709e550765f3f86d11a99782)
* ath79: fix LEDs for GL.inet GL-AR150Adrian Schmutzler2020-06-032-12/+10
| | | | | | | | | | | | | | | | | | Since the wireless LED was used for boot and set up with a DT trigger, the WiFi indication hasn't worked on ath79 at all. In addition, a look into the manual revealed that the OEM configuration is as follows: LED 1 (green): power LED 2 (green): configurable LED 3 (red): wireless So, let's just keep the WiFi trigger and convert the rest to its "intended" use. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 705fe43522c756962589b360141d4c398363ce1c)
* ath79: add support for TP-Link TL-WA901ND v4 and v5Adrian Schmutzler2020-05-208-69/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA901ND v4 and v5 from ar71xx to ath79. They are similar to the TP9343-based TL-WR940N v3/v4 and TL-WR941ND v6. Specifications: SoC: TP9343 Flash/RAM: 4/32 MiB CPU: 750 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. Flash instruction (TFTP): 1. Set PC to fixed ip address 192.168.0.66 2. Download *-factory.bin image and rename it to * (see below) 3. Start a tftp server with the image file 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. * The image name for TFTP recovery is wa901ndv4_tp_recovery.bin for both variants. In ar71xx, a MAC address with offset 1 was used for ethernet port. That's probably wrong, but this commit sticks to it until we know the correct value. Like in ar71xx, this builds the default factory.bin with EU country code. Thanks to Leonardo Weiss for testing on the v5. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 4a61a88f9006f70444e00699f76551c75f73c14e)
* ath79: add support for TP-Link TL-WA701ND/730RE/801ND/901ND v1Adrian Schmutzler2020-05-208-1/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the various clones of the TL-WA830RE recently supported in fb99ac6807f2 ("ath79: add support for TP-Link TL-WA830RE v1"): - tplink,tl-wa701nd-v1 - tplink,tl-wa730re-v1 - tplink,tl-wa801nd-v1 - tplink,tl-wa830re-v1 (already supported) - tplink,tl-wa901nd-v1 Since these devices are 100%-clones in ar71xx, this patch adds all of them without run-testing (as this has been done for TL-WA830RE v1). Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-waxxxxx-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported from commit 2f1cc5c3d5e35d6aa76e794e3d5b4f5856cd38bc)
* ath79: add support for TP-Link TL-WR940N v6Adrian Schmutzler2020-05-204-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TL-WR940N v6 is similar to v3/v4, it just has different LEDs and MAC address assignment. Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet The use of LEDs is based on ar71xx, so blue LED is used for WAN and orange LED for diag (boot/failsafe/etc.). 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 wr940nv6_tp_recovery.bin 3. Start a tftp server with the image file 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. Thanks to Manuel Kock for reviewing and testing this patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Manuel Kock <github.web@manu.li> (backported from commit fbd00bb8d406a0ace7ea9c49a79cbad2418689a5)
* ath79: add support for TP-Link TL-WA830RE v1Christian Buschau2020-05-206-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA830RE v1 range extender from ar71xx to ath79. Specifications: - SOC: Atheros AR7240 - CPU: 400MHz - Flash: 4 MiB (Spansion S25FL032P) - RAM: 32 MiB (Zentel A3S56D40FTP-G5) - WLAN: Atheros AR9280 bgn 2x2 - Ethernet: 1 port (100M) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftpboot 0x80000000 \ openwrt-ath79-tiny-tplink_tl-wa830re-v1-squashfs-factory.bin > erase 0x9f020000 +0x3c0000 > cp.b 0x80000000 0x9f020000 0x3c0000 > bootm 0x9f020000 - flash factory image from OEM WebUI - sysupgrade from ar71xx image The device seems to be a clone of the following devices not yet added to ath79: - tl-wa701nd-v1 - tl-wa730re-v1 - tl-wa801nd-v1 - tl-wa901nd-v1 Signed-off-by: Christian Buschau <christian.buschau@mailbox.org> [make use of ar7240_tplink.dtsi, add note about clones] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit fb99ac6807f29eb5fe50271eff711e7415038731)
* ath79: reorganize DTSI for ar7240 TP-Link devicesAdrian Schmutzler2020-05-208-46/+57
| | | | | | | | | | | | | | | | | The current set of TP-Link devices with ar7240 SoC all share the same DTSI file. As the latter is very similar to the definition required for the to-be-supported TP-Link TL-WA devices with ar7240, this patch splits the definitions into a shared part for all TP-Link devices (ar7240_tplink.dtsi) and a file containing the specific setup for the present TL-WR devices (ar7240_tplink_tl-wr.dtsi), equivalent to the former ar7240_tplink_tl-wr74xn-v1.dtsi. While at it, remove unused firmware partition label and rename pinmux_switch_led_pins. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 273e00c4a506c076dddfc51c3c00d4523496f5f4)
* ath79: migrate TP-Link TL-MR3420v2 to ath79Lim Guo Wei2020-05-204-20/+226
| | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: ar9341 - RAM: 32M - Flash: 4M - Ethernet: 5x FE ports - WiFi: ar9341-wmac Flash instruction: Upload generated factory firmware on vendor's web interface. This changes the key assignment compared to ar71xx support of this device, since of the two keys on the device one is used as combined Reset/WPS and the second one as WiFi on/off button. Despite, the reset button required GPIO_ACTIVE_HIGH to work correctly. Signed-off-by: Lim Guo Wei <limguowei@gmail.com> [redo commit message] Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (backported from commit e7ab1b517397fdf6613f4682b7a752649841f7cd) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP9343-based TP-Link TL-WR94x devicesAdrian Schmutzler2020-05-208-0/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for several TP-Link devices based on TP9343 ("a QCA9561 without PCIe and USB"): - TL-WR940N v3 - TL-WR940N v4 - TL-WR941ND v6 The devices are only different concerning LEDs and MAC address assignment. All TL-WR940 are with non-detachable antennas (N), all TL-WR941 devices are with detachable antennas (ND). Specification: - 750 MHz CPU - 32 MB of RAM - 4 MB of FLASH - 2.4 GHz WiFi - 4x 10/100 Mbps Ethernet 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 * (see below) 3. Start a tftp server with the image file 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. * TFTP image names: 940 v3: wr941ndv6_tp_recovery.bin 940 v4: wr940nv4_tp_recovery.bin 941 v6: wr941ndv6_tp_recovery.bin Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (backported picked from commit c02b9818a51ab189be11218e626e9cad2c21ec94)
* ath79: dts: add missing 'serial0' alias for TP-Link TL-MR3040v2Lech Perczak2020-05-111-0/+1
| | | | | | | | | Out of all devices currently supported based on AR9331 chipset, this one had the 'serial0' alias missing. Add it to fix setting of /dev/console and login shell on the onboard UART. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> (cherry picked from commit 94f344997769a9a18e2d73574d9d17785828955d)
* ath79: indicate boot/failsafe/upgrade for NanoBeam/Nanostation ACAdrian Schmutzler2020-05-042-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> (cherry picked from commit 80a094aaf3247059846e7d857c236b4fa9e497c7)
* ath79: add SUPPORTED_DEVICES based on ar71xx for some devicesAdrian Schmutzler2020-05-042-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> (cherry picked from commit 522f6b7eee479768dd7851e83c4530c3329b9f53)
* kernel: bump 4.14 to 4.14.178Petr Štetiar2020-05-042-6/+6
| | | | | | | | | | | | | | Refreshed all patches and removed upstreamed: oxnas/001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch oxnas/002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch Fixes: CVE-2020-12114 and CVE-2020-11669 Runtime-tested on: qemu-x86-64 Compile-tested on: ath79/generic, x86/64, imx6 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* kernel: bump 4.14 to 4.14.176Koen Vandeputte2020-04-161-1/+1
| | | | | | | | | | | | | | | | | | | Refreshed all patches. Remove upstreamed: - 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch - 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch - 003-ARM-dts-oxnas-Fix-clear-mask-property.patch Fixes: - CVE-2020-8647 - CVE-2020-8648 (potentially) - CVE-2020-8649 Compile-tested on: cns3xxx, octeontx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* 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> (cherry picked from commit 508462a399c8a68fdcdf599a1aa17441bdaad20b)
* ath79: add support for TP-Link TL-WDR4310 v1Adrian Schmutzler2020-03-305-1/+23
| | | | | | | | | | 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> (cherry picked from commit 676ca94c3ca5421c7176d67a211fa29b1bb2e219)
* ath79: add support for TP-Link TL-WA860RE v1Adrian Schmutzler2020-03-274-1/+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> (cherry picked from commit 385f4868bc58b04e465db2fbcfce848a75009a74)
* ath79: add support for TP-Link TL-WA850RE v1Adrian Schmutzler2020-03-275-0/+180
| | | | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA850RE 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) 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> (cherry picked from commit 6eaea3a8ba6154674058396c728494aa911ed7f1)
* ath79: add support for TP-Link WDR3500 v1Adrian Schmutzler2020-03-206-132/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: SoC: AR9344 CPU: 560 MHz Flash: 8 MiB RAM: 128 MiB WiFi: Atheros AR9340 2.4GHz 802.11bgn Atheros AR9300 5GHz 802.11an Ethernet: AR934X built-in switch, WAN on separate physical interface USB: 1x 2.0 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 wdr3500v1_tp_recovery.bin 3. Start a tftp server with the image file 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. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [removed stray newline] Signed-off-by: David Bauer <mail@david-bauer.net> (backported from commit fbbb4eb8b41d59b38f41fe382c6e4108a36aa909) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link Archer C60 v3Adrian Schmutzler2020-03-208-12/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit 646d95c374072598fab9e949ef4425177c5c7960)
* ath79: add support for TP-Link TL-WR740N v5Jun Su2020-03-144-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the TP-Link TL-WR740N v5, a clone of the v4 only with a different TPLINK_HWID. It was already supported in ar71xx as well. Specifications: SOC: Atheros AR9331 CPU: 400MHz Flash: 4 MiB RAM: 32 MiB WLAN: Atheros AR9330 bgn Ethernet: 5 ports (100M) Flashing instructions: - Flash factory image from OEM WebUI: openwrt-ath79-tiny-tplink_tl-wr740n-v5-squashfs-factory.bin - Sysupgrade from ar71xx image: openwrt-ath79-tiny-tplink_tl-wr740n-v5-squashfs-sysupgrade.bin Signed-off-by: Jun Su <howard0su@gmail.com> [commit title/message facelift, backport for 19.07] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit b9f4f1f97aeeec65a872c4c5b1a0528a69d16d7b)
* ath79: fix port order on TP-Link Archer C60 v1/v2Adrian Schmutzler2020-03-141-6/+2
| | | | | | | | | | | | The labels on the LAN ports of the TP-Link Archer C60 v1/v2 are actually inverted compared to the ports of the internal switch. Add this information to 02_network. This is the same for to-be-supported v3 of this device. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit b054729899560aa9faea594dd7df573883f0cf3f)
* ath79: fix swapped LAN/WAN MAC address for Archer C60 v1/v2Adrian Schmutzler2020-03-141-1/+1
| | | | | | | | | | | | | | | | | The MAC addresses for lan/wan are swapped compared to the vendor firmware. This adjusts to vendor configuration, which is: lan *:7b label wan *:7c label+1 2.4g *:7b label 5g *:7a label-1 Only one address is stored in <&mac 0x8>, corresponding to the label. This has been checked on revisions v1, v2 and v3. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 88aead0a665dd349af4fb8afcfe1a16cf90515ae)
* ar71xx/ath79: ew-dorin, fix the trigger level for WPS buttonCatrinel Catrinescu2020-03-111-1/+1
| | | | | | | | | | Because the WPS button had the wrong trigger level, the failsafe mode was triggered quite often, after this commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=27f3f493de Signed-off-by: Catrinel Catrinescu <cc@80211.de> (cherry picked from commit 3e03b7ac4ada4966d058871d0a1f67f1f0f408d4)
* ath79: add missing reset-gpios for NanoStation Loco M (XW)Roger Pueyo Centelles2020-02-261-0/+1
| | | | | | | | | When porting support from ar71xx to ath79, the reset-gpios option was missed. Due to a hardware bug, this would eventually leave the devices with RX-deaf Ethernet PHY. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (cherry picked from commit 6613a7f5cc8e1527671128d9479b3de78f7b4cdd)
* ath79: add support for Ubiquiti NanoStation Loco M (XW)Roger Pueyo Centelles2020-02-264-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the NanoStation Loco M2/M5 XW devices on the ath79 target (support was long ago available on ar71xx). Specifications: - AR9342 SoC @ 535 MHz - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - AR8032 switch - 2T2R 5 GHz radio, 22 dBm - 13 dBi built-in antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via TFTP: - 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_nanostation-loco-m-xw-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (backported from commit 633c4304ad42d18d180ba65a264ba668de445d91) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 4.14 to 4.14.171Koen Vandeputte2020-02-241-1/+1
| | | | | | | | | | | | Refreshed all patches. Fixes: - CVE-2013-1798 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: ar934x: use reset for usb-phy-analogJohann Neuhauser2020-02-231-2/+2
| | | | | | | | | | | | | | This was already available on ar71xx, but is missing on ath79. This solves the slow usb speed on TP-Link WDR3600/WDR4300 and similar, as reported in Flyspray [0], OpenWRT Forum [1] and GitHub PR [2]. [0] https://bugs.openwrt.org/index.php?do=details&task_id=2567 [1] https://forum.openwrt.org/t/usb-wdr4300-low-speed-on-external-storage/46794 [2] https://github.com/openwrt/openwrt/pull/964 Tested-By: Lech Perczak <lech.perczak@gmail.com> [TL-WDR4300] Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de> (cherry picked from commit bda6b6144dbe3e12d128b500821799ef472de4cb)
* ath79: phy-ar7200-usb: adapt old behavior of arch/mips/ath79/dev-usb.cJohann Neuhauser2020-02-231-6/+18
| | | | | | | | | | | | | | | | | [ Upstream commit 6cca6fffa06b1996f9bcc280f766e8ba4fa97d45 ] Do not put usb-phy into reset if clearing the usb-phy reset or setting the suspend_override has failed. Reorder (de)asserts like in arch/mips/ath79/dev-usb.c. Add an optional reset_control "usb-phy-analog", which is needed for ar934x SoCs like in the old mach-driver arch/mips/ath79/dev-usb.c. Tested-By: Lech Perczak <lech.perczak@gmail.com> [TL-WDR4300] Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de> [added reference to upstream commit, Tested-by] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* Revert "ath79: add support for Ubiquiti NanoStation Loco M (XW)"Adrian Schmutzler2020-02-224-39/+0
| | | | | | | | This reverts commit 21bf718b8c3b0fe1f13807aa5db16a2fb4f48120. Until the mdio-reset is solved, this is not ready for stable release. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti NanoStation Loco M (XW)Roger Pueyo Centelles2020-02-224-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the NanoStation Loco M2/M5 XW devices on the ath79 target (support was long ago available on ar71xx). Specifications: - AR9342 SoC @ 535 MHz - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - AR8032 switch - 2T2R 5 GHz radio, 22 dBm - 13 dBi built-in antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via TFTP: - 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_nanostation-loco-m-xw-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> (backported from commit 633c4304ad42d18d180ba65a264ba668de445d91) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti Picostation M (XM)Adrian Schmutzler2020-02-215-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Ubiquiti Picostation M (XM), which has the same board/LEDs as the Bullet M XM, but different case and antennas. Specifications: - AR7241 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - External antenna: 5 dBi (USA), 2 dBi (EU) - 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 NanoStation 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_picostation-m-squashfs-factory.bin Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 6fdaf16dd0623db1a324d33fdf0bc1654365ee62)
* ath79: add support for Ubiquiti Nanostation Loco M (XM)Sven Roederer2020-02-215-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Ubiquiti Nanostation Loco M (XM), which has the same board/LEDs as the Bullet M XM, but different case and antennas. Specifications: - AR7241 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - NS Loco M2: built-in antenna: 8 dBi; AR9287 - NS Loco M5: built-in antenna: 13 dBi; 2T2R 5 GHz radio - 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. Note that only certain firmware versions accept unsigned images. Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other NanoStation 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_nanostation-loco-m-squashfs-factory.bin Tested on NanoStation Loco M2. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de> Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit b56bcfe3be40493daecf13a4080920de2994ff54)
* ath79: add gpio4 pinmux on TL-WR841N/ND v8, WR842N v2, MR3420 v2Adrian Schmutzler2020-02-212-8/+16
| | | | | | | | | | | | | | | | | | | | | | | This adds a pinmux to the shared DTSI for TP-Link TL-WR841N/ND v8, TL-WR842N v2 and TL-MR3420 v2. It is supposed to be the equivalent of: /* config gpio4 as normal gpio function */ ath79_gpio_output_select(TL_MR3420V2_GPIO_USB_POWER,AR934X_GPIO_OUT_GPIO); This allows to enable USB power on these devices. While at it, move the jtag_disable_pins to &gpio node and remove the redundant status=okay there. Tested on TP-Link TL-WR842N v2. Fixes: FS#2753 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Armin Fuerst <armin@fuerst.priv.at> [backport: change individual DTS files, no mr3420-v2 present] (backported from commit 18c95c9d6ebea5cef1254ee917bff8aba993666d)
* ath79: enable forceless sysupgrade from ar71xx on fritz300eAdrian Schmutzler2020-02-211-0/+1
| | | | | | | | This adds the ar71xx board name to the SUPPORTED_DEVICES on ath79, so forceless sysupgrade on this device becomes possible. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 49ff00db340ea017c266ba37546c71209cfe3e26)
* ath79: add wmac migration for all ar93xx/qca95xx SoCsChuanhong Guo2020-02-111-5/+6
| | | | | | | | | Add migration for all ar71xx device path as well as previously incorrect ath79 path. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (cherry picked from commit d08b5bb344792bb82ccbcf3a0a8d25c79e72f4fe) Tested-by: Lech Perczak <lech.perczak@gmail.com> [TP-Link TL-WDR4300 v1]
* ath79: ar93xx/qca95xx: move gmac/wmac/pcie node out of apb busChuanhong Guo2020-02-115-123/+123
| | | | | | | | | | according to functional block diagram in datasheet, these devices don't belong to apb bus. Move these nodes out to match datasheet description. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> (cherry picked from commit f65501e1c2fee17d61f047cee404ddf5f0caf31a) Tested-by: Lech Perczak <lech.perczak@gmail.com> [TP-Link TL-WDR4300 v1]
* ath79: fix DTS node names for Ubiquiti XW partitionsAdrian Schmutzler2020-02-071-2/+2
| | | | | | | | Some node names were inconsistent with the reg property. Fix it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 1a0d6e1eba57d38c5ab6b0e8468188f09e45079d) [fixed XM->XW in commit title for backport]
* ath79: WNDR3700 v1/v2: make u-boot env partition writableMichal Cieslakiewicz2020-02-072-2/+0
| | | | | | | | Remove read-only flag from U-boot environment partition for Netgear WNDR3700 v1 and v2 so u-boot-envtools can modify data there. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> (cherry picked from commit 6227c8d1bf41739586969c3102897a7ba179114d)
* ath79: fix SUPPORTED_DEVICES not matching ar71xx board namesAdrian Schmutzler2020-01-284-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a script for comparison, this fixes (hopefully) all errors in SUPPORTED_DEVICES for ar71xx->ath79 upgrade. Devices where old string is removed as the device does not exist in ar71xx: - dlink_dir-859-a1 - tplink_archer-a7-v5 - tplink_cpe510-v3 [only in master] Devices where string is changed because it did not match the board name in ar71xx: - tplink_tl-mr3220-v1 - tplink_tl-mr3420-v1 - tplink_tl-wr2543-v1 - tplink_tl-wr741nd-v4 - tplink_tl-wr841-v7 - ubnt_unifiac-mesh - ubnt_unifiac-mesh-pro - ubnt_unifiac-pro For this device, the correct string could not be found, but we could not determine the correct one. Thus, the string is removed for now: - tplink_tl-wr740n-v4 The script for checking this is quite simple (note that newer entries, i.e. ath79->ath79 upgrade, are displayed as missing): newpath=target/linux/ath79/image/ oldpath=target/linux/ar71xx/base-files/lib/ar71xx.sh for s in $(grep -roh "SUPPORTED_DEVICES.*" $newpath | sed 's/SUPPORTED_DEVICES *.= *//'); do found="Missing" grep -q -r "\"$s\"" $oldpath && found="Found" echo "$s: $found." done The errors might be filtered by appending 'grep "Missing"' to the script. Fixes: FS#2751 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 07ce940b77e6aceb095b0a16dda41e190dfc5b87)
* ath79: remove SUPPORTED_DEVICES for TP-Link Archer D50 v1Adrian Schmutzler2020-01-281-1/+0
| | | | | | | | This device has not been supported in ar71xx, so there is no need for an explicit SUPPORTED_DEVICES entry. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 894bdee7563036d6627022d7f292e83241a807a7)
* kernel: bump 4.14 to 4.14.167Koen Vandeputte2020-01-241-1/+1
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: bump 4.14 to 4.14.164Koen Vandeputte2020-01-201-1/+1
| | | | | | | | | Refreshed all patches. Compile-tested on: ar71xx, cns3xxx, imx6 Runtime-tested on: ar71xx, cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: add SUPPORTED_DEVICES for TP-Link TL-WR841N/ND v9 to v12Adrian Schmutzler2020-01-081-0/+4
| | | | | | | In ar71xx, v10 and v12 did not have separate board_name. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 7ed643d2052381bdd0e9680ca964eb87700cbc5e)
* ath79: add support for TP-Link TL-WR841N/ND v12Adrian Schmutzler2020-01-086-23/+48
| | | | | | | | | | | | | | | | | | | | | | | | This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same FCC ID, same TFTP image name...). 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 wr841nv11_tp_recovery.bin (it's really v11, not v12) 3. Start a tftp server with the image file 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. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 8b76c6695b9274e3c12fdf80bcad7dc0c7202585)