ramips: add missing WAN LED for Xiaomi Mi Router 4A / 4C
authorShiji Yang <yangshiji66@qq.com>
Sat, 17 Sep 2022 10:50:00 +0000 (18:50 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 23 Oct 2022 21:33:22 +0000 (23:33 +0200)
The blue WAN LED connected to GPIO37 is missing, so re-add it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4.dtsi
target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds

index 0a48c060192166d11bea27bca4616c1125d23f69..ff738a5261382d9c452731b91230ba87e02488e7 100644 (file)
                        label = "yellow:power";
                        gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
                };
+
+               wan {
+                       label = "blue:wan";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+               };
        };
 
        keys {
@@ -93,7 +98,7 @@
 
 &state_default {
        gpio {
-               groups = "gpio", "wdt", "wled_an";
+               groups = "gpio", "refclk", "wdt", "wled_an";
                function = "gpio";
        };
 };
index 0af01d4393272b2ea822184fe1e4c705c8b07276..8a21756225acfe2c9a364b80f89bf94312d7ebf4 100644 (file)
@@ -144,6 +144,13 @@ wavlink,wl-wn578a2)
        ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
        ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
        ;;
+xiaomi,mi-router-4a-100m|\
+xiaomi,mi-router-4a-100m-intl)
+       ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x01"
+       ;;
+xiaomi,mi-router-4c)
+       ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
+       ;;
 zbtlink,zbt-we1226)
        ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
        ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x01"