This patch adds support for TP-Link Archer A7
Specification:
- SOC: QCA9563
- Flash: 16 MiB (SPI)
- RAM: 128 MiB (DDR2)
- Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN
- Wireless:
- 2.4GHz (bgn) SoC internal
- 5GHz (ac) QCA988x
- USB: 1x USB 2.0 port
- Button: 1x power, 1x reset, 1x wps
- LED: 10x LEDs
- UART: holes in PCB
- Vcc, GND, RX, TX from ethernet port side
- 115200n8
Flash instruction using factory image:
1. Connect the computer to one of the LAN ports of the Archer A7
2. Set the computer IP to 192.168.0.66
3. Start a tftp server with the OpenWrt factory image in the tftp
root directory renamed to ArcherC7v5_tp_recovery.bin
2. Connect power cable to Archer A7, press and hold the reset button
and turn the router on
3. Keep the reset button pressed for ~5 seconds
4. Wait ~150 seconds to complete flashing
Signed-off-by: Karl-Felix Glatzer
---
.../ath79/base-files/etc/board.d/01_leds | 7 +
.../ath79/base-files/etc/board.d/02_network | 4 +
.../etc/hotplug.d/firmware/11-ath10k-caldata | 1 +
.../ath79/dts/qca9563_tplink_archer-a7-v5.dts | 255 ++
target/linux/ath79/image/common-tp-link.mk| 9 +
target/linux/ath79/image/generic-tp-link.mk | 16 ++
tools/firmware-utils/src/tplink-safeloader.c | 46 +++-
7 files changed, 337 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds
b/target/linux/ath79/base-files/etc/board.d/01_leds
index f04eb7f5c6..4ddf04ef84 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -57,6 +57,13 @@ tplink,tl-mr3020-v1|\
tplink,tl-mr3040-v2)
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
;;
+tplink,archer-a7-v5)
+ ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
+ ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0"
"0x04"
+ ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0"
"0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0"
"0x10"
+ ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0"
"0x20"
+ ;;
tplink,tl-wr1043nd-v4)
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0"
"0x10"
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network
b/target/linux/ath79/base-files/etc/board.d/02_network
index 5f02c5769a..7c7c9e14e1 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -107,6 +107,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "3:lan:1" "5:lan:2" "4:wan"
;;
+ tplink,archer-a7-v5)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
+ ;;
tplink,archer-c7-v1|\
tplink,archer-c7-v2|\
tplink,tl-wdr4900-v2)
diff --git
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index dfe2d3ef31..6001df07bb 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -100,6 +100,7 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat
/sys/class/net/eth0/address) +16)
;;
+ tplink,archer-a7-v5|\
tplink,archer-c7-v2)
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat
/sys/class/net/eth1/address) -1)
diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
new file mode 100644
index 00..c62cb63b0d
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
@@ -0,0 +1,255 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include
+#include
+
+#include "qca956x.dtsi"
+
+/ {
+ compatible = "tplink,archer-a7-v5", "qca,qca9563";
+ model = "TP-Link Archer A7 Version 5";
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+
+ aliases {
+ led-status = &system;
+ };
+
+ gpio_leds: leds {
+ compatible = "gpio-leds";
+
+ system: system {
+ label = "tp-link:green:system";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ led_wlan2g: wlan2g {
+ label = "tp-link:green:wlan2g";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+