From: Tianling Shen <cnsztl@gmail.com>
To: Jonas Karlman <jonas@kwiboo.se>,
Kever Yang <kever.yang@rock-chips.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Quentin Schulz <quentin.schulz@cherry.de>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Cc: Tianling Shen <cnsztl@gmail.com>, u-boot@lists.denx.de
Subject: [PATCH] rockchip: boot_mode: fix download key detection
Date: Wed, 10 Jun 2026 11:01:54 +0800 [thread overview]
Message-ID: <20260610030154.173455-1-cnsztl@gmail.com> (raw)
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@...",
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@..." and "adc@..."
node names.
Signed-off-by: Tianling Shen <cnsztl@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
next reply other threads:[~2026-06-10 3:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 3:01 Tianling Shen [this message]
2026-06-10 13:25 ` [PATCH] rockchip: boot_mode: fix download key detection Jonas Karlman
2026-06-11 7:45 ` Tianling Shen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260610030154.173455-1-cnsztl@gmail.com \
--to=cnsztl@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox