* [PATCH] arm64: dts: rockchip: rk3568-rock-3b: describe the Ethernet PHY LEDs
@ 2026-11-20 11:35 MidG971
2026-11-20 12:32 ` [PATCH v2] " MidG971
0 siblings, 1 reply; 2+ messages in thread
From: MidG971 @ 2026-11-20 11:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, Midgy BALON
From: Midgy BALON <midgy971@gmail.com>
The ROCK 3B RJ45 jack carries two LEDs wired to the RTL8211F PHY LED
pins. Describe them in the PHY nodes' "leds" subnode (binding:
Documentation/devicetree/bindings/net/ethernet-phy.yaml) so that
PHYLIB_LEDS instantiates one LED classdev per pin; the RTL8211F
driver drives them in hardware via led_hw_control_set (e.g. the
netdev trigger with link / rx+tx modes: amber = link, green =
activity).
Tooling disclosure (per Documentation/process/generated-content.rst):
the DT hunks in this patch were drafted with AI assistance (Mistral
Vibe), then reviewed by the author and verified on a ROCK 3B board:
the two PHY LEDs appear as stmmac-*:amber:lan / stmmac-*:green:lan
LED classdevs and drive the RJ45 jack LEDs via the netdev trigger
(amber = link, green = rx/tx activity, HW-offloaded to the PHY).
Signed-off-by remains with the human author per the DCO.
Signed-off-by: Midgy BALON <midgy971@gmail.com>
---
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
index 9eef59ef7d07..8ffd393cbfb6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
@@ -605,6 +607,22 @@ rgmii_phy0: ethernet-phy@1 {
reset-assert-us = <20000>;
reset-deassert-us = <50000>;
reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
};
};
@@ -615,6 +633,22 @@ rgmii_phy1: ethernet-phy@1 {
reset-assert-us = <20000>;
reset-deassert-us = <50000>;
reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
};
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2] arm64: dts: rockchip: rk3568-rock-3b: describe the Ethernet PHY LEDs
2026-11-20 11:35 [PATCH] arm64: dts: rockchip: rk3568-rock-3b: describe the Ethernet PHY LEDs MidG971
@ 2026-11-20 12:32 ` MidG971
0 siblings, 0 replies; 2+ messages in thread
From: MidG971 @ 2026-11-20 12:32 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: devicetree, linux-arm-kernel, linux-rockchip, Midgy BALON
From: Midgy BALON <midgy971@gmail.com>
The ROCK 3B RJ45 jack carries two LEDs wired to the RTL8211F PHY LED
pins. Describe them in the PHY nodes' "leds" subnode (binding:
Documentation/devicetree/bindings/net/ethernet-phy.yaml) so that
PHYLIB_LEDS instantiates one LED classdev per pin; the RTL8211F
driver drives them in hardware via led_hw_control_set (e.g. the
netdev trigger with link / rx+tx modes: amber = link, green =
activity).
Tooling disclosure (per Documentation/process/generated-content.rst):
the DT hunks in this patch were drafted with AI assistance (Mistral
Vibe), then reviewed by the author and verified on a ROCK 3B board:
the two PHY LEDs appear as stmmac-*:amber:lan / stmmac-*:green:lan
LED classdevs and drive the RJ45 jack LEDs via the netdev trigger
(amber = link, green = rx/tx activity, HW-offloaded to the PHY).
Changes in v2:
- Fix leds subnode indentation (align with the enclosing PHY node)
and add the blank line after reset-gpios, per the Sashiko AI review
and Documentation/devicetree/bindings/dts-coding-style.rst.
Signed-off-by: Midgy BALON <midgy971@gmail.com>
---
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
index 9eef59ef7d07..9303242d20cf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3b.dts
@@ -605,6 +607,23 @@ rgmii_phy0: ethernet-phy@1 {
reset-assert-us = <20000>;
reset-deassert-us = <50000>;
reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
};
};
@@ -615,6 +634,23 @@ rgmii_phy1: ethernet-phy@1 {
reset-assert-us = <20000>;
reset-deassert-us = <50000>;
reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_AMBER>;
+ function = LED_FUNCTION_LAN;
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ };
+ };
};
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-20 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 11:35 [PATCH] arm64: dts: rockchip: rk3568-rock-3b: describe the Ethernet PHY LEDs MidG971
2026-11-20 12:32 ` [PATCH v2] " MidG971
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox