ath79: fix support for TL-WR740N/WR741N v4
authorChuanhong Guo <gch981213@gmail.com>
Thu, 2 Aug 2018 07:14:10 +0000 (15:14 +0800)
committerMathias Kresin <dev@kresin.me>
Mon, 6 Aug 2018 05:31:54 +0000 (07:31 +0200)
1. Swap eth0/eth1
 Both devices are using AR9331, the builtin switch on AR9331 is
 connected to gmac1 and gmac1 is named as eth1 in ath79.
 PS: gmac1 is eth0 and gmac0 is eth1 in ar71xx because of the
 reversed initialization order.
2. Fix the incorrect compatible string in dts

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/base-files/etc/board.d/01_leds
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/dts/ar9331_tl-wr740nd-v4.dts
target/linux/ath79/dts/ar9331_tl-wr741nd-v4.dts

index 6f1bdc6eaf4006ef5cc3de1d43c0a9a688ca6fdb..5cb8e13963af3b5531f6ee913afc837eff3d72f7 100755 (executable)
@@ -64,7 +64,7 @@ case "$board" in
        ;;
 "tplink,tl-wr741nd-v4"|\
 "tplink,tl-wr740nd-v4")
-       ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
+       ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
        ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
        ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
        ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
index 0bc187a24508f72a3ef2af083e007fe378ca41c5..b7c2213d56bf2f931287c4be47c83e3a61839072 100755 (executable)
@@ -85,9 +85,9 @@ ath79_setup_interfaces()
 
        "tplink,tl-wr741nd-v4"|\
        "tplink,tl-wr740nd-v4")
-               ucidef_set_interfaces_wan "eth1"
+               ucidef_set_interfaces_wan "eth0"
                ucidef_add_switch "switch0" \
-                       "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
+                       "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
                ;;
        "tplink,tl-wr841n-v9")
                ucidef_set_interface_wan "eth0"
index b0029b88b6f4b12025a3cd9076666b22c578ab16..583716308dc0cd8dbf0e1ff0d1038d4975e13bfb 100644 (file)
@@ -5,5 +5,5 @@
 
 / {
        model = "TP-Link TL-WR740N/ND v4";
-       compatible = "tplink,tl-wr740n-v4";
+       compatible = "tplink,tl-wr740nd-v4";
 };
index 118831b4d24c0a5612b2610d2d3aa8419d7afcd5..ef68cc7d22be88086668d662d5211ffee4cc47eb 100644 (file)
@@ -5,5 +5,5 @@
 
 / {
        model = "TP-Link TL-WR741N/ND v4";
-       compatible = "tplink,tl-wr741n-v4";
+       compatible = "tplink,tl-wr741nd-v4";
 };