summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-12-03 11:04:32 -0600
committerTom Rini <[email protected]>2025-12-03 12:18:16 -0600
commitd300702c5be5a846032834abe4f01dcd3f50b3a8 (patch)
treeae5eeffc4919a8ddeb8fe56974c632d2205547d5 /arch
parentdca19206acf2af2d339087bb62aa0b8ee1b0e326 (diff)
parenteb02d87c7579f83f6fe153c80d420e5f53bde4c1 (diff)
Merge patch series "led: remove u-boot,boot-led and u-boot,error-led + add cmd doc"
Quentin Schulz <[email protected]> says: u-boot,boot-led and u-boot,error-led aren't actually handled by some generic code but rather by board or architecture specific code. They also aren't properties that are part of the official dt-binding so they cannot be upstreamed. For u-boot,boot-led, there's actually a proper replacement which is /options/u-boot/boot-led[1] (+ CONFIG_LED_BOOT=y). For Rockchip boards, either nothing (for RK3066, PX30 and RK3399) was using that property or (for RK3188) the code handling it was guarded by symbols that were not enabled in the defconfig. For those, the property and guarded code are removed. For the Sam9x60 Curiosity, it seems that even though the LED is controlled whenever CONFIG_LED is enabled, it isn't enabled by default in the defconfig (but the code was added without modifying the defconfig, explicitly leaving a choice to the user). I decided to keep that feature by simply migrating it to the new API, though I cannot test it as I do not own the device. The STM32 boards will be migrated in the near future once their upstream (kernel) Device Trees gain the new way to specify this (via /options/u-boot/boot-led). I'll let Patrice handle this, see https://lore.kernel.org/u-boot/[email protected]/ and https://lore.kernel.org/u-boot/[email protected]/ After this, only one user of u-boot,boot-led will be left, based on STM32: board/dhelectronics/dh_stm32mp1/board.c. @Patrice, maybe that's something you want to have a look at as well, this seems to be some evaluation kit? The only users of u-boot,error-led are STM32 boards, so I'll leave this to Patrice as well, I do not know what's the way to go for that one. In any case, I would like to not encourage people to use out-of-spec DT properties when there is another option (u-boot,boot-led), so I remove the properties from the dt-binding document from U-Boot. The help text for the blink subcommand of the led command was misleading so this is now fixed. This also moves the content of doc/README.LED into the doc/api/led.rst, while clearly stating one shouldn't be using this anymore. This also gets rid of dt-binding that we already have in dts/upstream. Finally, this adds documentation for the led shell command. [1] https://github.com/devicetree-org/dt-schema/blob/v2025.08/dtschema/schemas/options/u-boot.yaml#L113-L116 Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi9
-rw-r--r--arch/arm/dts/px30-ringneck-haikou-u-boot.dtsi1
-rw-r--r--arch/arm/dts/rk3066a-mk808-u-boot.dtsi6
-rw-r--r--arch/arm/dts/rk3188-radxarock-u-boot.dtsi5
-rw-r--r--arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi1
-rw-r--r--arch/arm/mach-rockchip/Kconfig1
-rw-r--r--arch/arm/mach-rockchip/rk3188/rk3188.c36
7 files changed, 6 insertions, 53 deletions
diff --git a/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
index 9144387861e..b8f16c0b0c0 100644
--- a/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
+++ b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
@@ -21,8 +21,11 @@
bootph-all;
};
- config {
- u-boot,boot-led = "blue";
+ options {
+ u-boot {
+ compatible = "u-boot,config";
+ boot-led = <&led_blue>;
+ };
};
leds {
@@ -34,7 +37,7 @@
default-state = "off";
};
- led-blue {
+ led_blue: led-blue {
default-state = "off";
};
};
diff --git a/arch/arm/dts/px30-ringneck-haikou-u-boot.dtsi b/arch/arm/dts/px30-ringneck-haikou-u-boot.dtsi
index 29ea2763636..8f4c9ad1f4a 100644
--- a/arch/arm/dts/px30-ringneck-haikou-u-boot.dtsi
+++ b/arch/arm/dts/px30-ringneck-haikou-u-boot.dtsi
@@ -6,7 +6,6 @@
config {
u-boot,mmc-env-offset = <0x5000>; /* @ 20KB */
u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
- u-boot,boot-led = "module_led";
};
chosen {
diff --git a/arch/arm/dts/rk3066a-mk808-u-boot.dtsi b/arch/arm/dts/rk3066a-mk808-u-boot.dtsi
index 4474be962df..dd2eff529e9 100644
--- a/arch/arm/dts/rk3066a-mk808-u-boot.dtsi
+++ b/arch/arm/dts/rk3066a-mk808-u-boot.dtsi
@@ -2,12 +2,6 @@
#include "rk3066a-u-boot.dtsi"
-/ {
- config {
- u-boot,boot-led = "mk808:blue:power";
- };
-};
-
&cru {
bootph-all;
};
diff --git a/arch/arm/dts/rk3188-radxarock-u-boot.dtsi b/arch/arm/dts/rk3188-radxarock-u-boot.dtsi
index 7bcbc2967a9..c65fbab75bf 100644
--- a/arch/arm/dts/rk3188-radxarock-u-boot.dtsi
+++ b/arch/arm/dts/rk3188-radxarock-u-boot.dtsi
@@ -10,11 +10,6 @@
/* stdout-path = &uart2; */
stdout-path = "serial2:115200n8";
};
-
- config {
- u-boot,boot-led = "rock:red:power";
- bootph-all;
- };
};
&cru {
diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
index 55895d0dd19..76e091be232 100644
--- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
@@ -17,7 +17,6 @@
u-boot,spl-payload-offset = <0x80000>; /* @ 512KB */
u-boot,mmc-env-offset = <0x5000>; /* @ 20KB */
u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
- u-boot,boot-led = "module_led";
sysreset-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
};
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 342933ca509..f78eaf52c2a 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -76,7 +76,6 @@ config ROCKCHIP_RK3128
config ROCKCHIP_RK3188
bool "Support Rockchip RK3188"
select CPU_V7A
- select SPL_BOARD_INIT if SPL
select SUPPORT_SPL
select SPL
select SPL_CLK
diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 7cce1112fbd..8aed46f0b3b 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -105,39 +105,3 @@ int rk_board_late_init(void)
return rk3188_board_late_init();
}
-
-#ifdef CONFIG_XPL_BUILD
-static int setup_led(void)
-{
-#ifdef CONFIG_SPL_LED
- struct udevice *dev;
- char *led_name;
- int ret;
-
- led_name = ofnode_conf_read_str("u-boot,boot-led");
- if (!led_name)
- return 0;
- ret = led_get_by_label(led_name, &dev);
- if (ret) {
- debug("%s: get=%d\n", __func__, ret);
- return ret;
- }
- ret = led_set_state(dev, LEDST_ON);
- if (ret)
- return ret;
-#endif
-
- return 0;
-}
-
-void spl_board_init(void)
-{
- int ret;
-
- ret = setup_led();
- if (ret) {
- debug("LED ret=%d\n", ret);
- hang();
- }
-}
-#endif