Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+47
+22
arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
··· 5 5 #include "bcm283x-rpi-led-deprecated.dtsi" 6 6 #include "bcm283x-rpi-usb-peripheral.dtsi" 7 7 #include "bcm283x-rpi-wifi-bt.dtsi" 8 + #include <dt-bindings/leds/common.h> 8 9 9 10 / { 10 11 compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; ··· 205 204 phy1: ethernet-phy@1 { 206 205 /* No PHY interrupt */ 207 206 reg = <0x1>; 207 + 208 + leds { 209 + #address-cells = <1>; 210 + #size-cells = <0>; 211 + 212 + /* LED1 */ 213 + led@0 { 214 + reg = <0>; 215 + color = <LED_COLOR_ID_GREEN>; 216 + function = LED_FUNCTION_LAN; 217 + default-state = "keep"; 218 + }; 219 + 220 + /* LED2 */ 221 + led@1 { 222 + reg = <1>; 223 + color = <LED_COLOR_ID_AMBER>; 224 + function = LED_FUNCTION_LAN; 225 + default-state = "keep"; 226 + }; 227 + }; 208 228 }; 209 229 }; 210 230
+1
arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dts
··· 30 30 31 31 &genet_mdio { 32 32 clock-frequency = <1950000>; 33 + /delete-node/ leds; 33 34 }; 34 35 35 36 &led_pwr {
+24
arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /dts-v1/; 3 + #include <dt-bindings/leds/common.h> 3 4 #include "bcm2711-rpi-cm4.dtsi" 4 5 #include "bcm283x-rpi-led-deprecated.dtsi" 5 6 #include "bcm283x-rpi-usb-host.dtsi" ··· 108 107 compatible = "nxp,pcf85063a"; 109 108 reg = <0x51>; 110 109 quartz-load-femtofarads = <7000>; 110 + }; 111 + }; 112 + 113 + &phy1 { 114 + leds { 115 + #address-cells = <1>; 116 + #size-cells = <0>; 117 + 118 + /* LED2 */ 119 + led@1 { 120 + reg = <1>; 121 + color = <LED_COLOR_ID_GREEN>; 122 + function = LED_FUNCTION_LAN; 123 + default-state = "keep"; 124 + }; 125 + 126 + /* LED3 */ 127 + led@2 { 128 + reg = <2>; 129 + color = <LED_COLOR_ID_AMBER>; 130 + function = LED_FUNCTION_LAN; 131 + default-state = "keep"; 132 + }; 111 133 }; 112 134 }; 113 135