ramips: update leds & buttons dts description
authorMikhail Zhilkin <csharper2005@gmail.com>
Sun, 3 Dec 2023 12:40:46 +0000 (12:40 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 7 Jan 2024 00:41:22 +0000 (01:41 +0100)
This commit:
1. Removes deprecated "label" property from the dts leds subnnodes;
2. Updates buttons and leds dts description according to kernel docs
   examples.

Scope: devices well known to me.

Run-tested: TP-Link ec330-g5u, WiFire S1500.nbn

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
12 files changed:
target/linux/ramips/dts/mt7620a_sercomm_cpj.dtsi
target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
target/linux/ramips/dts/mt7621_beeline_smartbox-flash.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-pro.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
target/linux/ramips/dts/mt7621_etisalat_s3.dts
target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
target/linux/ramips/dts/mt7621_sercomm_s1500.dtsi
target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
target/linux/ramips/dts/mt7621_wifire_s1500-nbn.dts
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds

index e903f9f729847873d03a36b59e3fd1eb536ef1fc..8c565385e8f55e9fc14dde4e24fefdf4a59a9c6d 100644 (file)
                compatible = "gpio-leds";
 
                status_green: led-0 {
-                       label = "green:status";
                        gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                };
 
                status_amber: led-1 {
-                       label = "amber:status";
                        gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_STATUS;
index 7b3f316a8c4495a3f34903db16f8b99a4049a68e..93570823b3a38193a3a07db4e81403999e59fe86 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               led_status_green: led-1 {
-                       label = "green:status";
+               led_status_green: led-0 {
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
                };
 
-               led_status_red: led-2 {
-                       label = "red:status";
+               led_status_red: led-1 {
                        color = <LED_COLOR_ID_RED>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
@@ -35,7 +33,7 @@
        keys {
                compatible = "gpio-keys";
 
-               reset {
+               button-0 {
                        label = "reset";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
index d373a801d2f15c4fcdfd0530e34c95128596ad04..36f2532161e4988d252deb3fdfb73088ae139e58 100644 (file)
@@ -7,8 +7,7 @@
        model = "Beeline SmartBox Flash";
 
        leds {
-               led-0 {
-                       label = "blue:wan";
+               led-2 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
index f2a99a63a89db765a8f56ec883494ac6da11bf35..c1bf5c899b0a24bd737825e1364a38c1131311c8 100644 (file)
                compatible = "gpio-leds";
 
                led_status_green: led-0 {
-                       label = "green:status";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                };
 
                led-1 {
-                       label = "blue:wan";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
                        gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_red: led-2 {
-                       label = "red:status";
                        color = <LED_COLOR_ID_RED>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
@@ -47,7 +44,7 @@
        keys {
                compatible = "gpio-keys";
 
-               reset {
+               button-0 {
                        label = "reset";
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
index e2c0165e6bb3a751e0d16fd63df3b37c4e6ac527..912b191049bc44d381ee1732b0602060d00607ef 100644 (file)
@@ -11,7 +11,7 @@
        };
 
        keys {
-               switch_bt {
+               switch-0 {
                        label = "ROUT<->REP Switch_bt";
                        gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
                        linux,input-type = <EV_SW>;
@@ -39,7 +39,6 @@
 };
 
 &led_wps {
-       label = "blue:wps";
        color = <LED_COLOR_ID_BLUE>;
 };
 
index 00f4957c574d2b0bc1af3201d97e2cfa3d2611df..4af425a648c9dd03c525c6324c1e98e2034a1b84 100644 (file)
                compatible = "gpio-leds";
 
                led-0 {
-                       label = "blue:wan";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_green: led-1 {
-                       label = "green:status";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_red: led-2 {
-                       label = "red:status";
                        color = <LED_COLOR_ID_RED>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
        keys {
                compatible = "gpio-keys";
 
-               wps {
+               button-0 {
                        label = "wps";
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
-               reset {
+               button-1 {
                        label = "reset";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
index 64e21bb704a1db8476f0b77796e8f4d774541403..2581e05a90ea0d56b659ced2e948bc9eb5996135 100644 (file)
                compatible = "gpio-leds";
 
                led-0 {
-                       label = "blue:wan";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_green: led-1 {
-                       label = "green:status";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_red: led-2 {
-                       label = "red:status";
                        color = <LED_COLOR_ID_RED>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
        keys {
                compatible = "gpio-keys";
 
-               wps {
+               button-0 {
                        label = "wps";
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
-               reset {
+               button-1 {
                        label = "reset";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
index 36d576108d7fb595ee4b48785ca9397a96d6347c..0416a5f980db62913efae88364292508edda44df 100644 (file)
        leds {
                compatible = "gpio-leds";
 
-               led-1 {
-                       label = "blue:wan";
+               led-0 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                };
 
-               led_status_green: led-0 {
-                       label = "green:status";
+               led_status_green: led-1 {
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                };
 
                led_status_red: led-2 {
-                       label = "red:status";
                        color = <LED_COLOR_ID_RED>;
                        function = LED_FUNCTION_STATUS;
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
        keys {
                compatible = "gpio-keys";
 
-               wps {
+               button-0 {
                        label = "wps";
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
 
-               reset {
+               button-1 {
                        label = "reset";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
index 09862b8067a15f0aa1c3fe08db14cbf4c6a4bbe0..8b2bb6b949362390d9962f71bcc6c42b50d54de7 100644 (file)
        keys {
                compatible = "gpio-keys";
 
-               reset {
+               button-0 {
                        label = "reset";
                        gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
-               wps {
+               button-1 {
                        label = "wps";
                        gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                compatible = "gpio-leds";
 
                led-0 {
-                       label = "amber:lan4";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <0>;
+                       function-enumerator = <4>;
                        linux,default-trigger = "mt7530-0:00:1Gbps";
                        gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
                };
 
                led-1 {
-                       label = "green:lan4";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <1>;
+                       function-enumerator = <4>;
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };
 
                led-2 {
-                       label = "amber:lan3";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <2>;
+                       function-enumerator = <3>;
                        linux,default-trigger = "mt7530-0:01:1Gbps";
                        gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
                };
 
                led-3 {
-                       label = "green:lan3";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
                        function-enumerator = <3>;
                };
 
                led-4 {
-                       label = "amber:lan2";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <4>;
+                       function-enumerator = <2>;
                        linux,default-trigger = "mt7530-0:02:1Gbps";
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
                led-5 {
-                       label = "amber:lan1";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <5>;
+                       function-enumerator = <1>;
                        linux,default-trigger = "mt7530-0:03:1Gbps";
                        gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
                };
 
                led-6 {
-                       label = "green:lan1";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <6>;
+                       function-enumerator = <1>;
                        gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
                };
 
                led-7 {
-                       label = "amber:wan";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_WAN;
-                       function-enumerator = <0>;
                        linux,default-trigger = "mt7530-0:04:1Gbps";
                        gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
                };
 
                led-8 {
-                       label = "green:wan";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_WAN;
-                       function-enumerator = <1>;
                        gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
                };
 
                led-9 {
-                       label = "green:lan2";
                        color = <LED_COLOR_ID_GREEN>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <7>;
+                       function-enumerator = <2>;
                        gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
                };
 
                led-10 {
-                       label = "white:wlan2g";
                        color = <LED_COLOR_ID_WHITE>;
                        function = LED_FUNCTION_WLAN;
-                       function-enumerator = <0>;
+                       function-enumerator = <24>;
                        linux,default-trigger = "phy1radio";
                        gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
                };
 
                led_wps: led-11 {
                        function = LED_FUNCTION_WPS;
-                       function-enumerator = <0>;
                        gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
                        panic-indicator;
                };
 
                led_status: led-12 {
-                       label = "white:status";
                        color = <LED_COLOR_ID_WHITE>;
                        function = LED_FUNCTION_STATUS;
-                       function-enumerator = <0>;
                        gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
                };
 
                led-13 {
-                       label = "white:wlan5g";
                        color = <LED_COLOR_ID_WHITE>;
                        function = LED_FUNCTION_WLAN;
-                       function-enumerator = <1>;
+                       function-enumerator = <50>;
                        linux,default-trigger = "phy0radio";
                        gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
                };
index 84b3efe8df9d712fbdf859fb60eff4c8153bb268..a1b458edd58419a9439fa71b99a752f370af1bc5 100644 (file)
                led-0 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_USB;
-                       function-enumerator = <0>;
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        trigger-sources = <&xhci_ehci_port1>;
                        linux,default-trigger = "usbport";
                };
 
                led-1 {
-                       label = "blue:wps";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WPS;
-                       function-enumerator = <0>;
                        gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
                };
 
                led-2 {
-                       label = "blue:ethernet";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_LAN;
-                       function-enumerator = <0>;
                        gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
                };
 
                led-3 {
-                       label = "amber:internet";
                        color = <LED_COLOR_ID_AMBER>;
                        function = LED_FUNCTION_WAN;
-                       function-enumerator = <0>;
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };
 
                led-4 {
-                       label = "blue:internet";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
-                       function-enumerator = <1>;
                        gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
                };
 
                led-5 {
-                       label = "blue:wireless_5g";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WLAN;
-                       function-enumerator = <0>;
+                       function-enumerator = <50>;
                        gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy1tpt";
                };
 
                led-6 {
-                       label = "blue:wireless_2g";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WLAN;
-                       function-enumerator = <1>;
+                       function-enumerator = <24>;
                        gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "phy0tpt";
                };
 
                led_power: led-7 {
-                       label = "blue:power";
                        color = <LED_COLOR_ID_BLUE>;
-                       function = LED_FUNCTION_STATUS;
-                       function-enumerator = <0>;
+                       function = LED_FUNCTION_POWER;
                        gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
                };
        };
        keys {
                compatible = "gpio-keys";
 
-               led {
+               button-0 {
                        label = "led";
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                        debounce-interval = <60>;
                        linux,code = <KEY_LIGHTS_TOGGLE>;
                };
 
-               wifi {
+               button-1 {
                        label = "wifi on/off";
                        gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
                        debounce-interval = <60>;
                        linux,code = <KEY_RFKILL>;
                };
 
-               reset {
+               button-2 {
                        label = "reset";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                        debounce-interval = <60>;
                        linux,code = <KEY_RESTART>;
                };
 
-               wps {
+               button-3 {
                        label = "wps";
                        gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
                        debounce-interval = <60>;
index 4ffe9881536315ccaa081a2196ff269a6de6fe20..a3cc6038c0a5f4f11ea738830a28d1f861bfac99 100644 (file)
@@ -28,7 +28,6 @@
 };
 
 &led_wps {
-       label = "white:wps";
        color = <LED_COLOR_ID_WHITE>;
 };
 
index 51afb9cf41412271f90595c17215a16b416ba294..1061de6f44443e6c41fd99a16497bcb8c0a7f5b1 100644 (file)
@@ -48,10 +48,10 @@ rostelecom,rt-sf-1)
        ;;
 beeline,smartbox-pro|\
 wifire,s1500-nbn)
-       ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1" "link tx rx"
-       ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2" "link tx rx"
-       ucidef_set_led_netdev "lan3" "lan3" "green:lan3" "lan3" "link tx rx"
-       ucidef_set_led_netdev "lan4" "lan4" "green:lan4" "lan4" "link tx rx"
+       ucidef_set_led_netdev "lan1" "lan1" "green:lan-1" "lan1" "link tx rx"
+       ucidef_set_led_netdev "lan2" "lan2" "green:lan-2" "lan2" "link tx rx"
+       ucidef_set_led_netdev "lan3" "lan3" "green:lan-3" "lan3" "link tx rx"
+       ucidef_set_led_netdev "lan4" "lan4" "green:lan-4" "lan4" "link tx rx"
        ucidef_set_led_netdev "wan"  "wan"  "green:wan"  "wan"  "link tx rx"
        ;;
 belkin,rt1800)
@@ -202,9 +202,9 @@ tplink,deco-m4r-v4)
        ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan"
        ;;
 tplink,ec330-g5u-v1)
-       ucidef_set_led_netdev "lan" "Ethernet" "blue:ethernet" "br-lan" "link tx rx"
-       ucidef_set_led_netdev "wan" "Internet" "blue:internet" "wan" "link tx rx"
-       ucidef_set_led_netdev "wan-off" "Internet-off" "amber:internet" "wan" "link"
+       ucidef_set_led_netdev "lan" "Ethernet" "blue:lan" "br-lan" "link tx rx"
+       ucidef_set_led_netdev "wan" "Internet" "blue:wan" "wan" "link tx rx"
+       ucidef_set_led_netdev "wan-off" "Internet-off" "amber:wan" "wan" "link"
        ;;
 tplink,re350-v1)
        ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "blue:wifi2G" "wlan0"