From: Christian Marangi Date: Wed, 7 Feb 2024 13:48:43 +0000 (+0100) Subject: ramips: convert to new LED color/function format where possible X-Git-Tag: v24.10.0-rc1~3109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19c45b95dbb53a7ba1a26c201277ca86293bf404;p=thirdparty%2Fopenwrt.git ramips: convert to new LED color/function format where possible Initial conversion to new LED color/function format and drop label format where possible. The same label is composed at runtime. Signed-off-by: Christian Marangi --- diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts index bbd8c47a829..0dff381d2da 100644 --- a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts +++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aigale,ai-br100", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index 8ac74f70628..52f0b497717 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc"; @@ -41,7 +42,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts index 2325d53153d..e8276fe7175 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc"; @@ -86,7 +87,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; @@ -109,12 +111,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0radio"; }; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts index f5fa4100908..aa109d428c6 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc"; @@ -74,12 +75,14 @@ }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi index 92119ff8127..199b7026e19 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -32,12 +33,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index 4d442825a97..8652d6573c8 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc"; @@ -22,14 +23,16 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts index 17bf2f8272e..8145f4492db 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts index 85946ca1e0b..4e0d8ebec40 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts index b571d122cf3..5a341cf09dc 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-600d", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index d09f4d292eb..511b76abde0 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,22 +35,26 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 6d5d461c8fa..d08322af13e 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dch-m225", "ralink,mt7620a-soc"; @@ -34,13 +35,15 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; default-state = "on"; }; status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index febfd2e32ed..7c32b122ccf 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -3,6 +3,7 @@ #include "mt7620a.dtsi" #include +#include #include #include @@ -41,12 +42,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 97fc4f0935c..553f215b7c7 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -36,7 +37,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; @@ -46,7 +48,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; @@ -56,7 +59,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts index 5f11b73ad9e..ea660c83f0b 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; @@ -43,7 +45,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi index 11cd15922cc..e8a3d59d77c 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -7,6 +7,7 @@ #include #include +#include #include / { @@ -38,17 +39,20 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_domywifi.dtsi b/target/linux/ramips/dts/mt7620a_domywifi.dtsi index 778de63f1bc..c6a1ac0c773 100644 --- a/target/linux/ramips/dts/mt7620a_domywifi.dtsi +++ b/target/linux/ramips/dts/mt7620a_domywifi.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -67,7 +68,8 @@ }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts index 821aa04f953..89daaf0afed 100644 --- a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts +++ b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dovado,tiny-ac", "ralink,mt7620a-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 486f6399df4..999fff4ecb2 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -9,6 +9,7 @@ #include #include +#include #include / { @@ -36,7 +37,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -46,12 +48,14 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index 5759774f6ee..d9ad11b506f 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -31,7 +32,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -41,12 +43,14 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index eb21ff7d6f9..6cc1138efb2 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -30,17 +31,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_engenius_epg600.dts b/target/linux/ramips/dts/mt7620a_engenius_epg600.dts index 4b3332d2f07..6c7d3a72803 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_epg600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_epg600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,epg600", "ralink,mt7620a-soc"; @@ -46,7 +47,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index beee73f11c8..98da6d20453 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,esr600", "ralink,mt7620a-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index 7adf0faf868..3e475395f9f 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "fon,fon2601", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts index 60c6b2a7d4a..0c0adf26ebe 100644 --- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts +++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "hnet,c108", "ralink,mt7620a-soc"; @@ -54,12 +55,14 @@ }; lan_red { - label = "red:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; }; led_lan_green: lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_humax_e2.dts b/target/linux/ramips/dts/mt7620a_humax_e2.dts index 453208eb34e..94f2e2003de 100644 --- a/target/linux/ramips/dts/mt7620a_humax_e2.dts +++ b/target/linux/ramips/dts/mt7620a_humax_e2.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; @@ -32,17 +34,20 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index 6f95bd01514..315f0bfb56a 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts index bc674fa4b30..1fa551bddfb 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts index 6270af3b158..5c5637c1988 100644 --- a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts +++ b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts index c997d68cd12..f76d184c44a 100644 --- a/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts +++ b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_iptime.dtsi" / { @@ -17,14 +19,16 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts index 772cab32e2a..412530c257f 100644 --- a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts +++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts @@ -2,6 +2,7 @@ #include #include +#include /{ compatible = "kimax,u25awf-h1","ralink,mt7620a-soc"; @@ -33,7 +34,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index f43aa2d3bca..46b26939507 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts index cefc3c3e925..41bca0bbc32 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts index 24b79711c5e..acc73a8ec94 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts @@ -16,7 +16,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -31,14 +32,16 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; }; @@ -57,4 +60,6 @@ nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts index f1d2c873371..254472f72cf 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts @@ -37,12 +37,14 @@ compatible = "gpio-leds"; power1 { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; led_power_blue: power2 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -57,12 +59,14 @@ }; usb1 { - label = "yellow:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; }; usb2 { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -114,4 +118,6 @@ &gsw { mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index 4310f9dfc7f..a4a5a69b12e 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "linksys,e1700", "ralink,mt7620a-soc"; @@ -39,12 +40,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts index 34c3d4f42d8..e01babc9570 100644 --- a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts +++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netcore,nw5212", "ralink,mt7620a-soc"; @@ -37,7 +38,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts index 79b622b1bb3..c537091bca2 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "netgear,ex2700", "ralink,mt7620a-soc"; @@ -39,13 +40,15 @@ compatible = "gpio-leds"; led_power_green: power_g { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -70,7 +73,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi index fe26c3b8594..8551a30c4a0 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -31,13 +32,15 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; @@ -62,7 +65,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi index 8810742e671..1d3f2f3772f 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,13 +34,15 @@ compatible = "gpio-leds"; led_power_green: power_g { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -64,7 +67,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index c2ef1426231..1b1d4decd30 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netis,wf2770", "ralink,mt7620a-soc"; @@ -13,7 +14,8 @@ compatible = "gpio-leds"; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts index 2c503db80de..d87c7951cad 100644 --- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts +++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: powerled { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index 588789239f0..3d01ba9cae6 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -25,18 +26,21 @@ compatible = "gpio-leds"; led_blue: blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; default-state = "on"; }; yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 74faef8dea6..da325062ab7 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "phicomm,psg1208", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts index eeeb7cf6576..891e067c534 100644 --- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts +++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,cs-qr10", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts index 53c0215e0ce..072bdb277ee 100644 --- a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts +++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,db-wrt01", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts index 3c6f7c582ef..ac7b7fefd95 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-750dhp", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts index 2879f6d870f..754abf879ae 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc"; @@ -23,7 +24,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts index de4df5d277d..ba8c9a4737f 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-ex750np", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 415ecf1bd9f..ad0747cb740 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "sanlinking,d240", "ralink,mt7620a-soc"; @@ -45,12 +46,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts index 1ffc0a2bc81..c0452fdcd59 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts +++ b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sercomm,na930", "ralink,mt7620a-soc"; @@ -83,7 +84,8 @@ }; status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -95,7 +97,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 29 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts index d94331a87d9..d76babae9d8 100644 --- a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts +++ b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -36,7 +38,8 @@ }; wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index 88d24160101..fcce614e71d 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc"; @@ -22,29 +23,34 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts index e631f6f4e48..60ab58366fb 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -15,30 +15,35 @@ compatible = "gpio-leds"; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "keep"; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; @@ -55,7 +60,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; @@ -80,4 +86,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index d00d2195eeb..86205464abc 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -16,29 +16,34 @@ compatible = "gpio-leds"; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; @@ -60,4 +65,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts index 439bc36dc3a..797710c8841 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -15,30 +15,35 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; @@ -55,7 +60,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; @@ -80,4 +86,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts index cc947e212e5..a7a2338bce4 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,archer-mr200", "ralink,mt7620a-soc"; @@ -22,17 +23,20 @@ compatible = "gpio-leds"; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; @@ -42,7 +46,8 @@ }; wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; @@ -67,7 +72,8 @@ }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts index d2f5207fac1..fccda507000 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_tplink_re2x0-v1.dtsi" / { @@ -17,17 +19,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts index 57cd0ed539f..c92c6e7f0d6 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_tplink_re2x0-v1.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts index 687b3ced37b..13f4c4c3626 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc"; @@ -20,17 +21,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts index 48f1a7f3c0d..0bd158da4fe 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn535k1", "ralink,mt7620a-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; @@ -57,7 +60,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index b2b762d63a7..cdebbd9e85a 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn579x3", "ralink,mt7620a-soc"; @@ -50,17 +51,20 @@ compatible = "gpio-leds"; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 8ed6b7764dc..bc40fbb91aa 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc"; @@ -23,22 +24,26 @@ compatible = "gpio-leds"; led_blue: blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; led_yellow: yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; led_red: red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index fc758a45564..66654419112 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -16,20 +17,23 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi index 39c50c7366d..b5065aa97b6 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_zbtlink_zbt-we1026.dtsi" / { @@ -10,12 +12,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi index 09f0ba773c0..c1aff2f8681 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_zbtlink_zbt-we1026.dtsi" / { @@ -10,17 +12,20 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi index b3032af63f3..405c110c1f5 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts index 3848f7317e6..95a48d29ae2 100644 --- a/target/linux/ramips/dts/mt7620a_zte_q7.dts +++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zte,q7", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; statred { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; led_status_blue: statblue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts index abeb4c2a2d1..95ca0bfa34b 100644 --- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts +++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc"; @@ -18,19 +19,22 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; power_alert { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; @@ -40,7 +44,8 @@ }; led_power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts index 29350a85565..1a693b1df2f 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n12p", "ralink,mt7620n-soc"; @@ -22,17 +23,20 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts index c467ed0dde5..30edead0667 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n14u", "ralink,mt7620n-soc"; @@ -18,24 +19,28 @@ compatible = "gpio-leds"; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts index a714960b7f3..081b6d914c3 100644 --- a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts +++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wmr-300", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts index 19e968bf948..5ba4d812b25 100644 --- a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts +++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "comfast,cf-wr800n", "ralink,mt7620n-soc"; @@ -32,7 +33,8 @@ }; led_wps: wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts index 1c1a700630d..5fa45a59c4e 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts index 95a93ea4deb..d14abad41b1 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -38,7 +39,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts index 22bff2c948a..94de91bfdf7 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -41,7 +42,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts index afb14b11889..9f8ee0eda98 100644 --- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts +++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts index 1c408bcaa1a..e77e439ac41 100644 --- a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts +++ b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620n_sunvalley_filehub.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts index 63cf38dec55..0c4958e9e9c 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts +++ b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620n_netgear_n300.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0radio"; }; diff --git a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts index f06b9749822..d5fc6d3854a 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts +++ b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,pr2000", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi index 8903ab5c36a..d53f3a9198a 100644 --- a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi +++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "nexx,wt3020", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts index 8e608bba2e4..4e7298e8af1 100644 --- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts +++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts @@ -17,7 +17,8 @@ compatible = "gpio-leds"; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; }; @@ -106,4 +107,6 @@ groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk"; function = "gpio"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts index 52c497645b0..c24c60abacd 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts index 7000447c6ce..0d139f2e30c 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-we2026", "ralink,mt7620n-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts index 20063e2b47d..dbadfe4c20a 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc"; @@ -23,7 +24,8 @@ }; lan { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts index 1937c3a14c1..c7c853b1bc0 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -35,7 +38,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts index 8faab1cc6b2..d7d1d969fae 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -35,7 +38,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index d63ae33311f..1422f3dde84 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "afoundry,ew1200", "mediatek,mt7621-soc"; @@ -33,7 +34,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi index 35274afbf3a..6062d001ebd 100644 --- a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi +++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -40,17 +41,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts index d9fdb3b675f..4f58156d72b 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rp-ac56", "mediatek,mt7621-soc"; @@ -53,17 +54,20 @@ }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 48 GPIO_ACTIVE_HIGH>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts index 34e64182cf5..51b0b10867b 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rp-ac87", "mediatek,mt7621-soc"; @@ -37,7 +38,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts index 6790b37d1ae..a23bfcc1ff1 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rt-ac57u-v1", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 48 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index 7c607f962db..dfb906546c2 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index cfc8330fe5c..411026d7b0e 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rt-n56u-b1", "mediatek,mt7621-soc"; @@ -25,7 +26,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -42,17 +44,20 @@ }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts index e7acc55e500..a6720adb0e8 100644 --- a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts +++ b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts @@ -47,7 +47,8 @@ }; led_power: led-power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_bolt_arion.dts b/target/linux/ramips/dts/mt7621_bolt_arion.dts index 83855f9dc89..4dedb12eadc 100644 --- a/target/linux/ramips/dts/mt7621_bolt_arion.dts +++ b/target/linux/ramips/dts/mt7621_bolt_arion.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "bolt,arion", "mediatek,mt7621-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_wlan_blue: wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; led_wlan_red: wlan_red { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 86 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index f176691aacc..aeeab4af32e 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc"; @@ -43,7 +44,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index b4ba1519d3d..10decdfe82f 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "buffalo,wsr-2533dhpl", "mediatek,mt7621-soc"; @@ -46,7 +47,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index e1b82816f0c..c80d686d314 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts index 5730ca04d31..5487eddfd70 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -28,17 +28,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts index a915a5d79f0..0a2baf19c76 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts @@ -70,7 +70,8 @@ }; wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index e87209fbb1d..0f0386a1665 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -3,6 +3,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -46,14 +47,16 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi index b4c61fb7c66..55da73dcdab 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi @@ -3,6 +3,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -43,7 +44,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index afccce15ccd..885cf41dbf8 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "cudy,wr2100", "mediatek,mt7621-soc"; @@ -51,7 +52,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts index 82160cff03f..2c9a0302afb 100644 --- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts +++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,newifi-d2", "mediatek,mt7621-soc"; @@ -23,12 +24,14 @@ compatible = "gpio-leds"; power-amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_power_blue: power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index 29c212671cc..02987737cd8 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,pbr-m1", "mediatek,mt7621-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 31 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts index 7a5fbeeddb5..a96b6ad5df7 100644 --- a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,covr-x1860-a1", "mediatek,mt7621-soc"; @@ -40,18 +41,21 @@ compatible = "gpio-leds"; status_white: power { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; status_orange: status_orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts index 82b7c8070e2..13095319e2f 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dap-x1860-a1", "mediatek,mt7621-soc"; @@ -41,18 +42,21 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts index e0a714c9dc6..13883f9f740 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_dlink_dir-xx60-a1.dtsi" / { @@ -9,7 +11,8 @@ &leds { usb_white { - label = "white:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts index 1cca6f6b578..8bb55bfba8a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-3060-a1", "mediatek,mt7621-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts index 8e5e35945a6..336ed17a744 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-853-a1", "mediatek,mt7621-soc"; @@ -54,19 +55,22 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts index 747d1de18a0..771fc610ebf 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc"; @@ -44,12 +45,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -64,7 +67,8 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts index bce0e6996be..a3753f37d43 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -6,6 +6,7 @@ #include #include +#include / { compatible = "dlink,dir-853-r1", "mediatek,mt7621-soc"; @@ -24,12 +25,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -44,7 +47,8 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index 451722743d9..0426fe5d8f5 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-860l-b1", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi index bd8fd6f8a15..b94a0784feb 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -39,12 +40,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index 6eb3f3cdd9b..24766b2f3b8 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,12 +35,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi index a933b149250..e24ee3ef248 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -36,12 +37,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts index 2c35a8839cb..039072cf503 100644 --- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts +++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dual-q,h721", "mediatek,mt7621-soc"; @@ -86,7 +87,8 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts index 80a271f6e33..6af8fc50cec 100644 --- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index 9c0353ae28b..a095275f5d8 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc"; @@ -29,22 +30,26 @@ }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index 30b8d4e0104..dae247f4cea 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,22 +19,26 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index c2c2acac9f2..639e9bebd18 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "firefly,firewrt", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index d224fd388d7..2c81b9cfe84 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 6bdba25b2b4..4a2095e99bb 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc"; @@ -28,7 +29,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "default-on"; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 9a2cffeb97c..26e6aa05a0c 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc"; @@ -48,7 +49,8 @@ }; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "default-on"; }; diff --git a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts index 5737c0ce68f..e6d79b316cf 100644 --- a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts +++ b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hanyang,hyc-g920", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index a21a6a455b3..70366c5dc88 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hiwifi,hc5962", "mediatek,mt7621-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_status: status { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts index 9b9a9831087..ee167911010 100644 --- a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts +++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc"; @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_status: led-status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -55,7 +57,8 @@ }; led-usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts index be5f23ca7d6..afadfa8a5be 100644 --- a/target/linux/ramips/dts/mt7621_humax_e10.dts +++ b/target/linux/ramips/dts/mt7621_humax_e10.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; }; @@ -42,12 +44,14 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index b46ba87f394..4d7a4cf7a1b 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 9680aadfbbf..061f537a96e 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-dx1200gr", "mediatek,mt7621-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 6bd5e733f4a..eaf1a1d66a6 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "iodata,wn-gx300gr", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index 5ed92cf0e7d..d8fd51292d2 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 1c46f57e584..08d59e534f6 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts index 3bf0600e5fe..a28903b5918 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,a3004ns-dual", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index ef58382ab61..64ef3126152 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,7 +19,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; @@ -37,7 +39,8 @@ }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index 7be11315c54..f75b26233a1 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,a8004t", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "orange:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index a0df60234e7..1d29c6da88b 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,ax2004m", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "amber:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index fd9bd66bf8c..3328c3053ec 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc"; @@ -35,7 +36,8 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 349773e22cd..03e0eab25b6 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "jcg,q20", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts index 264c908c45b..4bdf6a58f47 100644 --- a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts +++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "keenetic,kn-3010", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index dd8d2244542..5cf7535b701 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "lenovo,newifi-d1", "mediatek,mt7621-soc"; @@ -23,17 +24,20 @@ compatible = "gpio-leds"; status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; status-green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index 3f23aa69a43..cd69291113a 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,e5600", "mediatek,mt7621-soc"; @@ -40,23 +41,27 @@ compatible = "gpio-leds"; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; default-state = "on"; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts index 2bce2d75901..0adc43df0ef 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts @@ -47,7 +47,8 @@ }; led_power: led-power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 4980b4fe9b4..78c73a188e9 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -37,7 +38,8 @@ compatible = "gpio-leds"; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; @@ -62,12 +64,14 @@ }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 3a682245268..c1231b86294 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "linksys,re6500", "mediatek,mt7621-soc"; @@ -23,7 +24,8 @@ }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re7000.dts b/target/linux/ramips/dts/mt7621_linksys_re7000.dts index 9b9c84a0487..31248e73b4a 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re7000.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re7000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,re7000", "mediatek,mt7621-soc"; @@ -26,12 +27,14 @@ }; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index 9004e5f0fde..46892f1e734 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mercusys,mr70x-v1", "mediatek,mt7621-soc"; @@ -35,12 +36,14 @@ compatible = "gpio-leds"; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_power_orange: power-orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 43b021fa13a..54a10863fad 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mtc,wr1201", "mediatek,mt7621-soc"; @@ -19,12 +20,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; @@ -36,7 +39,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_eax12.dts b/target/linux/ramips/dts/mt7621_netgear_eax12.dts index d0e0eb247ad..00631b9153c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_eax12.dts +++ b/target/linux/ramips/dts/mt7621_netgear_eax12.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,eax12", "mediatek,mt7621-soc"; @@ -40,12 +41,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; @@ -70,7 +73,8 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 41e603c1605..fae862bc658 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,ex6150", "mediatek,mt7621-soc"; @@ -20,17 +21,20 @@ compatible = "gpio-leds"; power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index 052b2a4babe..6e225c0825c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -41,19 +42,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; internet { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; @@ -64,7 +68,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 1ae7fd0f572..15e9fa1c45b 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -43,22 +44,26 @@ led_power_orange: power_orange { gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>; - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; }; led_power_white: power_white { gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>; - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; }; wan_orange { gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>; - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; }; wan_white { gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>; - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; }; wlan2g { @@ -122,12 +127,14 @@ wps { gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; }; wlan { gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 72ff75cefa9..a5559cb5fca 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -20,19 +21,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; internet { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 48a3302e79c..2ad34022462 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,wac104", "mediatek,mt7621-soc"; @@ -43,12 +44,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index c0c3500af25..31614d53d43 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,wax202", "mediatek,mt7621-soc"; @@ -34,12 +35,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index c58e32377e8..a13eb0f2222 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netis,wf2881", "mediatek,mt7621-soc"; @@ -19,14 +20,16 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index 23915999633..718cfeae056 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "oraybox,x3a", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_red: status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_status_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_green: status-green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index 85cf8ecfd3e..9da689c5eba 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "phicomm,k2p", "mediatek,mt7621-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; stat_r { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; stat_y { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_blue: stat_b { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 93e7280b4c0..bd1e47b1031 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,vr500", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 4a9e420370a..dbdce76ee07 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "raisecom,msg1500-x-00", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ }; led_usb: usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index c3c5a2ff4a8..6b5436899aa 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -1,6 +1,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index 44b1077bc60..e189b19522d 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "sercomm,na502", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -51,7 +53,8 @@ }; bluetooth { - label = "green:bluetooth"; + function = LED_FUNCTION_BLUETOOTH; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts index bea5998935f..275bb2b67fa 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "sercomm,na502s", "mediatek,mt7621-soc"; @@ -19,7 +20,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -40,7 +42,8 @@ }; bluetooth { - label = "green:bluetooth"; + function = LED_FUNCTION_BLUETOOTH; + color = ; gpios = <&gpio_expander1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 60817edbbff..272d62dc247 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "storylink,sap-g3200u3", "mediatek,mt7621-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts index da1db0366f4..19ae8bb8b60 100644 --- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts +++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "thunder,timecloud", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; statw { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; led_statuso: stato { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts index 2d8717e3cdd..00f47bd9c03 100644 --- a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts +++ b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts @@ -36,12 +36,14 @@ }; led_power_blue: led-power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_power_yellow: led-power-yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 4de71d9e429..eaf38f7b755 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-ax23-v1", "mediatek,mt7621-soc"; @@ -41,7 +42,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; @@ -58,22 +60,26 @@ }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan-orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index 522408b220c..7320a706b1d 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c6u-v1", "mediatek,mt7621-soc"; @@ -41,24 +42,28 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; }; wan-orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -75,7 +80,8 @@ }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts index 087910233e2..13ff83ee943 100644 --- a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts +++ b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,deco-m4r-v4", "mediatek,mt7621-soc"; @@ -55,7 +56,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index 6b73ffff24f..f2e18ee8d1e 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -42,16 +42,19 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; @@ -75,7 +78,8 @@ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index be23abf4c83..7f4ae256bf9 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,re350-v1", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -33,12 +35,14 @@ }; wps_r { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; wps_b { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts index 7dcd5e553cd..9621693319e 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,re650-v2", "mediatek,mt7621-soc"; @@ -53,7 +54,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -70,12 +72,14 @@ }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 3784a4f3c95..c688e5d1560 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -50,7 +51,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -67,12 +69,14 @@ }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts index 1e0fd202397..0221278d8f1 100644 --- a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts +++ b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wpa8631p-v3", "mediatek,mt7621-soc"; @@ -53,12 +54,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts index f09ccba5855..7568daf6669 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts @@ -2,6 +2,7 @@ #include #include +#include / { model = "Ubiquiti UniFi Switch Flex"; @@ -33,12 +34,14 @@ compatible = "gpio-leds"; led_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; led_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi index 813ddc7327a..b78faf975ec 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "unielec,u7621-01", "mediatek,mt7621-soc"; @@ -40,7 +41,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index 9e91a0a2993..42f6cea2d3c 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -9,6 +9,7 @@ #include #include +#include / { compatible = "unielec,u7621-06", "mediatek,mt7621-soc"; @@ -49,7 +50,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi index 7df61c4eb30..b33a288620f 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -45,12 +46,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts index 55e828a2955..c673eb8497c 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,ws-wn572hp3-4g", "mediatek,mt7621-soc"; @@ -50,7 +51,8 @@ }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 8b018e18ae4..37319b763de 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -12,7 +13,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index 78f81314fc1..18e5b7361d8 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "winstars,ws-wn583a6", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index a9b62b1b28d..1dfded14b1d 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_nand_128m.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index 8f88eb175dd..61359e8b21b 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_mi-router-4a-common.dtsi" / { @@ -11,12 +13,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts index 719d430fd87..779b8781612 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_mi-router-4a-common.dtsi" / { @@ -14,22 +16,26 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_yellow { - label = "yellow:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts index 6cca16a79b5..d3221315bfb 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_router-ac2100.dtsi" / { @@ -18,22 +20,26 @@ compatible = "gpio-leds"; wan_yellow { - label = "yellow:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts index 4299de318bf..9ccfd25d576 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_router-ac2100.dtsi" / { @@ -18,22 +20,26 @@ compatible = "gpio-leds"; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_status_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; wan_white { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 147713ddce1..989dc0913ed 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "xzwifi,creativebox-v1", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 31 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index e715237a401..9ad24ef66ee 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "youhua,wr1200js", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 98d2e689225..c96495da278 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "youku,yk-l2", "mediatek,mt7621-soc"; @@ -24,18 +25,21 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index c61189c4bc1..8bd795e8845 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "yuncore,fap640", "mediatek,mt7621-soc"; @@ -25,22 +26,26 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&switch0 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "mt7530-0:04:link"; }; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index caebe0b589a..e99753209bc 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "yuncore,fap690", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index 3756baa14ef..e00c2cb5182 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 87ed1c71297..6fb8d2a6929 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wg3526", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts index 307819e746e..e4795352ccb 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,lte5398-m904", "mediatek,mt7621-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; linux,default-trigger = "usbport"; trigger-sources = <&ehci_port2>; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts index 2f6654da5c3..907e90b77b8 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,wap6805", "mediatek,mt7621-soc"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; @@ -31,7 +33,8 @@ }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index 641844ccc0d..d4f8b26aea8 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc"; @@ -43,7 +44,8 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts index abb86456da8..833a44cc712 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts @@ -2,6 +2,8 @@ // Copyright (c) 2022 Ray Wang // Copyright (c) 2022 Ivan Pavlov +#include + #include "mt7628an_asus_rt-ac1200.dtsi" / { @@ -12,7 +14,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi index e91f1b60297..7dce3513d12 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,7 +35,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi index aa642da11fd..29c3b08921d 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -27,23 +28,27 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts index 1b9e0047ccc..02c48791b6a 100644 --- a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts +++ b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc"; @@ -76,7 +77,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts index 1d6304cfa77..2a304e9c630 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts @@ -4,6 +4,7 @@ #include "mt7628an.dtsi" #include #include +#include / { compatible = "comfast,cf-wr617ac", "mediatek,mt7628an-soc"; @@ -21,11 +22,13 @@ leds { compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts index 883459d2f30..df1b3347215 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "cudy,wr1000", "mediatek,mt7628an-soc"; @@ -46,7 +47,8 @@ }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; @@ -57,7 +59,8 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts index f5e9a169d4d..6545f896233 100644 --- a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts +++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc"; @@ -26,14 +27,16 @@ compatible = "gpio-leds"; usb { - label = "orange:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts index 3ad34c51c1a..8ed409c19ea 100644 --- a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts +++ b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dap-1325-a1", "mediatek,mt7628an-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index 9d8b360c6a3..4b29ddd7880 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "elecom,wrc-1167fs", "mediatek,mt7628an-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -31,7 +33,8 @@ }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; @@ -41,7 +44,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts index d84290d4c12..9540a1058d3 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts @@ -2,6 +2,7 @@ #include #include +#include /{ compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc"; @@ -23,18 +24,21 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; default-state = "on"; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi index a40be00887f..7ffdeb83278 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi +++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -23,12 +24,14 @@ compatible = "gpio-leds"; led_power_blue: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts index 69e22f6dd7d..2cc3fee3940 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hilink,hlk-7628n", "mediatek,mt7628an-soc"; @@ -23,7 +24,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts index 121a24b5025..4e8704b36b7 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hilink,hlk-7688a", "mediatek,mt7628an-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime_a3.dts b/target/linux/ramips/dts/mt7628an_iptime_a3.dts index d90a075af56..405c10ffb71 100644 --- a/target/linux/ramips/dts/mt7628an_iptime_a3.dts +++ b/target/linux/ramips/dts/mt7628an_iptime_a3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime_a604m.dts b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts index 2f626f1adf7..cbc2f3027f9 100644 --- a/target/linux/ramips/dts/mt7628an_iptime_a604m.dts +++ b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -23,7 +25,8 @@ }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts index 47542689661..bd916aab417 100644 --- a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts +++ b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "keenetic,kn-1613", "mediatek,mt7628an-soc"; @@ -23,7 +24,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts index b0b41f0420d..8e1c6d81740 100644 --- a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts +++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_kroks.dtsi" / { @@ -8,7 +10,8 @@ leds { status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts index eb36c986f6d..d641fa078f9 100644 --- a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts +++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_kroks.dtsi" / { @@ -8,7 +10,8 @@ leds { status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; }; wifi { diff --git a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts index 26ff86dac2d..3eff008dda0 100644 --- a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts +++ b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,e5400", "mediatek,mt7628an-soc"; @@ -46,7 +47,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index 074011fbb9b..f520305322a 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mercury,mac1200r-v2", "mediatek,mt7628an-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index ebaa4326aea..0f552537801 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Motorola MWR03"; @@ -30,12 +31,14 @@ compatible = "gpio-leds"; led_status_orange: status_orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; led_status_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index 98d132e891f..550e59301a6 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -27,12 +28,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; @@ -48,12 +51,14 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_oraybox_x1.dts b/target/linux/ramips/dts/mt7628an_oraybox_x1.dts index 9f43e46fac0..77a9a78d14e 100644 --- a/target/linux/ramips/dts/mt7628an_oraybox_x1.dts +++ b/target/linux/ramips/dts/mt7628an_oraybox_x1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "oraybox,x1", "mediatek,mt7628an-soc"; @@ -24,17 +25,20 @@ compatible = "gpio-leds"; led_status_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_HIGH>; }; led_status_red: status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; led_status_white: status-white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 7c0e7551ce2..0f0a3b0147e 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "ravpower,rp-wd009", "mediatek,mt7628an-soc"; @@ -37,12 +38,14 @@ }; sd_white { - label = "white:sd"; + function = LED_FUNCTION_SD; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; sd_red { - label = "red:sd"; + function = LED_FUNCTION_SD; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts index fc111019a7d..1a1bea51a95 100644 --- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts +++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "skylab,skw92a", "mediatek,mt7628an-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_power: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts index dfe5192e12c..b7b0f43249b 100644 --- a/target/linux/ramips/dts/mt7628an_tama_w06.dts +++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tama,w06", "mediatek,mt7628an-soc"; @@ -11,17 +12,20 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wireless { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_totolink_a3.dts b/target/linux/ramips/dts/mt7628an_totolink_a3.dts index 246dfadddd8..c8a4f919581 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_a3.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_a3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts index 0d09e543456..1031c3375f4 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -15,22 +15,26 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -47,7 +51,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; @@ -106,4 +111,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts index 93695660aeb..eef9635e16a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; @@ -50,22 +53,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts index bfb39b3531c..f19f8704ade 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -31,22 +31,26 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; @@ -61,7 +65,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; @@ -105,4 +110,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts index 302a9d9c6a2..59a61e3d864 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -48,22 +51,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts index c3a890bc2dd..b2571a06d1f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -48,17 +51,20 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 8826365bebf..4423b232c57 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -38,7 +39,8 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; @@ -48,12 +50,14 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; }; wifi2g_green { diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi index 029b9559117..13f8d89fd2f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts index 5f35cb4c7fa..39e94926129 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc"; @@ -47,7 +48,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -60,18 +62,21 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts index 297e7b441d4..d5a56412f97 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts @@ -31,39 +31,46 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -85,4 +92,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts index d0350f9924d..21d1e483361 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -33,23 +35,27 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts index f77f1acbf2a..1bd35fc3349 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -33,23 +35,27 @@ compatible = "gpio-leds"; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts index 44a483ed6d6..af1a758d789 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts @@ -31,28 +31,33 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; }; }; @@ -79,4 +84,6 @@ nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100 0>; nvmem-cell-names = "eeprom", "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts index 01cbba20244..b14eb64a22b 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -27,7 +29,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts index e480395ffd4..1bf826349eb 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts @@ -25,27 +25,32 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -75,4 +80,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts index 3e639668bba..8d14992ea02 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,tl-wr840n-v5", "mediatek,mt7628an-soc"; @@ -33,12 +34,14 @@ compatible = "gpio-leds"; led_power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts index e1e77eba237..2fda2e9b889 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts @@ -31,12 +31,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; @@ -61,17 +63,20 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; @@ -101,4 +106,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts index 5b3bcbe63ab..11f3552e5f6 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr841n-v14", "mediatek,mt7628an-soc"; @@ -33,23 +34,27 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts index b5c3bd9ab5b..dc248689bce 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts @@ -31,39 +31,46 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -85,4 +92,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts index 9fc7f97ae51..b8a394b26ba 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -27,27 +29,32 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts index 0029be21e0f..b7aed8132d2 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -43,34 +43,40 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; @@ -101,4 +107,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi index b31ffba8090..e9a942785fa 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi @@ -9,6 +9,7 @@ #include #include +#include / { compatible = "unielec,u7628-01", "mediatek,mt7628an-soc"; @@ -38,17 +39,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; @@ -73,7 +77,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts index 26012a6a4f3..e1a1bc599d1 100644 --- a/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts +++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts @@ -15,7 +15,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; }; @@ -23,4 +24,6 @@ &firmware { reg = <0x50000 0x7b0000>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts index 1ae08ed8407..1e4b7c1cb0f 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -52,12 +53,14 @@ }; led_status_blue: led_status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_status_red: led_status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts index 76e89b77b6c..0d2dd4e6c2b 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -21,13 +22,15 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts index 7b12dac350c..06167c0eb24 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -42,7 +43,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts index fa06c44e3fc..60f8e6db389 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -75,12 +76,14 @@ }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts index d2b45faa25d..b1b29b38dec 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -36,17 +37,20 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts index a9b98683042..08a8d367eb9 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -65,17 +66,20 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts index 01c8bb942a0..a18fdd27c8e 100644 --- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts +++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc"; @@ -31,7 +32,8 @@ }; ledwps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts index 88ec3f0c306..b82b740dcd6 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts @@ -15,7 +15,8 @@ compatible = "gpio-leds"; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; @@ -26,4 +27,6 @@ groups = "i2c", "gpio"; function = "gpio"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts index 511354ae5e9..37c2d1e9a4a 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts @@ -18,7 +18,8 @@ pinctrl-0 = <&led_pins>; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; @@ -48,4 +49,6 @@ reg = <1>; spi-max-frequency = <10000000>; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts index 49ca637cb9e..4009033689d 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts index f40717267c7..621bd22b00b 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts index 27348b3ad7d..a406c8f124e 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts index 2adb6ba8e36..fc47be479c5 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-3c", "mediatek,mt7628an-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts index 66297232e3a..8f431cae62e 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc"; @@ -23,17 +24,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts index 64f3d6d83f3..976994f5389 100644 --- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts +++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -32,7 +33,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; @@ -47,7 +49,8 @@ }; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts index 95eb9cfd9e6..92d63f25013 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-extra-ii", "mediatek,mt7628an-soc"; @@ -44,7 +45,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -59,7 +61,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts index dc61cd9da50..dbbaf9c45e4 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlink101,ar670w", "ralink,rt2880-soc"; @@ -62,12 +63,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; wpsblue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts index f41a9b8561e..d60707a7c3d 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlink101,ar725w", "ralink,rt2880-soc"; @@ -67,17 +68,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; wpsred { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; wpsblue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts index 0275a84bde0..6874bd39f22 100644 --- a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts +++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts @@ -2,6 +2,7 @@ #include #include +#include / { #address-cells = <1>; @@ -94,7 +95,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts index 37288e5fc40..bed5b950a40 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts @@ -2,6 +2,7 @@ #include #include +#include / { #address-cells = <1>; @@ -99,7 +100,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts index 105a3c49d48..3e8a42e18a1 100644 --- a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts +++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc"; @@ -100,7 +101,8 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 17 GPIO_ACTIVE_LOW>; }; @@ -115,7 +117,8 @@ }; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts index 3f4142f5089..ac65264c5cf 100644 --- a/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts +++ b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ralink,v11st-fe", "ralink,rt2880-soc"; @@ -75,7 +76,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi index 41985278632..74e3edd4edc 100644 --- a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi +++ b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "alphanetworks,asl26555", "ralink,rt3050-soc"; @@ -39,27 +40,32 @@ }; wan-red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts index a452a44202f..9fb325bc091 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n10-plus", "ralink,rt3050-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts index 938f5d440c8..d89fb0995e7 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,wl-330n", "ralink,rt3050-soc"; @@ -23,7 +24,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts index 4f8b7e73ea4..ef0668c02fd 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,wl-330n3g", "ralink,rt3050-soc"; @@ -28,7 +29,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts index e3a26bd4cf6..c0c9ffec135 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dcs-930", "ralink,rt3050-soc"; @@ -74,12 +75,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts index a05122b6040..7a4907c4db1 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-300-b1", "ralink,rt3050-soc"; @@ -86,27 +87,32 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts index 73e65128e59..e5441d2d652 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-600-b1", "ralink,rt3050-soc"; @@ -86,27 +87,32 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts index 0d81f7e0966..30022a9ced9 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-615-d", "ralink,rt3050-soc"; @@ -83,28 +84,33 @@ compatible = "gpio-leds"; status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts index 3a5624d125e..f080f47b511 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-620-a1", "ralink,rt3050-soc"; @@ -86,32 +87,38 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; wps2 { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts index 62686b5489b..e95889f9ef5 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -78,12 +79,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts index c0fdb9995de..0cf0943ed64 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -83,7 +84,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts index 5e217aa3625..7c3dc845bd5 100644 --- a/target/linux/ramips/dts/rt3050_huawei_d105.dts +++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huawei,d105", "ralink,rt3050-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts index beceb3f35d6..2c2e302ec68 100644 --- a/target/linux/ramips/dts/rt3050_netcore_nw718.dts +++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netcore,nw718", "ralink,rt3050-soc"; @@ -18,19 +19,22 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "amber:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; usb { - label = "amber:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts index a241e91bafb..8f153fbc247 100644 --- a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts +++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sparklan,wcr-150gn", "ralink,rt3050-soc"; @@ -76,7 +77,8 @@ }; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts index 95faff03b44..6f8baaf0d24 100644 --- a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts +++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "teltonika,rut5xx", "ralink,rt3050-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts index 2accb51c3f9..36e7706b021 100644 --- a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts +++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-638apb-v2", "ralink,rt3050-soc"; @@ -86,12 +87,14 @@ compatible = "gpio-leds"; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; led_wps_green: wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts index a62f7757c7f..7e79f4260c7 100644 --- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts +++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "accton,wr6202", "ralink,rt3052-soc"; @@ -15,7 +16,8 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts index 0b9270461bd..e8c429cf1d0 100644 --- a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts +++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "alfa-network,w502u", "ralink,rt3052-soc"; @@ -73,14 +74,16 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts index 49965d4e5e8..279826d7f10 100644 --- a/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts +++ b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asiarf,awapn2403", "ralink,rt3052-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts index d60dabb5ea6..8c9cca940f3 100644 --- a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts +++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n13u", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts index 456bc204157..9aac3f9d8e7 100644 --- a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts +++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aximcom,mr-102n", "ralink,rt3052-soc"; @@ -79,19 +80,22 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; led_status: status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts index 4a23d65628c..37d7b36d92e 100644 --- a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts +++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aztech,hw550-3g", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; @@ -81,12 +83,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts index 75cc1385cdd..b9fe0730be5 100644 --- a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts +++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dap-1350", "ralink,rt3052-soc"; @@ -79,17 +80,20 @@ compatible = "gpio-leds"; led_power_blue: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts index 2c3b759c041..933459a90bf 100644 --- a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts +++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "engenius,esr-9753", "ralink,rt3052-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts index 9a256e65dc8..e2d16e9a862 100644 --- a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts +++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "fon,fonera-20n", "ralink,rt3052-soc"; @@ -74,12 +75,14 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "orange:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts index dc00110f1b7..27de7e4306e 100644 --- a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts +++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huawei,hg255d", "ralink,rt3052-soc"; @@ -75,7 +76,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; @@ -85,19 +87,22 @@ }; wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts index 6fb85b23740..acd040a68e0 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "jcg,jhr-n825r", "ralink,rt3052-soc"; @@ -68,7 +69,8 @@ leds { compatible = "gpio-leds"; led_system: system { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts index 6096019b103..4bcb91eacfe 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "jcg,jhr-n926r", "ralink,rt3052-soc"; @@ -69,17 +70,20 @@ compatible = "gpio-leds"; wlan1 { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; }; wlan2 { - label = "yellow:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; wlan3 { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts index e1d1197d709..52d725e080e 100644 --- a/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts +++ b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mofinetwork,mofi3500-3gn", "ralink,rt3052-soc"; @@ -65,7 +66,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; @@ -77,12 +79,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts index 856dc85679d..7f22a3bf6f4 100644 --- a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts +++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netgear,wnce2001", "ralink,rt3052-soc"; @@ -22,22 +23,26 @@ compatible = "gpio-leds"; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan-green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; wlan-red { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts index b95e919591e..03486cac91e 100644 --- a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts +++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "nexaira,bc2", "ralink,rt3052-soc"; @@ -62,7 +63,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts index 7dcecc078bd..f5ec7592ae2 100644 --- a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts +++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,miniembwifi", "ralink,rt3052-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts index 5461ee2f956..1d5d334af20 100644 --- a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts +++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "petatel,psr-680w", "ralink,rt3052-soc"; @@ -73,7 +74,8 @@ compatible = "gpio-leds"; led_wan: wan { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts index c3d7993ae66..f88525666b0 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-w300nh2", "ralink,rt3052-soc"; @@ -75,17 +76,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts index 495f187a37e..736a56f2da0 100644 --- a/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts +++ b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "prolink,pwh2004", "ralink,rt3052-soc"; @@ -70,7 +71,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts index 1b5ba03feb8..4d51839db7f 100644 --- a/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts +++ b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ralink,v22rw-2x2", "ralink,rt3052-soc"; @@ -70,7 +71,8 @@ }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts index 82c3783e1f6..f0a96d04489 100644 --- a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts +++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sitecom,wl-351", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts index a4d11072ea5..2be0c26c7b1 100644 --- a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts +++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tenda,w306r-v2", "ralink,rt3052-soc"; @@ -74,7 +75,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi index 869cf32d787..c18112fc01e 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi +++ b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,wr512-3gn", "ralink,rt3052-soc"; @@ -32,7 +33,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts index ec5e4af5e28..dc07c597c3f 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts +++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,xdx-rn502j", "ralink,rt3052-soc"; @@ -74,7 +75,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts index 8104bf60538..a019e17344f 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "upvel,ur-326n4g", "ralink,rt3052-soc"; @@ -84,7 +85,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts index 050ce21a753..4a0e196baa1 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "upvel,ur-336un", "ralink,rt3052-soc"; @@ -84,7 +85,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts index 2c16736c962..a1ac3239b13 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic", "ralink,rt3052-soc"; @@ -69,19 +70,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts index 18dcf6b6760..4bb8cefe561 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,nbg-419n", "ralink,rt3052-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts index dc2c49cd0b8..4c80d479c19 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-615-h1", "ralink,rt3352-soc"; @@ -19,28 +20,33 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; default-state = "on"; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts index de020706dfd..c9f71f157da 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-620-d1", "ralink,rt3352-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts index 0ac89bce43b..db58009e6d4 100644 --- a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts +++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,nbg-419n-v2", "ralink,rt3352-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts index 7837a4ca3da..af3f390d885 100644 --- a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts +++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n56u", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -96,22 +97,26 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts index 87d52d679c1..19d15bed597 100644 --- a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts +++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-645", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -47,7 +48,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts index 60ec3dacf50..0811c249348 100644 --- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts +++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3662_engenius_esr600h.dts b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts index e142fe53474..2356aa93f90 100644 --- a/target/linux/ramips/dts/rt3662_engenius_esr600h.dts +++ b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,esr600h", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -20,13 +21,15 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; default-state = "on"; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts index e06e6986ec2..3a09053f7b0 100644 --- a/target/linux/ramips/dts/rt3662_omnima_hpm.dts +++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,hpm", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -33,13 +34,15 @@ compatible = "gpio-leds"; power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts index b022b5c2be7..d9f2e8c4252 100644 --- a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts +++ b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "samsung,cy-swr1100", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -103,19 +104,22 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts index 78c9bb4b6d5..38667a5fdac 100644 --- a/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts +++ b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "rt3883_belkin_f9k110x.dtsi" / { @@ -41,12 +43,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts index 17f3c10bc90..5067a53457c 100644 --- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts +++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sitecom,wlr-6000", "ralink,rt3883-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts index f23dc1cb039..e9827414359 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-691gr", "ralink,rt3883-soc"; @@ -93,7 +94,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts index ee2ca91af7f..93a5aac758f 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-692gr", "ralink,rt3883-soc"; @@ -87,12 +88,14 @@ compatible = "gpio-leds"; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; led_wps_green: wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts index e46b3365959..47367213515 100644 --- a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts +++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlive,air3gii", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi index b9905f62f59..0dbeeba6391 100644 --- a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi +++ b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asiarf,awm002-evb", "ralink,rt5350-soc"; @@ -10,17 +11,20 @@ compatible = "gpio-leds"; tx { - label = "green:tx"; + function = LED_FUNCTION_TX; + color = ; gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; }; rx { - label = "green:rx"; + function = LED_FUNCTION_RX; + color = ; gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_belkin_f7c027.dts b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts index b1a897a8595..013dba456be 100644 --- a/target/linux/ramips/dts/rt5350_belkin_f7c027.dts +++ b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "belkin,f7c027", "ralink,rt5350-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; led_status_orange: orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts index 1e561136fae..6f671cc58fb 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dcs-930l-b1", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts index 13100edf046..8e586ca6e1a 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-300-b7", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts index 577b3a0a3e7..501c06da463 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-320-b1", "ralink,rt5350-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts index 7467900e426..535e19284f5 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-610-a1", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts index 3475f4ccf70..3c1d42ec73e 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dwr-512-b", "ralink,rt5350-soc"; @@ -39,7 +40,8 @@ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; 2g { diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts index 9a9580a3fba..cabc7bf2643 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hame,mpr-a1", "ralink,rt5350-soc"; @@ -23,7 +24,8 @@ }; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts index 5a06ef46fb3..402071a8523 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hame,mpr-a2", "ralink,rt5350-soc"; @@ -23,7 +24,8 @@ }; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts index 70acc3fc439..b41f5f0819e 100644 --- a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts +++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hootoo,ht-tm02", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts index b1a28815f6a..b27408b67b9 100644 --- a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts +++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "intenso,memory2move", "ralink,rt5350-soc"; @@ -27,7 +28,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts index ca98ab3599f..ea75306ec48 100644 --- a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts +++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,miniembplug", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts index db349de5e10..81fd2056388 100644 --- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts +++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-dp150n", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts index 505fba650e6..b6c8a8c0d14 100644 --- a/target/linux/ramips/dts/rt5350_poray_m3.dts +++ b/target/linux/ramips/dts/rt5350_poray_m3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,m3", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_m4.dtsi b/target/linux/ramips/dts/rt5350_poray_m4.dtsi index fd358ff8efd..fc411265918 100644 --- a/target/linux/ramips/dts/rt5350_poray_m4.dtsi +++ b/target/linux/ramips/dts/rt5350_poray_m4.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,m4", "ralink,rt5350-soc"; @@ -17,7 +18,8 @@ compatible = "gpio-leds"; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts index d441fd3144a..fc654563a6e 100644 --- a/target/linux/ramips/dts/rt5350_poray_x5.dts +++ b/target/linux/ramips/dts/rt5350_poray_x5.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,x5", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts index f02eac27b12..a4284342d04 100644 --- a/target/linux/ramips/dts/rt5350_poray_x8.dts +++ b/target/linux/ramips/dts/rt5350_poray_x8.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,x8", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts index 2810b7a7010..a463d78236d 100644 --- a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts +++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-714tru", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "red:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts index 64fd8c6b15e..a92798a9613 100644 --- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts +++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,a5-v11", "ralink,rt5350-soc"; @@ -24,7 +25,8 @@ }; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi index f3ef0edfe48..15049e032fd 100644 --- a/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi +++ b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi @@ -144,7 +144,8 @@ led_status: status { /* UARTF_RXD */ - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; }; @@ -248,4 +249,6 @@ spi-max-frequency = <10000000>; reg = <0>; }; +#include + }; diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts index 00fbb5e927a..8f8ffa66d98 100644 --- a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts +++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zorlik,zl5900v2", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts index 9e1e47c099b..c81a2d50363 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-4g-b", "ralink,rt5350-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; @@ -40,7 +43,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts index 6effb4f075b..3cf3e7b07d9 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-lite-b", "ralink,rt5350-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts index 8b1e0584b6f..eed11e59bf0 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-start", "ralink,rt5350-soc"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; };