Re: [PATCH v4] arm: rockchip: spl: Add hotkey detection support.

Jonas Karlman <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
Hi Valentin,

On 8/20/2026 6:27 PM, Valentin Liu wrote:
> Add a configurable Rockchip SPL hotkey feature that checks the
> serial console during SPL startup.
> 
> Ctrl+B can be used to enter MaskROM mode and be widely used.
> Ctrl+D can be used to enter Loader mode, Ctrl+F for Fastboot mode.
> We can add more boot mode support in future.

Why the need to have special hotkey handling in SPL?

I would rather see that we extend TPL/SPL/proper with support for
reading any 'syscon-reboot-mode' reg and act according to that.

Also think there is a series on list to extend the reset command to
accept a reboot-mode.

That way we would be able to reboot from OS or U-Boot proper into
maskrom (or any other) mode, instead of trying to implement platform
specific hotkey handling.

Regards,
Jonas

> 
> Add CONFIG_SPL_ROCKCHIP_HOTKEY to enable the feature and wait for
> the serial port to be ready to receive input before checking for
> hotkeys.
> 
> Signed-off-by: Valentin Liu <[email protected]>
> ---
> Changes for v2:
> - Simplify the dependencies of SPL_ROCKCHIP_HOTKEY.
> - Remove the conditions for the newly added includes.
> ---
> Changes for v3:
> - Add a dummy spl_hotkey_init() to avoid undefined reference errors
>   when building without CONFIG_SPL_ROCKCHIP_HOTKEY.
> ---
> Changes for v4:
> - Add condition of CONFIG_ROCKCHIP_BOOT_MODE_REG != 0 to prevent
>   SPL hotkey be compiled and used on unsupported platforms.
> - Add more hotkey support (Ctrl+D and Ctrl+F).
> - Remove prints on the standard path.
> - Add some code comment.
> 
>  arch/arm/mach-rockchip/Kconfig | 14 +++++++++
>  arch/arm/mach-rockchip/spl.c   | 54 ++++++++++++++++++++++++++++++++++
>  2 files changed, 68 insertions(+)

[snip]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.