ath79: add support for TP-Link TL-WR841N/ND v12
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Mon, 22 Jul 2019 15:36:48 +0000 (17:36 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 8 Jan 2020 17:35:34 +0000 (18:35 +0100)
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same
FCC ID, same TFTP image name...).

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.0.66
2. Download *-factory.bin image and rename it to wr841nv11_tp_recovery.bin
   (it's really v11, not v12)
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Press and hold Reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time
the firmware should be transferred from the tftp server
8. Wait ~30 second to complete recovery.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 8b76c6695b9274e3c12fdf80bcad7dc0c7202585)

target/linux/ath79/base-files/etc/board.d/01_leds
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts
target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi [new file with mode: 0644]
target/linux/ath79/dts/qca9533_tplink_tl-wr841-v12.dts [new file with mode: 0644]
target/linux/ath79/image/tiny-tp-link.mk

index 78d48daf73b11680fa60c2263522ca3c2f8bfe9c..da092a5afbe99463f05dcc9d2132e111daece5dd 100755 (executable)
@@ -130,6 +130,7 @@ tplink,archer-c25-v1|\
 tplink,tl-wr841-v9|\
 tplink,tl-wr841-v10|\
 tplink,tl-wr841-v11|\
+tplink,tl-wr841-v12|\
 tplink,tl-wr842n-v3)
        ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
        ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
index b511aa0acd6e7bbd1db25b5c030b1d41f8ebcfe3..2e772865404d356f4357b27f9fb5a86d8a49be15 100755 (executable)
@@ -77,6 +77,7 @@ ath79_setup_interfaces()
        tplink,tl-wr841-v9|\
        tplink,tl-wr841-v10|\
        tplink,tl-wr841-v11|\
+       tplink,tl-wr841-v12|\
        tplink,tl-wr842n-v1|\
        tplink,tl-wr842n-v3|\
        ubnt,airrouter)
index 29fca8b3a9e8e4fa4bb9cce11033a566e3ec8a17..6c91757ceb9ef7bf17ee903568bb1424bf074f29 100644 (file)
@@ -1,31 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
-#include "qca9533_tplink_tl-wr841.dtsi"
+#include "qca9533_tplink_tl-wr841-v11.dtsi"
 
 / {
        compatible = "tplink,tl-wr841-v11", "qca,qca9533";
        model = "TP-Link TL-WR841N/ND v11";
-
-       aliases {
-               led-boot = &system_led;
-               led-failsafe = &system_led;
-               led-running = &system_led;
-               led-upgrade = &system_led;
-       };
-};
-
-&gpio_leds {
-       system_led: system {
-               label = "tp-link:green:system";
-               gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
-       };
-
-       wan_orange {
-               label = "tp-link:orange:wan";
-               gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
-       };
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi
new file mode 100644 (file)
index 0000000..8ee7d14
--- /dev/null
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "qca9533_tplink_tl-wr841.dtsi"
+
+/ {
+       aliases {
+               led-boot = &system_led;
+               led-failsafe = &system_led;
+               led-running = &system_led;
+               led-upgrade = &system_led;
+       };
+};
+
+&gpio_leds {
+       system_led: system {
+               label = "tp-link:green:system";
+               gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+       };
+
+       wan_orange {
+               label = "tp-link:orange:wan";
+               gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+       };
+};
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v12.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v12.dts
new file mode 100644 (file)
index 0000000..1b7db61
--- /dev/null
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "qca9533_tplink_tl-wr841-v11.dtsi"
+
+/ {
+       compatible = "tplink,tl-wr841-v12", "qca,qca9533";
+       model = "TP-Link TL-WR841N/ND v12";
+};
index d8ada5407cdeb747426437d3c805b159395ea74a..ece38f8046a6b73a53f7e57bdcf2c19ccb5c84dc 100644 (file)
@@ -172,6 +172,17 @@ define Device/tplink_tl-wr841-v11
 endef
 TARGET_DEVICES += tplink_tl-wr841-v11
 
+define Device/tplink_tl-wr841-v12
+  $(Device/tplink-4mlzma)
+  ATH_SOC := qca9533
+  DEVICE_TITLE := TP-Link TL-WR841N/ND v12
+  TPLINK_HWID := 0x08410012
+  IMAGES += factory-us.bin factory-eu.bin
+  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
+  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
+endef
+TARGET_DEVICES += tplink_tl-wr841-v12
+
 define Device/tplink_tl-wr941-v2
   $(Device/tplink-4m)
   ATH_SOC := ar9132