diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts index ece78ee50ebc56..20099275654a33 100644 --- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts +++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "mt7981.dtsi" +#include + / { model = "Ubiquiti UniFi 6 Plus"; compatible = "ubnt,unifi-6-plus", "mediatek,mt7981"; @@ -35,13 +37,19 @@ leds { compatible = "gpio-leds"; - led_blue: dome-blue { + led_blue: led-0 { label = "blue:dome"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 9 GPIO_ACTIVE_HIGH>; }; - led_white: dome-white { + led_white: led-1 { label = "white:dome"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 34 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts index d39083ffb0d614..701d4e435afda8 100644 --- a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts +++ b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7981.dtsi" @@ -45,13 +46,19 @@ leds { compatible = "gpio-leds"; - led_status_red: led_status_red { + led_status_red: led-0 { label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 3 GPIO_ACTIVE_LOW>; }; - led_status_green: led_status_green { + led_status_green: led-1 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 7 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts index e9c850e85b0172..f11b9842b7ab63 100644 --- a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts +++ b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts @@ -6,6 +6,7 @@ /dts-v1/; #include #include +#include #include "mt7981.dtsi" @@ -51,16 +52,25 @@ green_led: led-0 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 9 GPIO_ACTIVE_LOW>; }; led-1 { label = "blue:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 12 GPIO_ACTIVE_LOW>; }; red_led: led-2 { label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; gpios = <&pio 35 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts index 7975d247b15f2e..4b63b20679136f 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts @@ -1,6 +1,7 @@ // SPDX-License-Identifier: (GPL-2.0 OR MIT) /dts-v1/; +#include #include "mt7981.dtsi" @@ -41,37 +42,55 @@ leds { compatible = "gpio-leds"; - led_status: led@0 { - label = "blue:status"; - gpios = <&pio 10 GPIO_ACTIVE_LOW>; - }; - - led@1 { - label = "blue:internet"; - gpios = <&pio 11 GPIO_ACTIVE_LOW>; - }; - - led@2 { + led-0 { label = "blue:wan"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; gpios = <&pio 5 GPIO_ACTIVE_LOW>; }; - led@3 { - label = "blue:lan"; - gpios = <&pio 9 GPIO_ACTIVE_LOW>; - }; - - led@4 { + led-1 { label = "blue:wifi2"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; gpios = <&pio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; - led@5 { + led-2 { label = "blue:wifi5"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; gpios = <&pio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; + + led-3 { + label = "blue:lan"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + led_status: led-4 { + label = "blue:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + + led-5 { + label = "blue:internet"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <1>; + gpios = <&pio 11 GPIO_ACTIVE_LOW>; + }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts index 028b0e83b72ba0..708e147d6f844b 100644 --- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts +++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts @@ -1,4 +1,5 @@ /dts-v1/; +#include #include "mt7981.dtsi" @@ -39,15 +40,21 @@ leds { compatible = "gpio-leds"; - led_lightblue: led@0 { - label = "blue:run"; - gpios = <&pio 31 GPIO_ACTIVE_LOW>; - }; - - led_white: led@1 { + led_white: led-0 { label = "white:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 30 GPIO_ACTIVE_LOW>; }; + + led_lightblue: led-1 { + label = "blue:run"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + gpios = <&pio 31 GPIO_ACTIVE_LOW>; + }; }; fan_5v: regulator-fan-5v { diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts index 671e1f1839ab49..2bbcfc5f770466 100644 --- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7981.dtsi" @@ -45,13 +46,19 @@ leds { compatible = "gpio-leds"; - led_status_green: green { + led_status_green: led-0 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 4 GPIO_ACTIVE_LOW>; }; - led_status_red: red { + led_status_red: led-1 { label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 5 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts index d897697ef2331e..51a55dc5f5a91b 100644 --- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts +++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7981.dtsi" @@ -45,13 +46,19 @@ leds { compatible = "gpio-leds"; - led_status_red: red { + led_status_red: led-0 { label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 3 GPIO_ACTIVE_LOW>; }; - led_status_green: green { + led_status_green: led-1 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 7 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi index 7ab94f36230c2a..def50f11442de3 100644 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi +++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7981.dtsi" @@ -43,23 +44,35 @@ leds { compatible = "gpio-leds"; - led_system_blue: system_blue { + led_system_blue: led-0 { label = "blue:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 9 GPIO_ACTIVE_LOW>; }; - led_system_yellow: system_yellow { + led_system_yellow: led-1 { label = "yellow:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 10 GPIO_ACTIVE_LOW>; }; - led_network_blue { + led-2 { label = "blue:network"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; gpios = <&pio 11 GPIO_ACTIVE_LOW>; }; - led_network_yellow { + led-3 { label = "yellow:network"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; gpios = <&pio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts index d222cebb4fe83c..4d48d867b250ea 100644 --- a/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts @@ -1,5 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) /dts-v1/; +#include #include "mt7981.dtsi" @@ -33,18 +34,27 @@ leds { compatible = "gpio-leds"; - led_green: led@0 { + led_green: led-0 { label = "green:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 4 GPIO_ACTIVE_HIGH>; }; - led@1 { + led-1 { label = "blue:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 6 GPIO_ACTIVE_HIGH>; }; - led_red: led@2 { + led_red: led-2 { label = "red:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; gpios = <&pio 7 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts index 35a2c30bb45476..e88a702697fe58 100644 --- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts +++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts @@ -75,115 +75,168 @@ leds { compatible = "gpio-leds"; - led_status: led@0 { + led_status: led-0 { label = "ant0:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 1 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@1 { + led-1 { label = "ant0:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 2 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@2 { - label = "ant0:blue"; - gpios = <&pio 36 GPIO_ACTIVE_HIGH>; + led-2 { + label = "ant3:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; + gpios = <&pio 23 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@3 { - label = "ant1:red"; - gpios = <&pio 35 GPIO_ACTIVE_HIGH>; + led-3 { + label = "ant3:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <3>; + gpios = <&pio 24 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@4 { - label = "ant1:green"; - gpios = <&pio 34 GPIO_ACTIVE_HIGH>; + led-4 { + label = "ant3:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <4>; + gpios = <&pio 25 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@5 { - label = "ant1:blue"; - gpios = <&pio 33 GPIO_ACTIVE_HIGH>; + led-5 { + label = "ant2:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <5>; + gpios = <&pio 26 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@6 { - label = "ant2:red"; - gpios = <&pio 38 GPIO_ACTIVE_HIGH>; + led-6 { + label = "ant4:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <6>; + gpios = <&pio 27 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@7 { - label = "ant2:green"; - gpios = <&pio 37 GPIO_ACTIVE_HIGH>; + led-7 { + label = "ant4:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <7>; + gpios = <&pio 28 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@8 { - label = "ant2:blue"; - gpios = <&pio 26 GPIO_ACTIVE_HIGH>; + led-8 { + label = "ant4:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <8>; + gpios = <&pio 32 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@9 { - label = "ant3:red"; - gpios = <&pio 25 GPIO_ACTIVE_HIGH>; + led-9 { + label = "ant1:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <9>; + gpios = <&pio 33 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@10 { - label = "ant3:green"; - gpios = <&pio 24 GPIO_ACTIVE_HIGH>; + led-10 { + label = "ant1:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <10>; + gpios = <&pio 34 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@11 { - label = "ant3:blue"; - gpios = <&pio 23 GPIO_ACTIVE_HIGH>; + led-11 { + label = "ant1:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <11>; + gpios = <&pio 35 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@12 { - label = "ant4:red"; - gpios = <&pio 28 GPIO_ACTIVE_HIGH>; + led-12 { + label = "ant0:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <12>; + gpios = <&pio 36 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@13 { - label = "ant4:green"; - gpios = <&pio 27 GPIO_ACTIVE_HIGH>; + led-13 { + label = "ant2:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <13>; + gpios = <&pio 37 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@14 { - label = "ant4:blue"; - gpios = <&pio 32 GPIO_ACTIVE_HIGH>; + led-14 { + label = "ant2:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <14>; + gpios = <&pio 38 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@15 { - label = "ant5:red"; - gpios = <&pio 45 GPIO_ACTIVE_HIGH>; + led-15 { + label = "ant5:blue"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <15>; + gpios = <&pio 43 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@16 { + led-16 { label = "ant5:green"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <16>; gpios = <&pio 44 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led@17 { - label = "ant5:blue"; - gpios = <&pio 43 GPIO_ACTIVE_HIGH>; + led-17 { + label = "ant5:red"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <17>; + gpios = <&pio 45 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; - }; ð { diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts index ac854f10d13ae5..10ab102f0d77ab 100644 --- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts +++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts @@ -47,25 +47,37 @@ leds { compatible = "gpio-leds"; - wlan24 { + led-0 { label = "white:wlan24"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; gpios = <&pio 1 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; - wlan5 { + led-1 { label = "white:wlan5"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; gpios = <&pio 2 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy1tpt"; }; - led_system: system { + led_system: led-2 { label = "white:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 11 GPIO_ACTIVE_HIGH>; }; - wan-red { + led-3 { label = "red:wan"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; gpios = <&pio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts index 2be1907f632f12..ad329e5877de16 100644 --- a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts +++ b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts @@ -4,6 +4,7 @@ #include #include #include +#include #include "mt7986a.dtsi" @@ -51,16 +52,22 @@ leds { compatible = "gpio-leds"; - led_run: led@0 { + led-0 { + label = "white:system"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + gpios = <&pio 37 GPIO_ACTIVE_LOW>; + }; + + led_run: led-1 { label = "blue:run"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 38 GPIO_ACTIVE_LOW>; default-state = "on"; }; - - led@1 { - label = "white:system"; - gpios = <&pio 37 GPIO_ACTIVE_LOW>; - }; }; usb_vbus: regulator-usb-vbus { diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi index a1910e36d24b6c..bf4a51e1bcf23d 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi @@ -2,6 +2,7 @@ #include #include +#include #include "mt7986a.dtsi" @@ -66,18 +67,27 @@ leds { compatible = "gpio-leds"; - led_status_red: status_red { + led_status_red: led-0 { label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 7 GPIO_ACTIVE_HIGH>; }; - led_status_green: status_green { + led_status_green: led-1 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 8 GPIO_ACTIVE_HIGH>; }; - turbo { + led-2 { label = "green:turbo"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; gpios = <&pio 12 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts index 591d16195e233a..2a345938466e30 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts @@ -2,6 +2,7 @@ /dts-v1/; #include "mt7986a-tplink-tl-xdr-common.dtsi" +#include / { model = "TP-Link TL-XDR4288"; diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi index a9b44f8df99f4c..b4a332157ff3ca 100644 --- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi @@ -197,13 +197,13 @@ reg = <0>; spi-max-frequency = <3000000>; - led_status_rgb: led@0 { + led_status_rgb: led-0 { reg = <0>; label = "rgb:status"; color-index = ; }; - led_network_rgb: led@1 { + led_network_rgb: led-1 { reg = <1>; label = "rgb:network"; color-index = ; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts index 2469d3d77d1f12..06337aaaf2696a 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-stock.dts @@ -8,6 +8,7 @@ #include "mt7986a.dtsi" #include #include +#include / { model = "Zyxel EX5601-T0"; @@ -67,6 +68,7 @@ gpios = <&pio 11 GPIO_ACTIVE_LOW>; linux,code = ; }; + wps-button { label = "wps"; gpios = <&pio 56 GPIO_ACTIVE_LOW>; @@ -77,75 +79,111 @@ zyleds { compatible = "gpio-leds"; - led_green_wifi24g { + led-0 { label = "zyled-green-wifi24g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; gpios = <&pio 1 GPIO_ACTIVE_LOW>; default-state = "off"; }; - led_green_wifi5g { + led-1 { label = "zyled-green-wifi5g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; gpios = <&pio 2 GPIO_ACTIVE_LOW>; default-state = "off"; }; - led_green_inet { - label = "zyled-green-inet"; - gpios = <&pio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; - }; - - led_red_inet { - label = "zyled-red-inet"; - gpios = <&pio 15 GPIO_ACTIVE_LOW>; + led-2 { + label = "zyled-red-pwr"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + gpios = <&pio 12 GPIO_ACTIVE_LOW>; default-state = "off"; }; - led_green_pwr { + led-3 { label = "zyled-green-pwr"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "timer"; /* Default blinking */ led-pattern = <125 125>; /* Fast blink is 4 HZ */ }; - led_red_pwr { - label = "zyled-red-pwr"; - gpios = <&pio 12 GPIO_ACTIVE_LOW>; + led-4 { + label = "zyled-green-inet"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; + gpios = <&pio 14 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + + led-5 { + label = "zyled-red-inet"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <1>; + gpios = <&pio 15 GPIO_ACTIVE_LOW>; default-state = "off"; }; - led_green_fxs { + led-6 { label = "zyled-green-fxs"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; gpios = <&pio 16 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_amber_fxs { + led-7 { label = "zyled-amber-fxs"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <3>; gpios = <&pio 17 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_amber_wps24g { + led-8 { label = "zyled-amber-wps24g"; + color = ; + function = LED_FUNCTION_WPS; + function-enumerator = <0>; gpios = <&pio 18 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_amber_wps5g { + led-9 { label = "zyled-amber-wps5g"; + color = ; + function = LED_FUNCTION_WPS; + function-enumerator = <1>; gpios = <&pio 19 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_green_lan { + led-10 { label = "zyled-green-lan"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; gpios = <&pio 20 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_green_sfp { + led-11 { label = "zyled-green-sfp"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; gpios = <&pio 24 GPIO_ACTIVE_HIGH>; default-state = "off"; }; diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts index a486f29fec8fe3..102e7dc24506d4 100644 --- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts +++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7986a.dtsi" @@ -69,49 +70,69 @@ leds { compatible = "gpio-leds"; - red1 { - label = "red:net"; - gpios = <&pio 23 GPIO_ACTIVE_HIGH>; + led-0 { + label = "white:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + gpios = <&pio 16 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - green1 { - label = "green:net"; - gpios = <&pio 25 GPIO_ACTIVE_HIGH>; + led-1 { + label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + gpios = <&pio 17 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - amber1 { - label = "amber:net"; - gpios = <&pio 29 GPIO_ACTIVE_HIGH>; + led_status_amber: led-2 { + label = "amber:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; + gpios = <&pio 18 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - white2 { - label = "white:status"; - gpios = <&pio 16 GPIO_ACTIVE_HIGH>; + led-3 { + label = "red:net"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; + gpios = <&pio 23 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - red2 { - label = "red:status"; - gpios = <&pio 17 GPIO_ACTIVE_HIGH>; + led-4 { + label = "green:net"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + gpios = <&pio 25 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_status_green: green2 { - label = "green:status"; - gpios = <&pio 31 GPIO_ACTIVE_HIGH>; + led-5 { + label = "amber:net"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; + gpios = <&pio 29 GPIO_ACTIVE_HIGH>; default-state = "off"; }; - led_status_amber: amber2 { - label = "amber:status"; - gpios = <&pio 18 GPIO_ACTIVE_HIGH>; + led_status_green: led-6 { + label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <3>; + gpios = <&pio 31 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; - }; ð { diff --git a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1.dts b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1.dts index d4620b385662b7..421f5880b099c8 100644 --- a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1.dts +++ b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1.dts @@ -3,6 +3,7 @@ /dts-v1/; #include #include +#include #include "mt7986b.dtsi" @@ -42,31 +43,49 @@ led-0 { label = "green:lan2"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; gpios = <&pio 7 GPIO_ACTIVE_LOW>; }; led-1 { label = "green:lan1"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; gpios = <&pio 9 GPIO_ACTIVE_LOW>; }; led-2 { label = "green:lan0"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; gpios = <&pio 12 GPIO_ACTIVE_LOW>; }; led-3 { label = "green:wan"; + color = ; + function = LED_FUNCTION_WAN; + function-enumerator = <0>; gpios = <&pio 13 GPIO_ACTIVE_LOW>; }; led-4 { label = "orange:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; gpios = <&pio 16 GPIO_ACTIVE_HIGH>; }; led_status_green: led-5 { label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; gpios = <&pio 17 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts index 19419f593fb273..717cb8521f1275 100644 --- a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts +++ b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts @@ -36,49 +36,78 @@ leds { compatible = "gpio-leds"; - wlan5g_green { - gpios = <&pio 12 GPIO_ACTIVE_LOW>; - label = "green:wlan5g"; - }; - - led_power_amber: power_amber { - gpios = <&pio 15 GPIO_ACTIVE_LOW>; - label = "amber:power"; + led-0 { + label = "blue:wlan2g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <0>; + gpios = <&pio 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; }; - wlan2g_green { - gpios = <&pio 19 GPIO_ACTIVE_HIGH>; - label = "green:wlan2g"; + led-1 { + label = "blue:wlan5g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <1>; + gpios = <&pio 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; }; - led_power_blue: power_blue { - gpios = <&pio 7 GPIO_ACTIVE_HIGH>; + led_power_blue: led-2 { label = "blue:power"; + color = ; + function = LED_FUNCTION_POWER; + function-enumerator = <0>; + gpios = <&pio 7 GPIO_ACTIVE_HIGH>; }; - led_power_green: power_green { - gpios = <&pio 10 GPIO_ACTIVE_LOW>; + led_power_green: led-3 { label = "green:power"; + color = ; + function = LED_FUNCTION_POWER; + function-enumerator = <1>; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; }; - wlan2g_blue { - gpios = <&pio 1 GPIO_ACTIVE_LOW>; - label = "blue:wlan2g"; + led-4 { + label = "green:wlan5g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <2>; + gpios = <&pio 12 GPIO_ACTIVE_LOW>; }; - lan_green { - gpios = <&pio 22 GPIO_ACTIVE_HIGH>; - label = "green:lan"; + led-5 { + label = "amber:lan"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <0>; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; }; - lan_amber { - gpios = <&pio 13 GPIO_ACTIVE_LOW>; - label = "amber:lan"; + led_power_amber: led-6 { + label = "amber:power"; + color = ; + function = LED_FUNCTION_POWER; + function-enumerator = <2>; + gpios = <&pio 15 GPIO_ACTIVE_LOW>; }; - wlan5g_blue { - gpios = <&pio 2 GPIO_ACTIVE_LOW>; - label = "blue:wlan5g"; + led-7 { + label = "green:wlan2g"; + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <3>; + gpios = <&pio 19 GPIO_ACTIVE_HIGH>; + }; + + led-8 { + label = "green:lan"; + color = ; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; + gpios = <&pio 22 GPIO_ACTIVE_HIGH>; }; }; }; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index ea126bc46f9e40..68c150b687ee4e 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -17,8 +17,6 @@ mercusys,mr90x-v1) ;; netgear,wax220) ucidef_set_led_netdev "eth0" "LAN" "green:lan" "eth0" - ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0" - ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0" ;; xiaomi,mi-router-wr30u-112m-nmbm|\ xiaomi,mi-router-wr30u-stock|\