ath79: DO NOT MERGE: add a custom WR741N v1/v2 8Mb variant
authorZoltan HERPAI <[email protected]>
Tue, 8 Jun 2021 11:38:18 +0000 (13:38 +0200)
committerZoltan HERPAI <[email protected]>
Sat, 30 Oct 2021 19:54:22 +0000 (21:54 +0200)
Device is a WR741N v2.4 (AR7240) with the flash replaced with
an 8Mb chip. ART partition is moved to the end (0x7f0000). Also,
the commit adds the 741-related code back to the generic board.d
files.

Signed-off-by: Zoltan HERPAI <[email protected]>
target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1-8m.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/01_leds
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
target/linux/ath79/image/generic-tp-link.mk

diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1-8m.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1-8m.dts
new file mode 100644 (file)
index 0000000..2a321c9
--- /dev/null
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar7240_tplink_tl-wr.dtsi"
+
+/ {
+       model = "TP-Link TL-WR741N/ND v1/v2 8Mb custom board";
+       compatible = "tplink,tl-wr741-v1-8m", "qca,ar7240";
+};
+
+/delete-node/ &flash;
+
+&spi {
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <25000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       uboot: partition@0 {
+                               reg = <0x0 0x20000>;
+                               label = "u-boot";
+                               read-only;
+                       };
+
+                       partition@20000 {
+                               reg = <0x20000 0x7d0000>;
+                               label = "firmware";
+                               compatible = "tplink,firmware";
+                       };
+
+                       art: partition@7f0000 {
+                               reg = <0x7f0000 0x10000>;
+                               label = "art";
+                               read-only;
+                       };
+               };
+       };
+};
index af4c3620aa3f70d13968b85dce7afe22a6c1d4c2..adda81d8adb1e6a43573330838ee2f77a3c2c2f7 100644 (file)
@@ -378,6 +378,13 @@ tplink,tl-wpa8630p-v2.0-eu|\
 tplink,tl-wpa8630p-v2.1-eu)
        ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
        ;;
+tplink,tl-wr741-v1-8m)
+       ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
+       ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02"
+       ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04"
+       ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08"
+       ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10"
+       ;;
 tplink,tl-wr842n-v2)
        ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
        ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x04"
index 8add3ad826f4d43ada272a1d025c6ac8eb8ec43c..88db4a9f1b94f34f6ae49163382c66ef896195e4 100644 (file)
@@ -426,6 +426,11 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
                ;;
+       tplink,tl-wr741-v1-8m)
+               ucidef_set_interface_wan "eth0"
+               ucidef_add_switch "switch0" \
+                       "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
+               ;;
        tplink,tl-wr842n-v2|\
        tplink,tl-wr941hp-v1)
                ucidef_set_interface_wan "eth1"
index 3e02b066a98b90f35ed75309306d5c1be8b73547..397619244ee2a0f245296077bb6a298f6aa0f8fd 100644 (file)
@@ -114,6 +114,7 @@ case "$FIRMWARE" in
        netgear,wnr2200-16m|\
        pcs,cap324|\
        tplink,tl-wr2543-v1|\
+       tplink,tl-wr741-v1-8m|\
        tplink,tl-wr842n-v1|\
        ubnt,airrouter|\
        ubnt,bullet-m-ar7240|\
index 363be289c65947e4e3d825682cabb5c369ae2f2d..04c0ad34d966e6864f5493ec85a9ddd9c2cbdd0e 100644 (file)
@@ -755,6 +755,17 @@ define Device/tplink_tl-wr710n-v2.1
 endef
 TARGET_DEVICES += tplink_tl-wr710n-v2.1
 
+define Device/tplink_tl-wr741-v1-8m
+  $(Device/tplink-8m)
+  SOC := ar7240
+  DEVICE_MODEL := TL-WR741N/ND
+  DEVICE_VARIANT := v1/v2 8M
+  TPLINK_HWID := 0x07410001
+  DEVICE_PACKAGES := kmod-owl-loader
+  SUPPORTED_DEVICES += tl-wr741nd
+endef
+TARGET_DEVICES += tplink_tl-wr741-v1-8m
+
 define Device/tplink_tl-wr810n-v1
   $(Device/tplink-8mlzma)
   SOC := qca9531