From 36d41405174ef9475b28abab2c000d9021e71459 Mon Sep 17 00:00:00 2001 From: Christian Buschau Date: Wed, 5 Feb 2020 22:05:39 +0100 Subject: [PATCH] ath79: add support for TP-Link TL-WA830RE v1 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 [make use of ar7240_tplink.dtsi, add note about clones] Signed-off-by: Adrian Schmutzler (cherry picked from commit fb99ac6807f29eb5fe50271eff711e7415038731) --- .../linux/ath79/base-files/etc/board.d/01_leds | 1 + .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../linux/ath79/dts/ar7240_tplink_tl-wa.dtsi | 18 ++++++++++++++++++ .../ath79/dts/ar7240_tplink_tl-wa830re-v1.dts | 9 +++++++++ target/linux/ath79/image/tiny-tp-link.mk | 9 +++++++++ 6 files changed, 39 insertions(+) create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi create mode 100644 target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.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 9a4e9593fe..02d891fe2e 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -175,6 +175,7 @@ tplink,re450-v2) ;; tplink,tl-mr3020-v1|\ tplink,tl-mr3040-v2|\ +tplink,tl-wa830re-v1|\ tplink,tl-wa860re-v1) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ;; 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 c48111d5a1..84a316a14a 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -31,6 +31,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-wa860re-v1|\ tplink,tl-wa901nd-v2|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index d85e90f106..65ba273d3e 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -139,6 +139,7 @@ case "$FIRMWARE" in ;; buffalo,whr-g301n|\ buffalo,wzr-hp-g302h-a1a0|\ + tplink,tl-wa830re-v1|\ tplink,tl-wr841-v5|\ tplink,tl-wr941-v4) ath9k_eeprom_extract "art" 4096 3768 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 index 0000000000..ac5a4d5ee9 --- /dev/null +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi @@ -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>; + }; +}; + +ð1 { + 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 index 0000000000..f74ddc04ed --- /dev/null +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa830re-v1.dts @@ -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"; +}; diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index da5fb53d21..be0ca1a4c9 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -61,6 +61,15 @@ define Device/tplink_tl-mr3420-v2 endef TARGET_DEVICES += tplink_tl-mr3420-v2 +define Device/tplink_tl-wa830re-v1 + $(Device/tplink-4m) + ATH_SOC := ar7240 + DEVICE_TITLE := TP-Link TL-WA830RE v1 + TPLINK_HWID := 0x08300010 + SUPPORTED_DEVICES += tl-wa901nd +endef +TARGET_DEVICES += tplink_tl-wa830re-v1 + define Device/tplink_tl-wa850re-v1 $(Device/tplink-4mlzma) ATH_SOC := ar9341 -- 2.25.1