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-Url: http://git.openwrt.org/?a=commitdiff_plain;h=19c45b95dbb53a7ba1a26c201277ca86293bf404;p=openwrt%2Fstaging%2Fnbd.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 bbd8c47a82..0dff381d2d 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 8ac74f7062..52f0b49771 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 2325d53153..e8276fe717 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 f5fa410090..aa109d428c 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 92119ff812..199b7026e1 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 4d442825a9..8652d6573c 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 17bf2f8272..8145f4492d 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 85946ca1e0..4e0d8ebec4 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 b571d122cf..5a341cf09d 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 d09f4d292e..511b76abde 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 6d5d461c8f..d08322af13 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 febfd2e32e..7c32b122cc 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 97fc4f0935..553f215b7c 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 5f11b73ad9..ea660c83f0 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 11cd15922c..e8a3d59d77 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 778de63f1b..c6a1ac0c77 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 821aa04f95..89daaf0afe 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 486f6399df..999fff4ecb 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 5759774f6e..d9ad11b506 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 eb21ff7d6f..6cc1138efb 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 4b3332d2f0..6c7d3a7280 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 beee73f11c..98da6d2045 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 7adf0faf86..3e475395f9 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 60c6b2a7d4..0c0adf26eb 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 453208eb34..94f2e2003d 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 6f95bd0151..315f0bfb56 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 bc674fa4b3..1fa551bddf 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 6270af3b15..5c5637c198 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 c997d68cd1..f76d184c44 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 772cab32e2..412530c257 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 f43aa2d3bc..46b2693950 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 cefc3c3e92..41bca0bbc3 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 24b79711c5..acc73a8ec9 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 f1d2c87337..254472f72c 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 4310f9dfc7..a4a5a69b12 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 34c3d4f42d..e01babc957 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 79b622b1bb..c537091bca 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 fe26c3b859..8551a30c4a 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 8810742e67..1d3f2f3772 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 c2ef142623..1b1d4decd3 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 2c503db80d..d87c7951ca 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 588789239f..3d01ba9cae 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 74faef8dea..da325062ab 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 eeeb7cf657..891e067c53 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 53c0215e0c..072bdb277e 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 3c6f7c582e..ac7b7fefd9 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 2879f6d870..754abf879a 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 de4df5d277..ba8c9a4737 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 415ecf1bd9..ad0747cb74 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 1ffc0a2bc8..c0452fdcd5 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 d94331a87d..d76babae9d 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 88d2416010..fcce614e71 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 e631f6f4e4..60ab58366f 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 d00d2195ee..86205464ab 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 439bc36dc3..797710c884 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 cc947e212e..a7a2338bce 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 d2f5207fac..fccda50700 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 57cd0ed539..c92c6e7f0d 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 687b3ced37..13f4c4c362 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 48f1a7f3c0..0bd158da4f 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 b2b762d63a..cdebbd9e85 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 8ed6b7764d..bc40fbb91a 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 fc758a4556..6665441911 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 39c50c7366..b5065aa97b 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 09f0ba773c..c1aff2f868 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 b3032af63f..405c110c1f 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 3848f7317e..95a48d29ae 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 abeb4c2a2d..95ca0bfa34 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 29350a8556..1a693b1df2 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 c467ed0dde..30edead066 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 a714960b7f..081b6d914c 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 19e968bf94..5ba4d812b2 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 1c1a700630..5fa45a59c4 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 95a93ea4de..d14abad41b 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 22bff2c948..94de91bfdf 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 afb14b1188..9f8ee0eda9 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 1c408bcaa1..e77e439ac4 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 63cf38dec5..0c4958e9e9 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 f06b974982..d5fc6d3854 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 8903ab5c36..d53f3a9198 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 8e608bba2e..4e7298e8af 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 52c497645b..c24c60abac 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 7000447c6c..0d139f2e30 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 20063e2b47..dbadfe4c20 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 1937c3a14c..c7c853b1bc 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 8faab1cc6b..d7d1d969fa 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 d63ae33311..1422f3dde8 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 35274afbf3..6062d001eb 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 d9fdb3b675..4f58156d72 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 34e64182cf..51b0b10867 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 6790b37d1a..a23bfcc1ff 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 7c607f962d..dfb906546c 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 cfc8330fe5..411026d7b0 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 e7acc55e50..a6720adb0e 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 83855f9dc8..4dedb12ead 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 f176691aac..aeeab4af32 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 b4ba1519d3..10decdfe82 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 e1b82816f0..c80d686d31 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 5730ca04d3..5487eddfd7 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 a915a5d79f..0a2baf19c7 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 e87209fbb1..0f0386a166 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 b4c61fb7c6..55da73dcda 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 afccce15cc..885cf41dbf 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 82160cff03..2c9a0302af 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 29c212671c..02987737cd 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 7a5fbeeddb..a96b6ad5df 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 82b7c8070e..13095319e2 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 e0a714c9dc..13883f9f74 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 1cca6f6b57..8bb55bfba8 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 8e5e35945a..336ed17a74 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 747d1de18a..771fc610eb 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 bce0e6996b..a3753f37d4 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 451722743d..0426fe5d8f 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 bd8fd6f8a1..b94a0784fe 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 6eb3f3cdd9..24766b2f3b 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 a933b14925..e24ee3ef24 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 2c35a8839c..039072cf50 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 80a271f6e3..6af8fc50ce 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 9c0353ae28..a095275f5d 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 30b8d4e010..dae247f4ce 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 c2c2acac9f..639e9bebd1 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 d224fd388d..2c81b9cfe8 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 6bdba25b2b..4a2095e99b 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 9a2cffeb97..26e6aa05a0 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 5737c0ce68..e6d79b316c 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 a21a6a455b..70366c5dc8 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 9b9a983108..ee16791101 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 be5f23ca7d..afadfa8a5b 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 b46ba87f39..4d7a4cf7a1 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 9680aadfbb..061f537a96 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 6bd5e733f4..eaf1a1d66a 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 5ed92cf0e7..d8fd51292d 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 1c46f57e58..08d59e534f 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 3bf0600e5f..a28903b591 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 ef58382ab6..64ef312615 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 7be11315c5..f75b26233a 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 a0df60234e..1d29c6da88 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 fd9bd66bf8..3328c3053e 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 349773e22c..03e0eab25b 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 264c908c45..4bdf6a58f4 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 dd8d224454..5cf7535b70 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 3f23aa69a4..cd69291113 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 2bce2d7590..0adc43df0e 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 4980b4fe9b..78c73a188e 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 3a68224526..c1231b8629 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 9b9c84a048..31248e73b4 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 9004e5f0fd..46892f1e73 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 43b021fa13..54a10863fa 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 d0e0eb247a..00631b9153 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 41e603c160..fae862bc65 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 052b2a4bab..6e225c0825 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 1ae7fd0f57..15e9fa1c45 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 72ff75cefa..a5559cb5fc 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 48a3302e79..2ad3402246 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 c0c3500af2..31614d53d4 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 c58e32377e..a13eb0f222 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 2391599963..718cfeae05 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 85cf8ecfd3..9da689c5eb 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 93e7280b4c..bd1e47b103 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 4a9e420370..dbdce76ee0 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 c3c5a2ff4a..6b5436899a 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 44b1077bc6..e189b19522 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 bea5998935..275bb2b67f 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 60817edbbf..272d62dc24 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 da1db0366f..19ae8bb8b6 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 2d8717e3cd..00f47bd9c0 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 4de71d9e42..eaf38f7b75 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 522408b220..7320a706b1 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 087910233e..13ff83ee94 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 6b73ffff24..f2e18ee8d1 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 be23abf4c8..7f4ae256bf 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 7dcd5e553c..9621693319 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 3784a4f3c9..c688e5d156 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 1e0fd20239..0221278d8f 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 f09ccba585..7568daf666 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 813ddc7327..b78faf975e 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 9e91a0a299..42f6cea2d3 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 7df61c4eb3..b33a288620 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 55e828a295..c673eb8497 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 8b018e18ae..37319b763d 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 78f81314fc..18e5b7361d 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 a9b62b1b28..1dfded14b1 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 8f88eb175d..61359e8b21 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 719d430fd8..779b878161 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 6cca16a79b..d3221315bf 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 4299de318b..9ccfd25d57 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 147713ddce..989dc0913e 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 e715237a40..9ad24ef66e 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 98d2e68922..c96495da27 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 c61189c4bc..8bd795e884 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 caebe0b589..e99753209b 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 3756baa14e..e00c2cb518 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 87ed1c7129..6fb8d2a692 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 307819e746..e4795352cc 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 2f6654da5c..907e90b77b 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 641844ccc0..d4f8b26aea 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 abb86456da..833a44cc71 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 e91f1b6029..7dce3513d1 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 aa642da11f..29c3b08921 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 1b9e0047cc..02c48791b6 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 1d6304cfa7..2a304e9c63 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 883459d2f3..df1b334721 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 f5e9a169d4..6545f89623 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 3ad34c51c1..8ed409c19e 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 9d8b360c6a..4b29ddd788 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 d84290d4c1..9540a1058d 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 a40be00887..7ffdeb8327 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 69e22f6dd7..2cc3fee394 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 121a24b502..4e8704b36b 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 d90a075af5..405c10ffb7 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 2f626f1adf..cbc2f3027f 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 4754268966..bd916aab41 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 b0b41f0420..8e1c6d8174 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 eb36c986f6..d641fa078f 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 26ff86dac2..3eff008dda 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 074011fbb9..f520305322 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 ebaa4326ae..0f55253780 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 98d132e891..550e59301a 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 9f43e46fac..77a9a78d14 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 7c0e7551ce..0f0a3b0147 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 fc111019a7..1a1bea51a9 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 dfe5192e12..b7b0f43249 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 246dfadddd..c8a4f91958 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 0d09e54345..1031c3375f 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 93695660ae..eef9635e16 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 bfb39b3531..f19f8704ad 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 302a9d9c6a..59a61e3d86 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 c3a890bc2d..b2571a06d1 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 8826365beb..4423b232c5 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 029b955911..13f8d89fd2 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 5f35cb4c7f..39e9492612 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 297e7b441d..d5a56412f9 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 d0350f9924..21d1e48336 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 f77f1acbf2..1bd35fc334 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 44a483ed6d..af1a758d78 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 01cbba2024..b14eb64a22 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 e480395ffd..1bf826349e 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 3e639668bb..8d14992ea0 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 e1e77eba23..2fda2e9b88 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 5b3bcbe63a..11f3552e5f 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 b5c3bd9ab5..dc248689bc 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 9fc7f97ae5..b8a394b26b 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 0029be21e0..b7aed8132d 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 b31ffba809..e9a942785f 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 26012a6a4f..e1a1bc599d 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 1ae08ed840..1e4b7c1cb0 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 76e89b77b6..0d2dd4e6c2 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 7b12dac350..06167c0eb2 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 fa06c44e3f..60f8e6db38 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 d2b45faa25..b1b29b38de 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 a9b9868304..08a8d367eb 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 01c8bb942a..a18fdd27c8 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 88ec3f0c30..b82b740dcd 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 511354ae5e..37c2d1e9a4 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 49ca637cb9..4009033689 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 f40717267c..621bd22b00 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 27348b3ad7..a406c8f124 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 2adb6ba8e3..fc47be479c 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 66297232e3..8f431cae62 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 64f3d6d83f..976994f538 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 95eb9cfd9e..92d63f2501 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 dc61cd9da5..dbbaf9c45e 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 f41a9b8561..d60707a7c3 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 0275a84bde..6874bd39f2 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 37288e5fc4..bed5b950a4 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 105a3c49d4..3e8a42e18a 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 3f4142f508..ac65264c5c 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 4198527863..74e3edd4ed 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 a452a44202..9fb325bc09 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 938f5d440c..d89fb0995e 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 4f8b7e73ea..ef0668c02f 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 e3a26bd4cf..c0c9ffec13 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 a05122b604..7a4907c4db 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 73e65128e5..e5441d2d65 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 0d81f7e096..30022a9ced 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 3a5624d125..f080f47b51 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 62686b5489..e95889f9ef 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 c0fdb9995d..0cf0943ed6 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 5e217aa362..7c3dc845bd 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 beceb3f35d..2c2e302ec6 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 a241e91baf..8f153fbc24 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 95faff03b4..6f8baaf0d2 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 2accb51c3f..36e7706b02 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 a62f7757c7..7e79f4260c 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 0b9270461b..e8c429cf1d 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 49965d4e5e..279826d7f1 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 d60dabb5ea..8c9cca940f 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 456bc20415..9aac3f9d8e 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 4a23d65628..37d7b36d92 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 75cc1385cd..b9fe0730be 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 2c3b759c04..933459a90b 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 9a256e65dc..e2d16e9a86 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 dc00110f1b..27de7e4306 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 6fb85b2374..acd040a68e 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 6096019b10..4bcb91eacf 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 e1d1197d70..52d725e080 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 856dc85679..7f22a3bf6f 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 b95e919591..03486cac91 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 7dcecc078b..f5ec7592ae 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 5461ee2f95..1d5d334af2 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 c3d7993ae6..f88525666b 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 495f187a37..736a56f2da 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 1b5ba03feb..4d51839db7 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 82c3783e1f..f0a96d0448 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 a4d11072ea..2be0c26c7b 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 869cf32d78..c18112fc01 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 ec5e4af5e2..dc07c597c3 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 8104bf6053..a019e17344 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 050ce21a75..4a0e196baa 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 2c16736c96..a1ac3239b1 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 18dcf6b676..4bb8cefe56 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 dc2c49cd0b..4c80d479c1 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 de020706df..c9f71f157d 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 0ac89bce43..db58009e6d 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 7837a4ca3d..af3f390d88 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 87d52d679c..19d15bed59 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 60ec3dacf5..0811c24934 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 e142fe5347..2356aa93f9 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 e06e6986ec..3a09053f7b 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 b022b5c2be..d9f2e8c425 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 78c9bb4b6d..38667a5fda 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 17f3c10bc9..5067a53457 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 f23dc1cb03..e982741435 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 ee2ca91af7..93a5aac758 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 e46b336595..4736721351 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 b9905f62f5..0dbeeba639 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 b1a897a859..013dba456b 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 1e561136fa..6f671cc58f 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 13100edf04..8e586ca6e1 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 577b3a0a3e..501c06da46 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 7467900e42..535e19284f 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 3475f4ccf7..3c1d42ec73 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 9a9580a3fb..cabc7bf264 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 5a06ef46fb..402071a852 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 70acc3fc43..b41f5f0819 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 b1a28815f6..b27408b67b 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 ca98ab3599..ea75306ec4 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 db349de5e1..81fd205638 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 505fba650e..b6c8a8c0d1 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 fd358ff8ef..fc41126591 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 d441fd3144..fc654563a6 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 f02eac27b1..a4284342d0 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 2810b7a701..a463d78236 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 64fd8c6b15..a92798a961 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 f3ef0edfe4..15049e032f 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 00fbb5e927..8f8ffa66d9 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 9e1e47c099..c81a2d5036 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 6effb4f075..3cf3e7b07d 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 8b1e0584b6..eed11e59bf 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>; };