From 076be882b0798321f527634d8962686c9431ca6b Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Fri, 27 Nov 2020 16:19:46 -0500 Subject: [PATCH] ath79 : TPE-R1100 / GL.iNet GL-AR150 LED Fixup Fixes issues with LEDs on the TPE-R1100 / GL-AR150 and simliar boards. Based upon upstream : e36bdd5dc5bf48fc0102394736c24a075959bc53 --- .../linux/ath79/base-files/etc/board.d/01_leds | 8 -------- .../linux/ath79/dts/ar9330_glinet_gl-ar150.dts | 18 ++++++++++-------- .../dts/ar9330_thinkpenguin_tpe-r1100.dts | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 24 deletions(-) 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 d6b41e2f1a..3de8959b48 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -74,10 +74,6 @@ etactica,eg200) ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33" ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore" ;; -glinet,gl-ar150) - ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02" - ;; glinet,gl-ar300m-nand|\ glinet,gl-ar300m-nor) ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0" @@ -104,10 +100,6 @@ pcs,cr3000) ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02" ;; -thinkpenguin,tpe-r1100) - ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02" - ;; thinkpenguin,tpe-r1200-nand|\ thinkpenguin,tpe-r1200-nor) ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0" diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index 76f6e80236..c5f559bb36 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -12,28 +12,30 @@ aliases { serial0 = &uart; - led-boot = &wlan; - led-failsafe = &wlan; - led-upgrade = &wlan; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; leds { compatible = "gpio-leds"; - wlan: wlan { + wlan { label = "gl-ar150:orange:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; - lan { - label = "gl-ar150:green:lan"; + configurable { + label = "gl-ar150:green:configurable"; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; - wan { - label = "gl-ar150:green:wan"; + led_power: power { + label = "gl-ar150:green:power"; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + default-state = "on"; }; }; diff --git a/target/linux/ath79/dts/ar9330_thinkpenguin_tpe-r1100.dts b/target/linux/ath79/dts/ar9330_thinkpenguin_tpe-r1100.dts index a1ab1b75f4..45a7ab9a5b 100644 --- a/target/linux/ath79/dts/ar9330_thinkpenguin_tpe-r1100.dts +++ b/target/linux/ath79/dts/ar9330_thinkpenguin_tpe-r1100.dts @@ -12,28 +12,30 @@ aliases { serial0 = &uart; - led-boot = &wlan; - led-failsafe = &wlan; - led-upgrade = &wlan; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; }; leds { compatible = "gpio-leds"; - wlan: wlan { + wlan { label = "gl-ar150:orange:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; - lan { - label = "gl-ar150:green:lan"; + configurable { + label = "gl-ar150:green:configurable"; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; - wan { - label = "gl-ar150:green:wan"; + led_power: power { + label = "gl-ar150:green:power"; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + default-state = "on"; }; }; -- 2.25.1