From: Christian Marangi Date: Wed, 7 Feb 2024 13:48:38 +0000 (+0100) Subject: lantiq: convert to new LED color/function format where possible X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c3f3eb229e46cbc6e282794afc50313c6bdae40;p=openwrt%2Fstaging%2Fpepe2k.git lantiq: 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/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts index 67c6e87bcd..25a041e01d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts @@ -28,13 +28,15 @@ /* power led: red=off, green=on */ power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "keep"; }; lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; @@ -106,4 +108,6 @@ }; }; }; +#include + }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts index 144667ffb6..524d97e03c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts @@ -1,6 +1,7 @@ #include "amazonse.dtsi" #include +#include / { compatible = "netgear,dgn1000b", "lantiq,xway", "lantiq,ase"; @@ -64,12 +65,14 @@ default-state = "on"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; default-state = "on"; }; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts index ba2b82dd67..c6f0454d10 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include #include / { @@ -46,7 +47,8 @@ compatible = "gpio-leds"; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -59,7 +61,8 @@ gpios = <&gpio 38 GPIO_ACTIVE_LOW>; }; wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; info_green: info_green { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts index b04efd8a84..3023d4925d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include #include / { @@ -45,7 +46,8 @@ leds { compatible = "gpio-leds"; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -58,7 +60,8 @@ gpios = <&gpio 38 GPIO_ACTIVE_LOW>; }; wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; info_green: info_green { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts index 71b32b62f5..e8024d6463 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include / { compatible = "bt,homehub-v3a", "lantiq,xway", "lantiq,ar9"; @@ -75,16 +76,19 @@ }; power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; power_orange: power-orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_blue: power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts index 7e0f157bf3..5a50f27c08 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include / { compatible = "buffalo,wbmr-hp-g300h", "lantiq,xway", "lantiq,ar9"; @@ -57,12 +58,14 @@ compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; security { @@ -90,7 +93,8 @@ gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 28 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi index 18168230b6..8409e07943 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include / { chosen { @@ -79,16 +80,19 @@ gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 34 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wifi_green: wifi { @@ -100,7 +104,8 @@ gpios = <&gpio 51 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 52 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts index 486261d742..b17efe740a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include / { compatible = "zte,h201l", "lantiq,xway", "lantiq,ar9"; @@ -52,7 +53,8 @@ compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -69,15 +71,18 @@ gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 2177726d81..8baf91861c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -1,6 +1,7 @@ #include "ar9.dtsi" #include +#include / { compatible = "zyxel,p-2601hn", "lantiq,xway", "lantiq,ar9"; @@ -46,12 +47,14 @@ compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 11 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; online: online { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts index 72f8c3bc66..3eff5cd6da 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv4519pw", "lantiq,xway", "lantiq,danube"; @@ -47,16 +48,19 @@ compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; dsl: dsl { @@ -72,7 +76,8 @@ gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; voip { @@ -92,15 +97,18 @@ gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>; }; wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>; }; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>; }; wps3 { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts index 775aab4ba9..c2b44ebb66 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv4520pw", "lantiq,xway", "lantiq,danube"; @@ -47,7 +48,8 @@ compatible = "gpio-leds"; power_blue: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -60,15 +62,18 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wps { - label = "yellow:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps2 { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; /* @@ -95,7 +100,8 @@ gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>; }; wifi: wifi { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts index 182b0c0bb1..e781be3391 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv4525pw", "lantiq,xway", "lantiq,danube"; @@ -63,7 +64,8 @@ gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; online: online { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts index 4825eb2952..34bb167b6a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv452cqw", "lantiq,xway", "lantiq,danube"; @@ -57,7 +58,8 @@ leds { compatible = "gpio-leds"; power_blue: power0 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -70,15 +72,18 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; power_red: power1 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps1 { - label = "yellow:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; fxs1 { @@ -90,7 +95,8 @@ gpios = <&gpiomm 1 GPIO_ACTIVE_LOW>; }; wps2 { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 2 GPIO_ACTIVE_LOW>; }; fxo { @@ -102,11 +108,13 @@ gpios = <&gpiomm 4 1>; }; led_usb: usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>; }; /* diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index 3f957c63a6..1c1fa2f77d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv7506pw11", "lantiq,xway", "lantiq,danube"; @@ -45,11 +46,13 @@ leds { compatible = "gpio-leds"; wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -62,7 +65,8 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; internet_red { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index fb3363b2e2..34b8808442 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv7518pw", "lantiq,xway", "lantiq,danube"; @@ -46,7 +47,8 @@ leds { compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -59,11 +61,13 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; online2 { @@ -71,7 +75,8 @@ gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; voice { @@ -91,15 +96,18 @@ gpios = <&gpiomm 3 GPIO_ACTIVE_LOW>; }; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 4 GPIO_ACTIVE_LOW>; }; wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 5 GPIO_ACTIVE_LOW>; }; wps3 { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index d67efb4fca..890eac972d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv7525pw", "lantiq,xway", "lantiq,danube"; @@ -45,12 +46,14 @@ leds { compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power1 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; online: online { @@ -66,7 +69,8 @@ gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 41a0e1b74a..f56ee53e39 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv752dpw", "lantiq,xway", "lantiq,danube"; @@ -57,7 +58,8 @@ leds { compatible = "gpio-leds"; power_blue: power1 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; internet_red: internet { @@ -69,7 +71,8 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; power_red: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index 4fb135763d..910cf65b76 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv752dpw22", "lantiq,xway", "lantiq,danube"; @@ -54,7 +55,8 @@ leds { compatible = "gpio-leds"; power_blue: power1 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; internet_red: internet { @@ -66,7 +68,8 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; power_red: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts index d6a917057d..1a8b29a477 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "arcadyan,arv8539pw22", "lantiq,xway", "lantiq,danube"; @@ -47,12 +48,14 @@ compatible = "gpio-leds"; power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; @@ -67,7 +70,8 @@ }; wireless_green: wireless-green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; /* diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts index 85536b0082..4a422c6f4a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts @@ -1,6 +1,7 @@ #include "danube.dtsi" #include +#include / { compatible = "bt,homehub-v2b", "lantiq,xway", "lantiq,danube"; @@ -86,16 +87,19 @@ }; power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpios 13 GPIO_ACTIVE_HIGH>; }; power_orange: power-orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpios 14 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; power_blue: power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpios 15 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts index fa46dc30fd..37cf61144e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts @@ -47,7 +47,8 @@ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; STATUS { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; }; ERROR { @@ -89,4 +90,6 @@ }; }; }; +#include + diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts index d6591aa10e..3cc2f2cf68 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts @@ -46,7 +46,8 @@ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; STATUS { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; }; @@ -68,4 +69,6 @@ }; }; }; +#include + diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi index e25145d869..b4b21e3b48 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi @@ -42,7 +42,8 @@ default-state = "keep"; }; LED_5 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -107,4 +108,6 @@ compatible = "at,24c02"; reg = <0x51>; }; +#include + }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts index bad808e9bf..f4e6de8e9e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts @@ -48,7 +48,8 @@ default-state = "keep"; }; ETH { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -63,4 +64,6 @@ default-state = "keep"; }; }; +#include + }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts index 2c0a51aa7b..46fc837f4d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts @@ -48,7 +48,8 @@ default-state = "keep"; }; ETH { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -80,4 +81,6 @@ gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; }; }; +#include + }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts index 2cc70e6e40..ce8ffc8346 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts @@ -60,7 +60,8 @@ default-state = "keep"; }; ETH { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -76,4 +77,6 @@ }; }; }; +#include + diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts index 611b02f8b3..86eaf09329 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts @@ -27,7 +27,8 @@ default-state = "keep"; }; LED_1 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -48,4 +49,6 @@ }; }; }; +#include + diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts index 77fcff3392..eac6b0792d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -46,13 +47,15 @@ /* power-* is a bicolour led */ power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index 935aa08cb9..9107624eb1 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -50,7 +51,8 @@ compatible = "gpio-leds"; lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; internet_red { @@ -58,12 +60,14 @@ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "keep"; }; alarm_blue { - label = "blue:alarm"; + function = LED_FUNCTION_ALARM; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; internet_orange { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts index fb771edcb7..9238fba5d6 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -39,7 +40,8 @@ compatible = "gpio-leds"; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; dsl: dsl { @@ -47,7 +49,8 @@ gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 28 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi index 69685d801b..90d11c991d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -62,7 +63,8 @@ }; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -78,13 +80,15 @@ }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 28 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi index 71046cfd58..e0bcaa951b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -59,11 +60,13 @@ gpios = <&stp 2 GPIO_ACTIVE_LOW>; }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&stp 3 GPIO_ACTIVE_LOW>; }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&stp 4 GPIO_ACTIVE_LOW>; }; upgrade { @@ -103,12 +106,14 @@ gpios = <&stp 13 GPIO_ACTIVE_LOW>; }; power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 14 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi index 664327a861..4c9b073b70 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -53,13 +54,15 @@ compatible = "gpio-leds"; power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 32 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 33 GPIO_ACTIVE_LOW>; }; @@ -69,7 +72,8 @@ }; wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 35 GPIO_ACTIVE_LOW>; }; @@ -79,7 +83,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 38 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts index ba88a81270..aef33f2f09 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts @@ -3,6 +3,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -50,13 +51,15 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; default-state = "keep"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; @@ -71,7 +74,8 @@ }; led_lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3490.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3490.dtsi index 4d96abd1c3..fabc56a5ac 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3490.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3490.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "vr9_avm_fritzxx90.dtsi" / { @@ -15,12 +17,14 @@ &leds { led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; }; led_wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz5490.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz5490.dtsi index 2aadd8e666..b38ac9f8b8 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz5490.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz5490.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "vr9_avm_fritzxx90.dtsi" / { @@ -20,7 +22,8 @@ }; led_wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index 7324127d2a..e7fc9a4f55 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -3,6 +3,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -48,13 +49,15 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 32 GPIO_ACTIVE_LOW>; default-state = "keep"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 33 GPIO_ACTIVE_LOW>; }; @@ -64,7 +67,8 @@ }; led_wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts index 11f318db5d..e831af186d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts @@ -3,6 +3,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -49,13 +50,15 @@ compatible = "gpio-leds"; power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts index 7bc64b76e7..cbfa7ebe48 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts @@ -3,6 +3,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -49,7 +50,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 31 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi index 6488c574c2..0c682dba3a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7490.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "vr9_avm_fritzxx90.dtsi" / { @@ -25,7 +27,8 @@ }; led_wifi: wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 35 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi index 4d138a58e6..0a2027fb74 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritzxx90.dtsi @@ -3,6 +3,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -43,7 +44,8 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts index be44cb7161..dc43b3a994 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -82,16 +83,19 @@ /* power-* is a single RGB led */ power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "keep"; }; power_blue: power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts index eea27a2a1f..31bbfc67cc 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -104,7 +105,8 @@ }; wan: wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; }; @@ -134,7 +136,8 @@ }; power_g: power_g { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 49 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi index 8df81111fa..a8b5f25810 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -41,7 +42,8 @@ compatible = "gpio-leds"; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 9 GPIO_ACTIVE_HIGH>; default-state = "keep"; }; @@ -75,11 +77,13 @@ linux,default-trigger = "usbport"; }; sd { - label = "green:sd"; + function = LED_FUNCTION_SD; + color = ; gpios = <&stp 14 GPIO_ACTIVE_HIGH>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&stp 12 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts index b817ff3224..e9ba3ad5ee 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -55,20 +56,24 @@ compatible = "gpio-leds"; power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; }; power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; lan_amber { - label = "amber:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; }; lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index 39d7b4908c..d133b5b6d3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -66,7 +67,8 @@ }; usb0 { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; trigger-sources = <&ehci_port1>; linux,default-trigger = "usbport"; @@ -80,7 +82,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts index 4ad7a484e6..3f55796232 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts @@ -19,7 +19,10 @@ &leds { wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; +#include + }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi index acb54ee80b..2160adf793 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -48,7 +49,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -64,19 +66,22 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; eth { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi index ff7dce3477..89b7e3e98f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi @@ -1,6 +1,7 @@ #include "vr9.dtsi" #include +#include #include / { @@ -63,19 +64,23 @@ gpios = <&stp 19 GPIO_ACTIVE_LOW>; }; wireless_orange { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&stp 20 GPIO_ACTIVE_LOW>; }; wireless_green: wireless_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&stp 21 GPIO_ACTIVE_LOW>; }; power_red: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 22 GPIO_ACTIVE_LOW>; }; power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&stp 23 GPIO_ACTIVE_LOW>; default-state = "keep"; };