Skip to content

Commit d010f85

Browse files
mklein-dewens
authored andcommitted
ARM: dts: bananapi: add support for PHY LEDs
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Chen-Yu Tsai <[email protected]>
1 parent d8f1055 commit d010f85

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

arch/arm/boot/dts/allwinner/sun7i-a20-bananapi.dts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848

4949
#include <dt-bindings/gpio/gpio.h>
5050
#include <dt-bindings/interrupt-controller/irq.h>
51+
#include <dt-bindings/leds/common.h>
5152

5253
/ {
5354
model = "LeMaker Banana Pi";
@@ -169,6 +170,32 @@
169170
&gmac_mdio {
170171
phy1: ethernet-phy@1 {
171172
reg = <1>;
173+
174+
leds {
175+
#address-cells = <1>;
176+
#size-cells = <0>;
177+
178+
led@0 {
179+
reg = <0>;
180+
color = <LED_COLOR_ID_GREEN>;
181+
function = LED_FUNCTION_LAN;
182+
linux,default-trigger = "netdev";
183+
};
184+
185+
led@1 {
186+
reg = <1>;
187+
color = <LED_COLOR_ID_AMBER>;
188+
function = LED_FUNCTION_LAN;
189+
linux,default-trigger = "netdev";
190+
};
191+
192+
led@2 {
193+
reg = <2>;
194+
color = <LED_COLOR_ID_BLUE>;
195+
function = LED_FUNCTION_LAN;
196+
linux,default-trigger = "netdev";
197+
};
198+
};
172199
};
173200
};
174201

0 commit comments

Comments
 (0)