ath79: add support for TP-Link Archer A9 v6
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 25 Feb 2022 22:01:10 +0000 (23:01 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 27 Feb 2022 15:54:55 +0000 (16:54 +0100)
commit9c335accfe57f3049850b8fdb684c9e7e5feea82
tree778a2aa45688e0fbb31ed68978b274a577acf79a
parent2d5b596b493bfaeab024d6ecee37d97420c2ac07
ath79: add support for TP-Link Archer A9 v6

TP-Link Archer A9 v6 (FCCID: TE7A9V6) is an AC1900 Wave-2 gigabit home
router based on a combination of Qualcomm QCN5502 (most likely a 4x4:4
version of the QCA9563 WiSOC), QCA9984 and QCA8337N.

The vendor's firmware content reveals that the same device might be
available on the US market under name 'Archer C90 v6'. Due to lack of
access to such hardware, support introduced in this commit was tested
only on the EU version (sold under 'Archer A9 v6' name).

Based on the information on the PL version of the vendor website, this
device has been already phased out and is no longer available.

Specifications:

- Qualcomm QCN5502 (775 MHz)
- 128 MB of RAM (DDR2)
- 16 MB of flash (SPI NOR)
- 5x Gbps Ethernet (Qualcomm QCA8337N over SGMII)
- Wi-Fi:
  - 802.11b/g/n on 2.4 GHz: Qualcomm QCN5502* in 4x4:4 mode
  - 802.11a/n/ac on 5 GHz: Qualcomm QCA9984 in 3x3:3 mode
  - 3x non-detachable, dual-band external antennas (~3.5 dBi for 5 GHz,
    ~2.2 dBi for 2.4 GHz, IPEX/U.FL connectors)
  - 1x internal PCB antenna for 2.4 GHz (~1.8 dBi)
- 1x USB 2.0 Type-A
- 11x LED (4x connected to QCA8337N, 7x connected to QCN5502)
- 2x button (reset, WPS)
- UART (4-pin, 2.54 mm pitch) header on PCB (not populated)
- 1x mechanical power switch
- 1x DC jack (12 V)

  *) unsupported due to missing support for QCN550x in ath9k

UART system serial console notice:

The RX signal of the main SOC's UART on this device is shared with the
WPS button's GPIO. The first-stage U-Boot by default disables the RX,
resulting in a non-functional UART input.
If you press and keep 'ENTER' on the serial console during early
boot-up, the first-stage U-Boot will enable RX input.

Vendor firmware allows password-less access to the system over serial.

Flash instruction (vendor GUI):

1. It is recommended to first upgrade vendor firmware to the latest
   version (1.1.1 Build 20210315 rel.40637 at the time of writing).
2. Use the 'factory' image directly in the vendor's GUI.

Flash instruction (TFTP based recovery in second-stage U-Boot):

1. Rename 'factory' image to 'ArcherA9v6_tp_recovery.bin'
2. Setup a TFTP server on your PC with IP 192.168.0.66/24.
3. Press and hold the reset button for ~5 sec while turning on power.
4. The device will download image, flash it and reboot.

Flash instruction (web based recovery in first-stage U-Boot):

1. Use 'CTRL+C' during power-up to enable CLI in first-stage U-Boot.
2. Connect a PC with IP set to 192.168.0.1 to one of the LAN ports.
3. Issue 'httpd' command and visit http://192.168.0.1 in browser.
4. Use the 'factory' image.

If you would like to restore vendor's firmware, follow one of the
recovery methods described above.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/image/generic-tp-link.mk