[PATCH] rockchip: boot_mode: fix download key detection
Tianling Shen
cnsztl at gmail.com
Wed Jun 10 05:01:54 CEST 2026
rockchip_dnl_key_pressed() looks for the ADC device by checking
whether the device name starts with "saradc".
On RK3328, RK3576, RK3588 etc., the SARADC node is named "adc at ...",
so the device name no longer has the "saradc" prefix. As a result,
U-Boot fails to find the SARADC device and does not sample the
download key state.
Do not rely on the DT node name. Match the bound Rockchip SARADC
driver instead, which works for both "saradc at ..." and "adc at ..."
node names.
Signed-off-by: Tianling Shen <cnsztl at gmail.com>
---
arch/arm/mach-rockchip/boot_mode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index 55e9456668ae..363fad523cbd 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -51,7 +51,7 @@ __weak int rockchip_dnl_key_pressed(void)
ret = -ENODEV;
uclass_foreach_dev(dev, uc) {
- if (!strncmp(dev->name, "saradc", 6)) {
+ if (!strcmp(dev->driver->name, "rockchip_saradc")) {
ret = adc_channel_single_shot(dev->name, 1, &val);
break;
}
--
2.54.0
More information about the U-Boot
mailing list