bmips: inteno-xg6846: Add DSA LED definitions
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 14 Aug 2024 08:26:26 +0000 (10:26 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 14 Aug 2024 17:25:42 +0000 (19:25 +0200)
This adds the LED definitons for the XG6846 DSA port LEDs.
These are standard properties compatible with the existing
Marvell 88e6xxx DT bindings and fully standardized so this
is fine to add. They will be used by the in-flight Marvell
88e6xxx LEDs support patch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[add empty lines between leds, remove default-state="off"]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
target/linux/bmips/dts/bcm6328-inteno-xg6846.dts

index 94e57dcb0d4960db6529bc71534410071ba54580..91b771a2bd5be539a6a0c3e18a7019c4decf6584 100644 (file)
                                label = "lan1";
 
                                phy-handle = <&lan1phy>;
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_LAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_LAN;
+                                       };
+                               };
                        };
 
                        port@1 {
                                label = "lan2";
 
                                phy-handle = <&lan2phy>;
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_LAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_LAN;
+                                       };
+                               };
                        };
 
                        port@2 {
                                label = "lan3";
 
                                phy-handle = <&lan3phy>;
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_LAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_LAN;
+                                       };
+                               };
                        };
 
                        port@3 {
                                label = "lan4";
 
                                phy-handle = <&lan4phy>;
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_LAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_LAN;
+                                       };
+                               };
                        };
 
                        port@4 {
                                label = "ext1";
 
                                phy-handle = <&ext1phy>;
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_WAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_WAN;
+                                       };
+                               };
                        };
 
                        port@5 {
                                        speed = <1000>;
                                        full-duplex;
                                };
+
+                               leds {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       led@0 {
+                                               reg = <0>;
+                                               color = <LED_COLOR_ID_GREEN>;
+                                               function = LED_FUNCTION_WAN;
+                                               default-state = "keep";
+                                       };
+
+                                       led@1 {
+                                               reg = <1>;
+                                               color = <LED_COLOR_ID_AMBER>;
+                                               function = LED_FUNCTION_WAN;
+                                       };
+                               };
                        };
 
                        port@6 {