[PATCH 0/5] rockchip: sdram: allow reading memory info from TPL on non-ARM64

Jonas Karlman jonas at kwiboo.se
Mon Dec 29 10:49:22 CET 2025


Hi Aaron,

On 12/29/2025 1:05 AM, Aaron Griffith wrote:
> The RK3506 TPL provides memory info to the bootloader via ATAGS. There
> is already an implementation that reads this information on RK3588 and
> others, but it is currently gated behind CONFIG_ARM64. The RK3506 is
> *not* ARM64.

Use of the RK ATAGS was initially only introduced in mainline U-Boot due
to a memory hole on RK3588 devices with more than 16 GiB DRAM. With [1]
applied this should no longer really be needed.

Is there anything useful encoded in the RK ATAGS that we need on any
other SoC ? (with the goal of using mainline TF-A and/or OP-TEE)

Use of ramboot also overwrite the RK ATAGS with all zero, so we cannot
expect the atags to always be there, only to assist in some cases.

> 
> This patch series aims to allow this code to be used on non-ARM64, by
> 
>  * adding a new config option to read this info from the TPL,
>  * allowing the ATAGS memory area it uses to be set in config headers,
>  * placing truly ARM64-specific logic behind CONFIG_ARM64.
> 
> I'm working on upstreaming RK3506 support, and this is the first patch
> series of hopefully many in that direction.

Nice!, please also see my rk3506 branch [2] for a mainline u-boot branch
that is mostly just waiting on upstream Linux support before being sent
out. Should have good support for most Luckfox Lyra variants and the
ArmSoM Forge1.

I will shortly rebase the rk3506 branch and can possible send out part
of it now that initial parts for rk3506 has landed in upstream Linux.

[1] https://lore.kernel.org/all/20250802220738.3018910-4-jonas@kwiboo.se/
[2] https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/rk3506

Regards,
Jonas

> 
> Signed-off-by: Aaron Griffith <aargri at gmail.com>
> ---
> Aaron Griffith (5):
>       rockchip: sdram: add option to read bank information from TPL
>       rockchip: sdram: remove redundant configuration checks
>       rockchip: sdram: allow config headers to override ATAGs location
>       rockchip: sdram: refactor bi_dram logic into separate function
>       rockchip: sdram: only reserve BL31 and use mem_map on ARM64
> 
>  arch/arm/mach-rockchip/Kconfig |  11 +++
>  arch/arm/mach-rockchip/sdram.c | 195 ++++++++++++++++++++++-------------------
>  2 files changed, 118 insertions(+), 88 deletions(-)
> ---
> base-commit: 0f6ff53d55ba254de8a995c2a2f5a313acd40ac7
> change-id: 20251226-rockchip-tpl-use-atags-bf3d14a840ca
> 
> Best regards,



More information about the U-Boot mailing list