ath79: add support for TP-Link TL-WA830RE v1
authorChristian Buschau <christian.buschau@mailbox.org>
Wed, 5 Feb 2020 21:05:39 +0000 (22:05 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 11 Feb 2020 13:31:05 +0000 (14:31 +0100)
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>
target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi [new file with mode: 0644]
target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.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
target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
new file mode 100644 (file)
index 0000000..ac5a4d5
--- /dev/null
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar7240_tplink.dtsi"
+
+&leds {
+       lan {
+               label = "tp-link:green:lan";
+               gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+       };
+};
+
+&eth1 {
+       mtd-mac-address = <&uboot 0x1fc00>;
+};
+
+&ath9k {
+       compatible = "pci168c,002a";
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts
new file mode 100644 (file)
index 0000000..f74ddc0
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_tplink_tl-wa.dtsi"
+
+/ {
+       model = "TP-Link TL-WA830RE v1";
+       compatible = "tplink,tl-wa830re-v1", "qca,ar7240";
+};
index 2107e47cc3e543b4765f9fb6423ce9365a773471..787ac055ba83912d3e11b4db8afff411b2d77ef9 100644 (file)
@@ -66,6 +66,16 @@ define Device/tplink_tl-mr3420-v2
 endef
 TARGET_DEVICES += tplink_tl-mr3420-v2
 
+define Device/tplink_tl-wa830re-v1
+  $(Device/tplink-4m)
+  SOC := ar7240
+  DEVICE_MODEL := TL-WA830RE
+  DEVICE_VARIANT := v1
+  TPLINK_HWID := 0x08300010
+  SUPPORTED_DEVICES += tl-wa901nd
+endef
+TARGET_DEVICES += tplink_tl-wa830re-v1
+
 define Device/tplink_tl-wa850re-v1
   $(Device/tplink-4mlzma)
   SOC := ar9341
index 75de6f3aade717e2fcb65444d1d18c9e3815a92d..43efc46145fc47430d9ef5f6f11a550377a16ade 100755 (executable)
@@ -41,7 +41,8 @@ on,n150r)
        ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
        ;;
 tplink,tl-mr3020-v1|\
-tplink,tl-mr3040-v2)
+tplink,tl-mr3040-v2|\
+tplink,tl-wa830re-v1)
        ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
        ;;
 tplink,tl-mr3420-v2|\
index 56200de59e1dde86bd54c7f261983d2a5e458962..c8269599a480d9ec493be1562386491545832922 100755 (executable)
@@ -32,6 +32,7 @@ ath79_setup_interfaces()
        tplink,tl-mr10u|\
        tplink,tl-mr3020-v1|\
        tplink,tl-mr3040-v2|\
+       tplink,tl-wa830re-v1|\
        tplink,tl-wa850re-v1|\
        tplink,tl-wa850re-v2|\
        tplink,tl-wa901nd-v2|\
index 5952a4019560b31e12827bda19bb7151df8fbbe9..0965a487439493d0947342031de4fe7038e236c0 100644 (file)
@@ -10,6 +10,7 @@ case "$FIRMWARE" in
 "ath9k-eeprom-pci-0000:00:00.0.bin")
        case $board in
        buffalo,whr-g301n|\
+       tplink,tl-wa830re-v1|\
        tplink,tl-wr841-v5|\
        tplink,tl-wr941-v4)
                caldata_extract "art" 0x1000 0xeb8