Skip to content

Commit a3592fa

Browse files
committed
arm: dts: bcm2711: Describe Ethernet LEDs
Describe the Ethernet LEDs for the Raspberry Pi 4 model B board as well as the Raspberry Pi 4 CM board. The Raspberry Pi 400 board does not include RJ45 connector LEDs so the 'leds' node is deleted accordingly. The Ethernet PHY LEDs are numbered in the PHY package/pin list from LED1 through LED4, however their address within the LED registers function selector is 0-indexed. Link: https://lore.kernel.org/r/20240423191500.1443636-1-florian.fainelli@broadcom.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
1 parent 4dd01a3 commit a3592fa

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "bcm283x-rpi-led-deprecated.dtsi"
66
#include "bcm283x-rpi-usb-peripheral.dtsi"
77
#include "bcm283x-rpi-wifi-bt.dtsi"
8+
#include <dt-bindings/leds/common.h>
89

910
/ {
1011
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
@@ -204,6 +205,27 @@
204205
phy1: ethernet-phy@1 {
205206
/* No PHY interrupt */
206207
reg = <0x1>;
208+
209+
leds {
210+
#address-cells = <1>;
211+
#size-cells = <0>;
212+
213+
/* LED1 */
214+
led@0 {
215+
reg = <0>;
216+
color = <LED_COLOR_ID_GREEN>;
217+
function = LED_FUNCTION_LAN;
218+
default-state = "keep";
219+
};
220+
221+
/* LED2 */
222+
led@1 {
223+
reg = <1>;
224+
color = <LED_COLOR_ID_AMBER>;
225+
function = LED_FUNCTION_LAN;
226+
default-state = "keep";
227+
};
228+
};
207229
};
208230
};
209231

arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
&genet_mdio {
3232
clock-frequency = <1950000>;
33+
/delete-node/ leds;
3334
};
3435

3536
&led_pwr {

arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/dts-v1/;
3+
#include <dt-bindings/leds/common.h>
34
#include "bcm2711-rpi-cm4.dtsi"
45
#include "bcm283x-rpi-led-deprecated.dtsi"
56
#include "bcm283x-rpi-usb-host.dtsi"
@@ -110,6 +111,29 @@
110111
};
111112
};
112113

114+
&phy1 {
115+
leds {
116+
#address-cells = <1>;
117+
#size-cells = <0>;
118+
119+
/* LED2 */
120+
led@1 {
121+
reg = <1>;
122+
color = <LED_COLOR_ID_GREEN>;
123+
function = LED_FUNCTION_LAN;
124+
default-state = "keep";
125+
};
126+
127+
/* LED3 */
128+
led@2 {
129+
reg = <2>;
130+
color = <LED_COLOR_ID_AMBER>;
131+
function = LED_FUNCTION_LAN;
132+
default-state = "keep";
133+
};
134+
};
135+
};
136+
113137
&led_act {
114138
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
115139
};

0 commit comments

Comments
 (0)