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

Jonas Karlman jonas at kwiboo.se
Mon Dec 29 20:15:29 CET 2025


Hi Aaron,

On 12/29/2025 11:26 AM, Aaron Griffith wrote:
> Hello Jonas!
> 
> On Mon, Dec 29, 2025 at 4:49 AM Jonas Karlman <jonas at kwiboo.se> wrote:
>> [..]
>>
>> 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)
> 
> Not that I know of. I must admit, I'm new to this codebase and so I'm
> mostly looking at what code already exists and what the Rockchip fork
> does to try and synthesize a solution. The Rockchip fork reads this
> info, and it was a simple change, so that felt like the right path.

The memory size info is also encoded in PMUGRF os_reg2 reg, a simple
call to rockchip_sdram_size(PMUGRF_BASE + OS_REG2_REG) should be enough
to get the memory size info typically needed by U-Boot.

The RK ATAGS do include some other information that could be useful e.g.
what uartX and baudrate is used by external TPL, but this is mostly
information that the vendor blobs for TPL, SPL, TF-A and OP-TEE read,
use and/or update.

For mainline U-Boot there should not really be a need for using the info
encoded using the vendor RK ATAGS, at least no to my knowledge.

>> 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.
> 
> Oh, fantastic! I started working on this as a way to learn my way
> around U-boot, but I've been learning that adding RK3506 support might
> have been ambitious. What I have boots just fine and I learned a lot,
> but... more experience here is definitely for the best.
> 
> (Your link [2] to your rk3506 branch is a 403 for me. Is that temporary,
> or..?)

Strange, probably the Anubis instance used by source.denx.de at fault.

I have now pushed an updated rk3506 branch to GitHub [1], the old branch
last rebased in September is located at [2].

Most of my RK3506 work was done back in February, not sure all features
was fully implemented, e.g. Ethernet on my Forge1 did not seem to work
now that I did a new runtime test, maybe a PHY driver is missing.

[1] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3506
[2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3506-2025091

> 
> I'm happy to either continue with these patches if they seem useful
> for any other reason, or to drop them if not. RK3506 is the only
> reason I had for them myself.

I do not think we want to extend the use of the RK ATAGS, at least not
unless it is absolutely needed.

There is still one big question related to RK3506 that needs to be
figured out, should we use cpu enable-method psci and offload psci to
e.g. OP-TEE as done by vendor, or possible TF-A or fully handle this in
kernel?

Hopefully that and a basic device tree can be submitted and merged to
mainline Linux in a near future, after that we have a proper DT that can
be used by U-Boot. At least this is what I have been waiting on :-)

Regards,
Jonas

> Thanks,
>  -Aaron
> 



More information about the U-Boot mailing list