ath79: add support for TP-Link TL-WA901ND v3
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 15 Apr 2020 11:19:33 +0000 (13:19 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 8 Aug 2020 18:40:48 +0000 (20:40 +0200)
This ports support for the TL-WA901ND v3 from ar71xx to ath79.
Most of the hardware is shared with the TL-WA850/860RE v1 range
extenders. It completes the TL-WA901ND series in ath79.

Specifications:
  Board: AP123 / AR9341
  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.

This has not been tested on device, but port from ar71xx is
straightforward and the device will be disabled by default anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts [new file with mode: 0644]
target/linux/ath79/image/tiny-tp-link.mk
target/linux/ath79/tiny/base-files/etc/board.d/01_leds
target/linux/ath79/tiny/base-files/etc/board.d/02_network

diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts
new file mode 100644 (file)
index 0000000..4abdd60
--- /dev/null
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar9341_tplink_tl-wa.dtsi"
+
+/ {
+       model = "TP-Link TL-WA901ND v3";
+       compatible = "tplink,tl-wa901nd-v3", "qca,ar9341";
+
+       aliases {
+               led-boot = &led_system;
+               led-failsafe = &led_system;
+               led-running = &led_system;
+               led-upgrade = &led_system;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "Reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               lan {
+                       label = "tp-link:green:lan";
+                       gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+               };
+
+               wlan {
+                       label = "tp-link:green:wlan";
+                       gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               qss {
+                       label = "tp-link:green:qss";
+                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+               };
+
+               led_system: system {
+                       label = "tp-link:green:system";
+                       gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
index 0da712c5d4e9fd72d8989b0f5551bb19b7adef9b..c918c6baa682e78b2b1c204fb9a55dc0a5aef1e7 100644 (file)
@@ -191,6 +191,16 @@ define Device/tplink_tl-wa901nd-v2
 endef
 TARGET_DEVICES += tplink_tl-wa901nd-v2
 
+define Device/tplink_tl-wa901nd-v3
+  $(Device/tplink-4mlzma)
+  SOC := ar9341
+  DEVICE_MODEL := TL-WA901ND
+  DEVICE_VARIANT := v3
+  TPLINK_HWID := 0x09010003
+  SUPPORTED_DEVICES += tl-wa901nd-v3
+endef
+TARGET_DEVICES += tplink_tl-wa901nd-v3
+
 define Device/tplink_tl-wa901nd-v4
   $(Device/tplink-4mlzma)
   SOC := tp9343
index ec8e2d60c592657a3073f66477c909d3d8114e47..bc0b15bba5a18e1a2a586542e8e1e0364ca6aa22 100755 (executable)
@@ -50,6 +50,7 @@ tplink,tl-wa801nd-v4|\
 tplink,tl-wa830re-v1|\
 tplink,tl-wa860re-v1|\
 tplink,tl-wa901nd-v1|\
+tplink,tl-wa901nd-v3|\
 tplink,tl-wa901nd-v4|\
 tplink,tl-wa901nd-v5)
        ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
index 87f8d27ec91e830e4e8166229b110925799b0681..cbcdbe9a895c7d8e9f0a9413a936cc4a24099aa9 100755 (executable)
@@ -43,6 +43,7 @@ ath79_setup_interfaces()
        tplink,tl-wa860re-v1|\
        tplink,tl-wa901nd-v1|\
        tplink,tl-wa901nd-v2|\
+       tplink,tl-wa901nd-v3|\
        tplink,tl-wa901nd-v4|\
        tplink,tl-wa901nd-v5|\
        tplink,tl-wr703n|\