]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ARM: dts: bananapi: add support for PHY LEDs
authorMichael Klein <michael@fossekall.de>
Thu, 8 May 2025 17:36:56 +0000 (19:36 +0200)
committerChen-Yu Tsai <wens@csie.org>
Tue, 13 May 2025 09:35:59 +0000 (17:35 +0800)
The RTL8211E ethernet PHY driver has recently gained support for
controlling PHY LEDs via /sys/class/leds. The Bananapi M1 has three
LEDs connected to the RTL8211E PHY. Add the corresponding nodes to
the device tree.

Signed-off-by: Michael Klein <michael@fossekall.de>
Link: https://patch.msgid.link/20250508173657.8695-1-michael@fossekall.de
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm/boot/dts/allwinner/sun7i-a20-bananapi.dts

index 46ecf9db2324c13ceb843fc11643efdea4770089..d8b362c9661a3098419c57c8f8d35a4b3c098e22 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
 
 / {
        model = "LeMaker Banana Pi";
 &gmac_mdio {
        phy1: ethernet-phy@1 {
                reg = <1>;
+
+               leds {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       led@0 {
+                               reg = <0>;
+                               color = <LED_COLOR_ID_GREEN>;
+                               function = LED_FUNCTION_LAN;
+                               linux,default-trigger = "netdev";
+                       };
+
+                       led@1 {
+                               reg = <1>;
+                               color = <LED_COLOR_ID_AMBER>;
+                               function = LED_FUNCTION_LAN;
+                               linux,default-trigger = "netdev";
+                       };
+
+                       led@2 {
+                               reg = <2>;
+                               color = <LED_COLOR_ID_BLUE>;
+                               function = LED_FUNCTION_LAN;
+                               linux,default-trigger = "netdev";
+                       };
+               };
        };
 };