arm64: dts: rockchip: Turn all LEDs on at boot for Radxa boards
Subsystems (2)
PATCH v2 1/1 arm64: dts: rockchip: Turn all LEDs on at boot for Radxa boards
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have default-state property in Linux kernel tree but have it in U-Boot tree instead[1].
This patch adds default-state = "on" for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).
Also, remove following redundant properties:
linux,default-trigger = "default-on"; // use default-state = "on" default-state = "off"; // default is "off"
[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3328-rock-pi-e-base-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi#L11-17
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-radxa-cm3-io-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-rock-3c-u-boot.dtsi#L14-16
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi#L7-24
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12
---
Changes in v2:
- Add more URLs for reference
- Reword commit message
--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 1 + arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts | 1 - arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 + arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 + arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 1 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 3 ++- 16 files changed, 16 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +0 -1
@@ -35,7 +35,6 @@ green-led { function = LED_FUNCTION_POWER; gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; label = "rockpis:green:power"; - linux,default-trigger = "default-on"; }; blue-led {
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +1 -0
@@ -59,6 +59,7 @@ leds { led-0 { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; };
arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts +2 -1
@@ -39,14 +39,15 @@ leds { led-0 { function = LED_FUNCTION_POWER; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; /* USER_LED2 */ led-1 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1 -0
@@ -35,6 +35,7 @@ leds { led-0 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };
arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +0 -2
@@ -62,7 +62,6 @@ leds { led-lan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";
@@ -78,7 +77,6 @@ led-sys { led-wan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";
arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts +0 -1
@@ -45,7 +45,6 @@ led-1 { default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; };
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts +1 -0
@@ -46,6 +46,7 @@ leds { led-1 { gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_ACTIVITY; linux,default-trigger = "heartbeat"; pinctrl-names = "default";
arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts +1 -0
@@ -47,6 +47,7 @@ led-0 { gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&user_led2>;
arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi +1 -0
@@ -23,6 +23,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +1 -0
@@ -47,6 +47,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;
arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts +2 -1
@@ -52,13 +52,14 @@ leds: leds { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; user-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_HEARTBEAT; gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat";
arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts +0 -2
@@ -71,7 +71,6 @@ leds-1 { led-1 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; linux,default-trigger = "netdev"; pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>;
@@ -80,7 +79,6 @@ led-1 { led-2 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; linux,default-trigger = "netdev"; pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>;
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +2 -1
@@ -88,11 +88,12 @@ gpio-leds { pinctrl-0 = <&led_pins>; power-led1 { + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; hdd-led2 { + default-state = "on"; gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "disk-activity"; };
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi +1 -0
@@ -30,6 +30,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };
arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts +1 -0
@@ -33,6 +33,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +2 -1
@@ -54,6 +54,7 @@ leds { io-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat";
@@ -61,9 +62,9 @@ io-led { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_POWER; gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; };
Signature · 7 lines
2.43.0 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hello Naoki,
Thanks for the v2. Please, see a couple of remarks below.
Quoted 1 line · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't
s/Radxa's/Radxa/ -- because those are boards made by Radxa, not some boards belonging to Radxa; if it were specifically about the board designs, the possessive form would be fine, for example
Quoted 11 lines
have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Also, remove following redundant properties:
linux,default-trigger = "default-on"; // use default-state = "on" default-state = "off"; // default is "off"
Quoted 10 lines
[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3328-rock-pi-e-base-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi#L11-17
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-radxa-cm3-io-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-rock-3c-u-boot.dtsi#L14-16
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi#L7-24
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12
Hmm, this particularly complex reference presents us with a somewhat interesting literary challenge. :) There should be only one URL per reference, so one way to resolve this would be to reword the opening paragraph like this:
Radxa boards are intended to turn all their LEDs on at boot time, as part of the intended visual feedback to the end users, but some boards don't have the associated "default-state" LED properties defined in the Linux kernel, yet they have them defined in U-Boot. This includes ROCK Pi E, [1] ROCK 4C+, [2] ROCK Pi 4, [3] CM3, [4] ROCK 3C, [5] E25, [6] ROCK 3A, [7] ROCK 5B, [8] and ROCK 5A. [9]
[1] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3328-rock-pi-e-base-u-boot.dtsi#L10-12
[2] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi#L11-17
[3] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi#L11-13
[4] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-radxa-cm3-io-u-boot.dtsi#L10-12
[5] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-rock-3c-u-boot.dtsi#L14-16
[6] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi#L7-24
[7] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi#L11-13
[8] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi#L11-13
[9] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12
Of course, it would also make sense to order the list of boards and the associated references alphabetically, which would make the list more readable and is left as an exercise. :)
Quoted 23 lines
Signed-off-by FUKAUMI Naoki <[email protected]>---
Changes in v2:
- Add more URLs for reference
- Reword commit message--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 1 + arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts | 1 - arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 + arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 + arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 1 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 3 ++- 16 files changed, 16 insertions(+), 10 deletions(-)
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
Quoted 4 lines
Also, remove following redundant properties:
linux,default-trigger = "default-on"; // use default-state = "on" default-state = "off"; // default is "off"
Quoted 9 lines
[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3328-rock-pi-e-base-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi#L11-17
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-radxa-cm3-io-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-rock-3c-u-boot.dtsi#L14-16
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi#L7-24
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi#L11-13
That the *bootloader* turns them on, is fine by me as it signals the board has received power and the bootloader has started.
I don't think that that automatically means that Linux must do the same.
Not a Radxa board, but the PineTab2's keyboard LEDs are turned on. I find that useful wrt the bootloader, but (actually) annoying that it is on by default with Linux. When I want/need backlight on the keyboard, I'll turn it on myself. Now I need to turn it off in 90% of cases.
My 0.02
Quoted 268 lines
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12
Signed-off-by FUKAUMI Naoki <[email protected]>---
Changes in v2:
- Add more URLs for reference
- Reword commit message--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 1 + arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts | 1 - arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 + arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 + arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 1 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 3 ++- 16 files changed, 16 insertions(+), 10 deletions(-)arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +0
-1@@ -35,7 +35,6 @@ green-led { function = LED_FUNCTION_POWER; gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; label = "rockpis:green:power"; - linux,default-trigger = "default-on"; }; blue-led {arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +1
-0@@ -59,6 +59,7 @@ leds { led-0 { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts +2
-1@@ -39,14 +39,15 @@ leds { led-0 { function = LED_FUNCTION_POWER; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; /* USER_LED2 */ led-1 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1
-0@@ -35,6 +35,7 @@ leds { led-0 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +0
-2@@ -62,7 +62,6 @@ leds { led-lan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";@@ -78,7 +77,6 @@ led-sys { led-wan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts +0
-1@@ -45,7 +45,6 @@ led-1 { default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; };arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts +1
-0@@ -46,6 +46,7 @@ leds { led-1 { gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_ACTIVITY; linux,default-trigger = "heartbeat"; pinctrl-names = "default";arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts +1
-0@@ -47,6 +47,7 @@ led-0 { gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&user_led2>;arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi +1
-0@@ -23,6 +23,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +1
-0@@ -47,6 +47,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts +2
-1@@ -52,13 +52,14 @@ leds: leds { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; user-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_HEARTBEAT; gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat";arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts +0
-2@@ -71,7 +71,6 @@ leds-1 { led-1 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; linux,default-trigger = "netdev"; pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>;@@ -80,7 +79,6 @@ led-1 { led-2 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; linux,default-trigger = "netdev"; pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>;arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +2
-1@@ -88,11 +88,12 @@ gpio-leds { pinctrl-0 = <&led_pins>; power-led1 { + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; hdd-led2 { + default-state = "on"; gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "disk-activity"; };arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi +1
-0@@ -30,6 +30,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts +1
-0@@ -33,6 +33,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +2
-1@@ -54,6 +54,7 @@ leds { io-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat";@@ -61,9 +62,9 @@ io-led { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_POWER; gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; };
Hello Diederik,
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).
Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
Hi Diederik, Dragan,
Quoted 25 lines · Dragan Simic
Hello Diederik,
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using default-state = "on". The use of the Linux-specific property linux,default-trigger = "default-on" is unsuitable for non-Linux environments.
- 2nd (Heartbeat) LED
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
On Linux, usually this is used as linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of the default-state setting), and its behavior can be modified in user space.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hello all,
(+ Quentin)
Quoted 41 lines · FUKAUMI Naoki
Quoted 23 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default-on"is unsuitable for non-Linux environments.- 2nd (Heartbeat) LED
Quoted 7 lines
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault-statesetting), and its behavior can be modified in user space.
As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the LED_BOOT feature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.
[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
Hi all,
Quoted 54 lines · Dragan Simic
Hello all,
(+ Quentin)
Quoted 41 lines · FUKAUMI Naoki
Quoted 23 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default-on"is unsuitable for non-Linux environments.- 2nd (Heartbeat) LED
Quoted 7 lines
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault-statesetting), and its behavior can be modified in user space.
Quoted 9 lines
As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The LED_BOOT feature (guarded by the Kconfig symbol of the same name) in U-Boot only applies if /options/u-boot/boot-led property is set.
If the driver for the LED (typically a GPIO LED controller I guess, so LED_GPIO symbol) is compiled in, then, as far as I could tell, the Boot LED will be turned on right before entering the main loop of U-Boot.
If LED_BLINK (if HW blinking is supported) or LED_SW_BLINK is enabled, the Boot LED will be blinking some time after relocation but still turned on soon after (if it reaches that part of the code). This means it'll be on before the kernel starts.
I'm not sure there's a way to hook something *after* we've entered U-Boot main-loop (read "call led_boot_blink() from some board file"), aside from calling led <led-name> blink <period> from U-Boot CLI.
I'm a bit bummed by this behavior, I would have preferred the ability to have the Boot LED blink until the kernel starts. I could then have a different period for U-Boot (50% duty cycle at 250ms period by default) and for the kernel. Of course, if it's SW blinking, once exiting U-Boot it won't blink anymore until the kernel takes over, but that's also a nice information to have. Anyway, I'm not sure this is actually possible with the LED_BOOT feature though one should be able to do this by specifying the label of an LED node to fetch from DT and then calling led_set_period(dev, period_ms); followed by led_set_state(dev, LEDST_BLINK); in a board file, but this is also not so nice as it then also requires some C board-specific code in U-Boot.
In U-Boot, only LEDs which have a "default-state" properties will be auto-configured, otherwise one needs to control them manually (e.g. via the led CLI command).
If one wants to detect via an LED the current boot stage (U-Boot reached, kernel started), then we need to NOT use LED_BOOT feature and have U-Boot set the "boot" LED the opposite state than the default HW state, i.e. if the LED is on without any running SW (power applied to the device, empty boot media), then U-Boot should set it to off. Then the kernel simply needs to start the heartbeat mode whenever ready. If the default HW state is off, then U-Boot should set it on. I haven't looked into the kernel side of things, but there could be a window during which default-state property is applied before the heartbeat is actually started.
The logic exposed in the previous paragraph should provide visual cues on the current boot stage.
Note that LEDs with linux,default-trigger = "pattern" (with default-state property) will be blinking once auto-configured in U-Boot as well according to my reading of the led-uclass.c.
Hope this helps.
Cheers,
Quentin
Hi Quentin,
Quoted 64 lines · Quentin Schulz
Hi all,
Quoted 61 lines · Dragan Simic
Hello all,
(+ Quentin)
Quoted 41 lines · FUKAUMI Naoki
Quoted 23 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default-on"is unsuitable for non-Linux environments.- 2nd (Heartbeat) LED
Quoted 7 lines
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault-statesetting), and its behavior can be modified in user space.As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.
Quoted 4 lines
Quoted 2 lines
[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The
LED_BOOTfeature (guarded by theKconfigsymbol of the same name) in U-Boot only applies if /options/u-boot/boot-led property is set.
For the default state of the heartbeat LED, I'm thinking of using LED_BOOT (/options/u-boot/boot-led), but I'm concerned that this is U-Boot-specific.
Quoted 9 lines
If the driver for the LED (typically a GPIO LED controller I guess, so
LED_GPIOsymbol) is compiled in, then, as far as I could tell, the Boot LED will be turned on right before entering the main loop of U-Boot.If
LED_BLINK(if HW blinking is supported) orLED_SW_BLINKis enabled, the Boot LED will be blinking some time after relocation but still turned on soon after (if it reaches that part of the code). This means it'll be on before the kernel starts.I'm not sure there's a way to hook something *after* we've entered U- Boot main-loop (read "call
led_boot_blink()from some board file"), aside from callingled <led-name> blink <period>from U-Boot CLI.I'm a bit bummed by this behavior, I would have preferred the ability to have the Boot LED blink until the kernel starts. I could then have a different period for U-Boot (50% duty cycle at 250ms period by default) and for the kernel. Of course, if it's SW blinking, once exiting U-Boot it won't blink anymore until the kernel takes over, but that's also a nice information to have. Anyway, I'm not sure this is actually possible with the
LED_BOOTfeature though one should be able to do this by specifying the label of an LED node to fetch from DT and then callingled_set_period(dev, period_ms); followed byled_set_state(dev, LEDST_BLINK); in a board file, but this is also not so nice as it then also requires some C board-specific code in U-Boot.In U-Boot, only LEDs which have a "default-state" properties will be auto-configured, otherwise one needs to control them manually (e.g. via the
ledCLI command).
As you know, default "default-state" is "off".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml?h=v6.17#n74
As far as I understand, there should not be any workarounds for specific implementations.
https://lore.kernel.org/linux-rockchip/3389401.44csPzL39Z@phil/
So removing default-state = "off" is acceptable, right?
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 11 lines
If one wants to detect via an LED the current boot stage (U-Boot reached, kernel started), then we need to NOT use
LED_BOOTfeature and have U-Boot set the "boot" LED the opposite state than the default HW state, i.e. if the LED is on without any running SW (power applied to the device, empty boot media), then U-Boot should set it to off. Then the kernel simply needs to start the heartbeat mode whenever ready. If the default HW state is off, then U-Boot should set it on. I haven't looked into the kernel side of things, but there could be a window during which default-state property is applied before the heartbeat is actually started.The logic exposed in the previous paragraph should provide visual cues on the current boot stage.
Note that LEDs with linux,default-trigger = "pattern" (with default- state property) will be blinking once auto-configured in U-Boot as well according to my reading of the
led-uclass.c.Hope this helps.
Cheers,
Quentin
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Naoki,
Quoted 61 lines · FUKAUMI Naoki
Quoted 60 lines · Quentin Schulz
Quoted 59 lines · Dragan Simic
Quoted 42 lines · FUKAUMI Naoki
Quoted 24 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default-on"is unsuitable for non-Linux environments.- 2nd (Heartbeat) LED
Quoted 7 lines
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault-statesetting), and its behavior can be modified in user space.As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The
LED_BOOTfeature (guarded by theKconfigsymbol of the same name) in U-Boot only applies if /options/u-boot/boot-led property is set.For the default state of the heartbeat LED, I'm thinking of using
LED_BOOT(/options/u-boot/boot-led), but I'm concerned that this is U-Boot-specific.
If U-Boot wants to use the heartbeat LED to signal the *bootloader* is running, I guess that's fine. And if you want to make it solid or blinking, that seems best discussed on the U-Boot ML.
I still consider the bootloader and the kernel stages separate. And I haven't seen an argument why I should change *my* opinion on the heartbeat and netdev triggers (default-state) wrt the kernel.
I don't think that what U-Boot does or doesn't do, should determine what the Linux kernel does or doesn't do.
I have no plans to use another bootloader then U-Boot, but it's possible that people do, so what the Linux kernel does should be independent from what the/a specific bootloader does.
And as I said before, *I* want LEDs with netdev and heartbeat triggers, to be off (at the start, which is indeed the default value). I use the heartbeat trigger to:
1) See the kernel has started (and has gotten to the point the heartbeat 'infrastructure' has been set up
2) Wait for the blinking to slow down as that (generally) means it's pretty much done with the boot process and the SSH server should probably be running then, so I can login
3) When the heartbeat LED is solid, that means the system has crashed (f.e. due to overheating ...)
And also, if you're going to change/override other people's choices, a motivation as to why would be 'nice'.
Quoted 10 lines
Quoted 1 line
<more discussion about LED functionality in U-Boot ...>
As you know, default "default-state" is "off".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml?h=v6.17#n74As far as I understand, there should not be any workarounds for specific implementations.
https://lore.kernel.org/linux-rockchip/3389401.44csPzL39Z@phil/So removing
default-state = "off"is acceptable, right?
I don't see/understand the connection with 'workarounds for specific implementations' with removing ``default-state = "off"``.
IMO it's perfectly fine to remove ``default-state = "off"``, although having it explicitly may be useful, especially if the commit that set that property specified *why* it should be "off".
Relatedly, when a node does not have the 'default-state' property, I would _assume_ the author wanted/intended it to be "off". Ideally it would be described in the commit message, but that is optional. But if that is changed, then it should be motivated *why*.
Cheers,
Diederik
Quoted 30 lines
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.Quoted 23 lines
If one wants to detect via an LED the current boot stage (U-Boot reached, kernel started), then we need to NOT use
LED_BOOTfeature and have U-Boot set the "boot" LED the opposite state than the default HW state, i.e. if the LED is on without any running SW (power applied to the device, empty boot media), then U-Boot should set it to off. Then the kernel simply needs to start the heartbeat mode whenever ready. If the default HW state is off, then U-Boot should set it on. I haven't looked into the kernel side of things, but there could be a window during which default-state property is applied before the heartbeat is actually started.The logic exposed in the previous paragraph should provide visual cues on the current boot stage.
Note that LEDs with linux,default-trigger = "pattern" (with default- state property) will be blinking once auto-configured in U-Boot as well according to my reading of the
led-uclass.c.Hope this helps.
Cheers,
Quentin
Hi all,
Quoted 49 lines · Diederik de Haas
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Naoki,
Quoted 44 lines · FUKAUMI Naoki
Quoted 43 lines · Quentin Schulz
Quoted 42 lines · Dragan Simic
Quoted 40 lines · FUKAUMI Naoki
Quoted 24 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default-on"is unsuitable for non-Linux environments.
I think the wording in the binding can be understood two ways.
The binding says the following about the default-state property:
"""
The initial state of the LED. If the LED is already on or off and the default-state property is set the to same value, then no glitch
should be
produced where the LED momentarily turns off (or on). The "keep"
setting
will keep the LED at whatever its current state is, without
producing a
glitch.
"""
I think the issue here is around the meaning of "initial state". I believe Naoki is probably thinking about the **HW** initial state of the LED, which is whatever is the state of the LED without SW control. I think Diederik is thinking about this being the state of the LED right when the SW takes over and configures the LED before the trigger is setup.
In the first interpretation, there's no need for an "improvement" for the patches as they would just fix correctness of the DT wrt HW state at boot.
In the second interpretation, a change of this value must be justified as people will simply disagree forever and we could end up with people reverting other people's patches after each release. If it's just a matter of taste, I believe the typical answer is keeping the status quo.
We should find a way to make this binding not up to interpretation.
Additionally, if the LED cannot be controlled on some boards, I don't think it should be part of the DT.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
- 2nd (Heartbeat) LED
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
My understanding is Naoki wants to use default-state = on, for the bootloader to turn it on as soon as it takes over control of the LEDs.
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Quoted 3 lines
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault-statesetting), and its behavior can be modified in user space.Quoted 8 lines
As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The
LED_BOOTfeature (guarded by theKconfigsymbol of the same name) in U-Boot only applies if /options/u-boot/boot-led property is set.
Quoted 8 lines
Quoted 3 lines
For the default state of the heartbeat LED, I'm thinking of using
LED_BOOT(/options/u-boot/boot-led), but I'm concerned that this is U-Boot-specific.If U-Boot wants to use the heartbeat LED to signal the *bootloader* is running, I guess that's fine. And if you want to make it solid or blinking, that seems best discussed on the U-Boot ML.
The solution may still involve configuring the Device Tree, and we're trying to have U-Boot-specific changes to the Device Tree in U-Boot source tree to a minimum.
Quoted 1 line
I still consider the bootloader and the kernel stages separate.
They do however share most of their Device Tree (for Rockchip at least) and the least (ideally no) changes we can have in U-Boot the better.
Quoted 3 lines
And I haven't seen an argument why I should change *my* opinion on the heartbeat and netdev triggers (default-state) wrt the kernel.
Device Tree is not kernel specific as you said already.
Quoted 2 lines
I don't think that what U-Boot does or doesn't do, should determine what the Linux kernel does or doesn't do.
It shouldn't, but (most of) the Device Tree is shared, so you cannot just dismiss U-Boot behavior when talking about Linux behavior based on Device Tree interpretation. We may have a need for a bootloader-specific property. We have a Linux-specific one after all (linux,default-trigger). Though... that does seem to be on the edge of what the DT is made for (description of the HW, not logic/policy).
Quoted 4 lines
I have no plans to use another bootloader then U-Boot, but it's possible that people do, so what the Linux kernel does should be independent from what the/a specific bootloader does.
Barebox also uses upstream DT as far as I know and supports some Radxa products (Rock 5B/5T/..., CM3, Rock (RK3188), Rock 3A from the arch/arm/boards/radxa-* directories). Zephyr has support for RK3568, RK3588, and other SoCs, and uses upstream DT as well.
Again, we're talking about modifications of the Device Tree here, so typically I would expect all consumers of that DT to be interpreting the properties the same way, except if you have OS-specific properties/nodes (think u-boot,config-compatible nodes, linux, prefixed properties, bootph- properties, ...).
Quoted 11 lines
And as I said before, *I* want LEDs with netdev and heartbeat triggers, to be off (at the start, which is indeed the default value). I use the heartbeat trigger to:
1) See the kernel has started (and has gotten to the point the heartbeat 'infrastructure' has been set up
2) Wait for the blinking to slow down as that (generally) means it's pretty much done with the boot process and the SSH server should probably be running then, so I can login
3) When the heartbeat LED is solid, that means the system has crashed (f.e. due to overheating ...)
If the *HW* default state of the LED is off and the default-state property is off, then you won't be able to tell apart a completely bricked board and one that is stuck somewhere between U-Boot proper and the Linux kernel taking over that LED.
Quoted 12 lines
And also, if you're going to change/override other people's choices, a motivation as to why would be 'nice'.
Quoted 9 lines
Quoted 1 line
<more discussion about LED functionality in U-Boot ...>
As you know, default "default-state" is "off".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml?h=v6.17#n74As far as I understand, there should not be any workarounds for specific implementations.
https://lore.kernel.org/linux-rockchip/3389401.44csPzL39Z@phil/
Quoted 9 lines
Quoted 1 line
So removing
default-state = "off"is acceptable, right?I don't see/understand the connection with 'workarounds for specific implementations' with removing ``default-state = "off"``.
IMO it's perfectly fine to remove ``default-state = "off"``, although having it explicitly may be useful, especially if the commit that set that property specified *why* it should be "off".
The status property defaults to okay, and we do not want them to be listed explicitly. Not sure if there's consensus on applying this to all properties which have defaults, across all subsystems.
Quoted 3 lines
Relatedly, when a node does not have the 'default-state' property, I would _assume_ the author wanted/intended it to be "off". Ideally it would be described in the commit message, but that is optional.
The lack of a property doesn't necessarily mean it was forgotten, agreed.
Quoted 2 lines
But if that is changed, then it should be motivated *why*.
Agreed.
Cheers,
Quentin
Hi all,
My goal is to minimize the DTS fragments (u-boot/arch/arm/dts/*-u-boot.dtsi) in U-Boot, consolidate them upstream, and improve clarity/visibility.
Quoted 47 lines · Quentin Schulz
Hi all,
Quoted 44 lines · Diederik de Haas
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Naoki,
Quoted 39 lines · FUKAUMI Naoki
Quoted 38 lines · Quentin Schulz
Quoted 37 lines · Dragan Simic
Quoted 35 lines · FUKAUMI Naoki
Quoted 24 lines · Dragan Simic
Quoted 9 lines · Diederik de Haas
Quoted 7 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Quoted 5 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.
That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software intervention. (On some boards, this LED cannot be controlled by software at all.)
I'm not saying the DTS has anything about LEDs that can't be controlled by software, nor am I trying to add such a thing to the DTS.
I'm just pointing out that the power LED is always on right after power-up. This makes it useless for determining if the software is running.
Quoted 75 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
In DTS, this should be described using
default-state = "on". The use of the Linux-specific propertylinux,default-trigger = "default- on"is unsuitable for non-Linux environments.I think the wording in the binding can be understood two ways.
The binding says the following about the default-state property:
"""
The initial state of the LED. If the LED is already on or off and
the
default-state property is set the to same value, then no glitch
should be
produced where the LED momentarily turns off (or on). The "keep"
setting
will keep the LED at whatever its current state is, without
producing a
glitch.
"""I think the issue here is around the meaning of "initial state". I believe Naoki is probably thinking about the **HW** initial state of the LED, which is whatever is the state of the LED without SW control. I think Diederik is thinking about this being the state of the LED right when the SW takes over and configures the LED before the trigger is setup.
In the first interpretation, there's no need for an "improvement" for the patches as they would just fix correctness of the DT wrt HW state at boot.
In the second interpretation, a change of this value must be justified as people will simply disagree forever and we could end up with people reverting other people's patches after each release. If it's just a matter of taste, I believe the typical answer is keeping the status quo.
We should find a way to make this binding not up to interpretation.
Additionally, if the LED cannot be controlled on some boards, I don't think it should be part of the DT.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
- 2nd (Heartbeat) LED
The 2nd (heartbeat) LED can be controlled by software. It should be lit up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.
My understanding is Naoki wants to use default-state = on, for the bootloader to turn it on as soon as it takes over control of the LEDs.
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 4 lines
Quoted 3 lines
On Linux, usually this is used as
linux,default-trigger = "heartbeat". It indicates that kernel is running (regardless of thedefault- statesetting), and its behavior can be modified in user space.Quoted 8 lines
As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The
LED_BOOTfeature (guarded by theKconfigsymbol of the same name) in U-Boot only applies if /options/u-boot/boot-led property is set.Quoted 8 lines
Quoted 3 lines
For the default state of the heartbeat LED, I'm thinking of using
LED_BOOT(/options/u-boot/boot-led), but I'm concerned that this is U-Boot-specific.If U-Boot wants to use the heartbeat LED to signal the *bootloader* is running, I guess that's fine. And if you want to make it solid or blinking, that seems best discussed on the U-Boot ML.
The solution may still involve configuring the Device Tree, and we're trying to have U-Boot-specific changes to the Device Tree in U-Boot source tree to a minimum.
Quoted 1 line
I still consider the bootloader and the kernel stages separate.
They do however share most of their Device Tree (for Rockchip at least) and the least (ideally no) changes we can have in U-Boot the better.
Quoted 3 lines
And I haven't seen an argument why I should change *my* opinion on the heartbeat and netdev triggers (default-state) wrt the kernel.
Quoted 10 lines
Device Tree is not kernel specific as you said already.
Quoted 2 lines
I don't think that what U-Boot does or doesn't do, should determine what the Linux kernel does or doesn't do.
It shouldn't, but (most of) the Device Tree is shared, so you cannot just dismiss U-Boot behavior when talking about Linux behavior based on Device Tree interpretation. We may have a need for a bootloader-specific property. We have a Linux-specific one after all (linux,default- trigger). Though... that does seem to be on the edge of what the DT is made for (description of the HW, not logic/policy).
Quoted 3 lines
I have no plans to use another bootloader then U-Boot, but it's possible that people do, so what the Linux kernel does should be independent from what the/a specific bootloader does.
Each software should be independent, but hardware (state) cannot be independent.
Quoted 6 lines
Barebox also uses upstream DT as far as I know and supports some Radxa products (Rock 5B/5T/..., CM3, Rock (RK3188), Rock 3A from the
arch/arm/boards/radxa-* directories). Zephyr has support for RK3568, RK3588, and other SoCs, and uses upstream DT as well.Again, we're talking about modifications of the Device Tree here, so typically I would expect all consumers of that DT to be interpreting the properties the same way, except if you have OS-specific properties/nodes (think u-boot,config-compatible nodes, linux, prefixed properties, bootph- properties, ...).
Quoted 2 lines
And as I said before, *I* want LEDs with netdev and heartbeat triggers, to be off (at the start, which is indeed the default value).
If you are using U-Boot, heartbeat LED is already on by U-Boot, e.g.
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12
But it's not visible in DTS in Linux,
e.g.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts?h=v6.17#n55
I think this situation should be fixed.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 42 lines
Quoted 9 lines
I use the heartbeat trigger to:
1) See the kernel has started (and has gotten to the point the heartbeat 'infrastructure' has been set up
2) Wait for the blinking to slow down as that (generally) means it's pretty much done with the boot process and the SSH server should probably be running then, so I can login
3) When the heartbeat LED is solid, that means the system has crashed (f.e. due to overheating ...)If the *HW* default state of the LED is off and the default-state property is off, then you won't be able to tell apart a completely bricked board and one that is stuck somewhere between U-Boot proper and the Linux kernel taking over that LED.
Quoted 12 lines
And also, if you're going to change/override other people's choices, a motivation as to why would be 'nice'.
Quoted 9 lines
Quoted 1 line
<more discussion about LED functionality in U-Boot ...>
As you know, default "default-state" is "off".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml? h=v6.17#n74As far as I understand, there should not be any workarounds for specific implementations.
https://lore.kernel.org/linux-rockchip/3389401.44csPzL39Z@phil/Quoted 9 lines
Quoted 1 line
So removing
default-state = "off"is acceptable, right?I don't see/understand the connection with 'workarounds for specific implementations' with removing ``default-state = "off"``.
IMO it's perfectly fine to remove ``default-state = "off"``, although having it explicitly may be useful, especially if the commit that set that property specified *why* it should be "off".
The status property defaults to okay, and we do not want them to be listed explicitly. Not sure if there's consensus on applying this to all properties which have defaults, across all subsystems.
Quoted 3 lines
Relatedly, when a node does not have the 'default-state' property, I would _assume_ the author wanted/intended it to be "off". Ideally it would be described in the commit message, but that is optional.
The lack of a property doesn't necessarily mean it was forgotten, agreed.
Quoted 8 lines
Quoted 2 lines
But if that is changed, then it should be motivated *why*.
Agreed.
Cheers,
Quentin
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi,
Quoted 3 lines · FUKAUMI Naoki
My goal is to minimize the DTS fragments (
u-boot/arch/arm/dts/*-u-boot.dtsi) in U-Boot, consolidate them upstream, and improve clarity/visibility.
Long story short: I was wrong.
It was mostly Quentin's argument/reminder that the DT is about describing the hardware.
I think Quentin's point about 'initial state' was right on point, certainly from my perspective and where my logic error came from.
Cheers,
Diederik
Quoted 258 lines · Quentin Schulz
Quoted 42 lines · Diederik de Haas
Quoted 41 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Quoted 37 lines · FUKAUMI Naoki
Quoted 36 lines · Quentin Schulz
Quoted 35 lines · Dragan Simic
Quoted 33 lines · FUKAUMI Naoki
Quoted 27 lines · Dragan Simic
Quoted 11 lines · Diederik de Haas
Quoted 9 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a
few exceptions which should be "off" such as RGB LEDs on E25 and LAN/
WAN LEDs on E20C/E52C).Quoted 6 lines
I'm missing the *why* these changes would be an improvement.
Personally, for both 'heartbeat' and 'netdev' triggers, I want them to
be off by default and once it gets a 'heartbeat' or a 'netdev' trigger, THEN I want the LED to be on/blinking.That's a good question for Naoki. My own preference would also be to have the device's power LED turned on by U-Boot as quickly as possible after supplying power to the board or turning it on by pressing the power button. I'm actually not a big fan of having all the LEDs shining for a couple of seconds or so, which may actually look like some error condition to me.
Quoted 2 lines
Having all that in mind, I may suggest that just the U-Boot's behavior is changed to turn the power LEDs on only.
I can't quite explain it, but...
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
- 1st (Power) LED
The 1st (power) LED turns on automatically/immediately without software
intervention. (On some boards, this LED cannot be controlled by software
at all.)I'm not saying the DTS has anything about LEDs that can't be controlled by software, nor am I trying to add such a thing to the DTS.
I'm just pointing out that the power LED is always on right after power-up. This makes it useless for determining if the software is running.
Quoted 100 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
In DTS, this should be described using
default-state = "on". The use
of the Linux-specific propertylinux,default-trigger = "default- on"is
unsuitable for non-Linux environments.I think the wording in the binding can be understood two ways.
The binding says the following about the default-state property:
"""
The initial state of the LED. If the LED is already on or off and
the
default-state property is set the to same value, then no glitch
should be
produced where the LED momentarily turns off (or on). The "keep"
setting
will keep the LED at whatever its current state is, without
producing a
glitch.
"""I think the issue here is around the meaning of "initial state". I believe Naoki is probably thinking about the **HW** initial state of the LED, which is whatever is the state of the LED without SW control. I think Diederik is thinking about this being the state of the LED right when the SW takes over and configures the LED before the trigger is setup.
In the first interpretation, there's no need for an "improvement" for the patches as they would just fix correctness of the DT wrt HW state at boot.
In the second interpretation, a change of this value must be justified as people will simply disagree forever and we could end up with people reverting other people's patches after each release. If it's just a matter of taste, I believe the typical answer is keeping the status quo.
We should find a way to make this binding not up to interpretation.
Additionally, if the LED cannot be controlled on some boards, I don't think it should be part of the DT.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
- 2nd (Heartbeat) LED
The 2nd (heartbeat) LED can be controlled by software. It should be lit
up as quickly as possible to indicate that the very first software (e.g., the bootloader) is running.My understanding is Naoki wants to use default-state = on, for the bootloader to turn it on as soon as it takes over control of the LEDs.
Quoted 19 lines
Quoted 19 lines
Quoted 18 lines
Quoted 6 lines
Quoted 5 lines
On Linux, usually this is used as
linux,default-trigger = "heartbeat".
It indicates that kernel is running (regardless of thedefault- state
setting), and its behavior can be modified in user space.Quoted 8 lines
As discussed already in the #linux-rockchip IRC channel, [1] perhaps the best option would be to have the power LEDs turned on as quickly upon powering on the board as possible, and to have U-Boot pulsate the heartbeat LEDs using the
LED_BOOTfeature. In such a scenario, no other LEDs would be turned on early, and the LED-related DT parts specific to U-Boot would be migrated to the kernel DTs.[1] https://libera.catirclogs.org/linux-rockchip/2025-11-11#38997824;
The
LED_BOOTfeature (guarded by theKconfigsymbol of the same name) in
U-Boot only applies if /options/u-boot/boot-led property is set.Quoted 8 lines
Quoted 3 lines
For the default state of the heartbeat LED, I'm thinking of using
LED_BOOT(/options/u-boot/boot-led), but I'm concerned that this is U-Boot-specific.If U-Boot wants to use the heartbeat LED to signal the *bootloader* is running, I guess that's fine. And if you want to make it solid or blinking, that seems best discussed on the U-Boot ML.
The solution may still involve configuring the Device Tree, and we're trying to have U-Boot-specific changes to the Device Tree in U-Boot source tree to a minimum.
Quoted 1 line
I still consider the bootloader and the kernel stages separate.
They do however share most of their Device Tree (for Rockchip at least) and the least (ideally no) changes we can have in U-Boot the better.
Quoted 3 lines
And I haven't seen an argument why I should change *my* opinion on the heartbeat and netdev triggers (default-state) wrt the kernel.
Device Tree is not kernel specific as you said already.
Quoted 2 lines
I don't think that what U-Boot does or doesn't do, should determine what the Linux kernel does or doesn't do.
Quoted 10 lines
It shouldn't, but (most of) the Device Tree is shared, so you cannot just dismiss U-Boot behavior when talking about Linux behavior based on Device Tree interpretation. We may have a need for a bootloader-specific property. We have a Linux-specific one after all (linux,default- trigger). Though... that does seem to be on the edge of what the DT is made for (description of the HW, not logic/policy).
Quoted 3 lines
I have no plans to use another bootloader then U-Boot, but it's possible that people do, so what the Linux kernel does should be independent from what the/a specific bootloader does.
Each software should be independent, but hardware (state) cannot be independent.
Quoted 5 lines
Barebox also uses upstream DT as far as I know and supports some Radxa products (Rock 5B/5T/..., CM3, Rock (RK3188), Rock 3A from the
arch/arm/boards/radxa-* directories). Zephyr has support for RK3568, RK3588, and other SoCs, and uses upstream DT as well.Quoted 8 lines
Again, we're talking about modifications of the Device Tree here, so typically I would expect all consumers of that DT to be interpreting the properties the same way, except if you have OS-specific properties/nodes (think u-boot,config-compatible nodes, linux, prefixed properties, bootph- properties, ...).
Quoted 2 lines
And as I said before, *I* want LEDs with netdev and heartbeat triggers, to be off (at the start, which is indeed the default value).
If you are using U-Boot, heartbeat LED is already on by U-Boot, e.g.
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12But it's not visible in DTS in Linux,
e.g.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts?h=v6.17#n55I think this situation should be fixed.
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.Quoted 57 lines
Quoted 9 lines
I use the heartbeat trigger to:
1) See the kernel has started (and has gotten to the point the heartbeat 'infrastructure' has been set up
2) Wait for the blinking to slow down as that (generally) means it's pretty much done with the boot process and the SSH server should probably be running then, so I can login
3) When the heartbeat LED is solid, that means the system has crashed (f.e. due to overheating ...)If the *HW* default state of the LED is off and the default-state property is off, then you won't be able to tell apart a completely bricked board and one that is stuck somewhere between U-Boot proper and the Linux kernel taking over that LED.
Quoted 14 lines
And also, if you're going to change/override other people's choices, a motivation as to why would be 'nice'.
Quoted 11 lines
Quoted 1 line
<more discussion about LED functionality in U-Boot ...>
As you know, default "default-state" is "off".
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/common.yaml? h=v6.17#n74As far as I understand, there should not be any workarounds for specific implementations.
https://lore.kernel.org/linux-rockchip/3389401.44csPzL39Z@phil/Quoted 9 lines
Quoted 1 line
So removing
default-state = "off"is acceptable, right?I don't see/understand the connection with 'workarounds for specific implementations' with removing ``default-state = "off"``.
IMO it's perfectly fine to remove ``default-state = "off"``, although having it explicitly may be useful, especially if the commit that set that property specified *why* it should be "off".
The status property defaults to okay, and we do not want them to be listed explicitly. Not sure if there's consensus on applying this to all properties which have defaults, across all subsystems.
Quoted 3 lines
Relatedly, when a node does not have the 'default-state' property, I would _assume_ the author wanted/intended it to be "off". Ideally it would be described in the commit message, but that is optional.
The lack of a property doesn't necessarily mean it was forgotten, agreed.
Quoted 2 lines
But if that is changed, then it should be motivated *why*.
Agreed.
Cheers,
Quentin
Hi all,
How about this?
----
Subject: Consolidates and clarifies LED device tree descriptions on Radxa boards
Currently, on Radxa boards, the power LED is turned on immediately after power-up, independent of software control. The heartbeat LED and other available LEDs are subsequently turned on by the initial software, such as U-Boot, to indicate software is running.
However, the device tree description for this behavior is inconsistent and fragmented, with definitions split between the main Linux DTS files and separate U-Boot files (u-boot/arch/arm/dts/*-u-boot.dtsi).
This patch series addresses this inconsistency and fragmentation by consolidating the description within the upstream device tree, thereby improving overall clarity.
Patch 1 addresses the inconsistency for the power LED by using default-state = "on" instead of linux,default-trigger = "default-on".
Patch 2 addresses the fragmentation for the heartbeat LED by consolidating its default-state = "on" definition into the main Linux DTS.
Patch 3 addresses inconsistency by removing redundant default-state = "off" definitions, as this is already the default configuration. (Alternatively, the opposite could be done: explicitly adding default-state = "off" for other LEDs.)
----
Best regards,
--
FUKAUMI Naoki
Radxa Computer (Shenzhen) Co., Ltd.
Quoted 279 lines · FUKAUMI Naoki
Radxa's boards turn all LEDs on at boot(loader), but some boards don't have
default-stateproperty in Linux kernel tree but have it in U-Boot tree instead[1].This patch adds
default-state = "on"for (almost) all LEDs (with a few exceptions which should be "off" such as RGB LEDs on E25 and LAN/ WAN LEDs on E20C/E52C).Also, remove following redundant properties:
linux,default-trigger = "default-on"; // use default-state = "on" default-state = "off"; // default is "off"[1]
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3328-rock-pi-e-base-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi#L11-17
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-radxa-cm3-io-u-boot.dtsi#L10-12
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3566-rock-3c-u-boot.dtsi#L14-16
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi#L7-24
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi#L11-13
https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/arch/arm/dts/rk3588s-rock-5a-u-boot.dtsi#L10-12Signed-off-by FUKAUMI Naoki <[email protected]>---
Changes in v2:
- Add more URLs for reference
- Reword commit message--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 1 - arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 1 + arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts | 1 - arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 1 + arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 1 + arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts | 2 -- arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 3 ++- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi | 1 + arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 1 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 3 ++- 16 files changed, 16 insertions(+), 10 deletions(-)arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +0
-1@@ -35,7 +35,6 @@ green-led { function = LED_FUNCTION_POWER; gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; label = "rockpis:green:power"; - linux,default-trigger = "default-on"; }; blue-led {arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +1
-0@@ -59,6 +59,7 @@ leds { led-0 { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts +2
-1@@ -39,14 +39,15 @@ leds { led-0 { function = LED_FUNCTION_POWER; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; /* USER_LED2 */ led-1 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +1
-0@@ -35,6 +35,7 @@ leds { led-0 { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +0
-2@@ -62,7 +62,6 @@ leds { led-lan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";@@ -78,7 +77,6 @@ led-sys { led-wan { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "netdev";arch/arm64/boot/dts/rockchip/rk3528-rock-2a.dts +0
-1@@ -45,7 +45,6 @@ led-1 { default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "default-on"; }; };arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts +1
-0@@ -46,6 +46,7 @@ leds { led-1 { gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_ACTIVITY; linux,default-trigger = "heartbeat"; pinctrl-names = "default";arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts +1
-0@@ -47,6 +47,7 @@ led-0 { gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&user_led2>;arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi +1
-0@@ -23,6 +23,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_GREEN>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +1
-0@@ -47,6 +47,7 @@ led_user: led-0 { gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; function = LED_FUNCTION_HEARTBEAT; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; linux,default-trigger = "heartbeat"; pinctrl-names = "default"; pinctrl-0 = <&led_user_en>;arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts +2
-1@@ -52,13 +52,14 @@ leds: leds { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; user-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_HEARTBEAT; gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>; linux,default-trigger = "heartbeat";arch/arm64/boot/dts/rockchip/rk3582-radxa-e52c.dts +0
-2@@ -71,7 +71,6 @@ leds-1 { led-1 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_LAN; linux,default-trigger = "netdev"; pwms = <&pwm14 0 1000000 PWM_POLARITY_INVERTED>;@@ -80,7 +79,6 @@ led-1 { led-2 { color = <LED_COLOR_ID_GREEN>; - default-state = "off"; function = LED_FUNCTION_WAN; linux,default-trigger = "netdev"; pwms = <&pwm11 0 1000000 PWM_POLARITY_INVERTED>;arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +2
-1@@ -88,11 +88,12 @@ gpio-leds { pinctrl-0 = <&led_pins>; power-led1 { + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; hdd-led2 { + default-state = "on"; gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "disk-activity"; };arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtsi +1
-0@@ -30,6 +30,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts +1
-0@@ -33,6 +33,7 @@ leds { led_rgb_b { function = LED_FUNCTION_STATUS; color = <LED_COLOR_ID_BLUE>; + default-state = "on"; gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +1
-0@@ -54,6 +54,7 @@ leds { io-led { color = <LED_COLOR_ID_BLUE>; + default-state = "on"; function = LED_FUNCTION_STATUS; gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat";
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts io-led { · line 70
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +1
-1@@ -61,9 +62,9 @@ io-led { power-led { color = <LED_COLOR_ID_GREEN>; + default-state = "on"; function = LED_FUNCTION_POWER; gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-on"; }; };
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip