mpc85xx: Add QCA8327 LED nodes to tl-wdr4900-v1 dts
authorPawel Dembicki <paweldembicki@gmail.com>
Thu, 22 Aug 2024 12:49:31 +0000 (14:49 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 23 Aug 2024 08:53:29 +0000 (10:53 +0200)
This commit introduces led nodes in tl-wdr4900-v1 dts.
It allows to configure switch leds from userspace.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16226
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts

index b55fd2e7e7483a267a61d3f382f867a81cf63dfd..4fd9767d2d45500f6e46c30a37da433896afb253 100644 (file)
 
                                                nvmem-cells = <&macaddr_uboot_4fc00 1>;
                                                nvmem-cell-names = "mac-address";
+
+                                               leds {
+                                                       #address-cells = <1>;
+                                                       #size-cells = <0>;
+
+                                                       led@0 {
+                                                               reg = <0>;
+                                                               color = <LED_COLOR_ID_GREEN>;
+                                                               function = LED_FUNCTION_WAN;
+                                                               default-state = "keep";
+                                                       };
+                                               };
                                        };
 
                                        port@2 {
                                                reg = <2>;
                                                label = "lan1";
                                                phy-handle = <&phy_port2>;
+
+                                               leds {
+                                                       #address-cells = <1>;
+                                                       #size-cells = <0>;
+
+                                                       led@0 {
+                                                               reg = <0>;
+                                                               color = <LED_COLOR_ID_GREEN>;
+                                                               function = LED_FUNCTION_LAN;
+                                                               default-state = "keep";
+                                                       };
+                                               };
                                        };
 
                                        port@3 {
                                                reg = <3>;
                                                label = "lan2";
                                                phy-handle = <&phy_port3>;
+
+                                               leds {
+                                                       #address-cells = <1>;
+                                                       #size-cells = <0>;
+
+                                                       led@0 {
+                                                               reg = <0>;
+                                                               color = <LED_COLOR_ID_GREEN>;
+                                                               function = LED_FUNCTION_LAN;
+                                                               default-state = "keep";
+                                                       };
+                                               };
                                        };
 
                                        port@4 {
                                                reg = <4>;
                                                label = "lan3";
                                                phy-handle = <&phy_port4>;
+
+                                               leds {
+                                                       #address-cells = <1>;
+                                                       #size-cells = <0>;
+
+                                                       led@0 {
+                                                               reg = <0>;
+                                                               color = <LED_COLOR_ID_GREEN>;
+                                                               function = LED_FUNCTION_LAN;
+                                                               default-state = "keep";
+                                                       };
+                                               };
                                        };
 
                                        port@5 {
                                                reg = <5>;
                                                label = "lan4";
                                                phy-handle = <&phy_port5>;
+
+                                               leds {
+                                                       #address-cells = <1>;
+                                                       #size-cells = <0>;
+
+                                                       led@0 {
+                                                               reg = <0>;
+                                                               color = <LED_COLOR_ID_GREEN>;
+                                                               function = LED_FUNCTION_LAN;
+                                                               default-state = "keep";
+                                                       };
+                                               };
                                        };
                                };
                        };