]> www.infradead.org Git - linux.git/commitdiff
arm64: dts: ti: iot2050: Declare Ethernet PHY leds
authorDiogo Ivo <diogo.ivo@siemens.com>
Thu, 29 Aug 2024 13:28:29 +0000 (14:28 +0100)
committerNishanth Menon <nm@ti.com>
Sun, 1 Sep 2024 19:02:20 +0000 (14:02 -0500)
Each Ethernet PHY on IOT2050 platforms drives 3 LEDs whose triggers
can be configured to signal link properties such as connection status
or speed.

Declare the LEDs, exposing their trigger controls to userspace.

Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
Link: https://lore.kernel.org/r/20240829-ivo-iot2050_leds-v1-1-792a512b2178@siemens.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi

index e76828ccf21b551da10d44a81c7e6ab82a29a220..e5136ed947651736c5302f914939a4e57102b971 100644 (file)
                reg = <0>;
                ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
                ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+
+               leds {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       led@0 {
+                               reg = <0>;
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_LAN;
+                       };
+
+                       led@1 {
+                               reg = <1>;
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_SPEED_LAN;
+                       };
+
+                       led@2 {
+                               reg = <2>;
+                               color = <LED_COLOR_ID_YELLOW>;
+                               function = LED_FUNCTION_SPEED_LAN;
+                       };
+               };
        };
 
        icssg0_eth1_phy: ethernet-phy@1 {
                reg = <1>;
                ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
                ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
+
+               leds {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       led@0 {
+                               reg = <0>;
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_LAN;
+                       };
+
+                       led@1 {
+                               reg = <1>;
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_SPEED_LAN;
+                       };
+
+                       led@2 {
+                               reg = <2>;
+                               color = <LED_COLOR_ID_YELLOW>;
+                               function = LED_FUNCTION_SPEED_LAN;
+                       };
+               };
        };
 };