[PATCH] rockchip: px30: Implement checkboard() to print SoC variant

Quentin Schulz quentin.schulz at cherry.de
Fri Jun 6 11:15:07 CEST 2025


Hi Kever,

On 6/6/25 11:09 AM, Kever Yang wrote:
> Hi Quentin,
> 
> On 2025/5/28 20:00, Quentin Schulz wrote:
>> From: Quentin Schulz <quentin.schulz at cherry.de>
>>
>> This implements checkboard() to print the current SoC model used by a
>> board, e.g. one of:
>>
>> SoC: PX30
>> SoC: PX30K
>>
>> when U-Boot proper is running.
>>
>> The information is read from the OTP. There's no public information as
>> far as I know about the layout and stored information but this was
>> provided by Rockchip themselves through their support channel.
>>
>> I'm aware of at least one other variant, the PX30S/PX30-S but I have
>> neither a board with that SoC nor the information of what the value in
>> the OTP is supposed to be. If it follows what was done for RK3588
>> variants, where the letter is derived from some offset added to the
>> value read from the OTP, PX30S could be represented by 0x33 in the
>> OTP. I'm assuming this is correct and simply printing the char
>> represented by this offset added to the value in the OTP instead of
>> checking whether it's 0x21 (PX30) or 0x28 (PX30K) or bailing out.
>>
>> Also add the OTP node to the pre-relocation phase of U-Boot proper so
>> that the SoC variant can be printed when DISPLAY_BOARDINFO is enabled.
>> This is not required if DISPLAY_BOARDINFO_LATE is enabled because this
>> happens after relocation. If both are enabled, then the SoC variant will
>> be printed twice in the boot log, e.g.:
>>
>> U-Boot 2025.07-rc3-00014-g7cb731574ae6-dirty (May 28 2025 - 13:52:47 
>> +0200)
>>
>> Model: Theobroma Systems PX30-uQ7 SoM on Haikou devkit
>> SoC:   PX30  <---- due to DISPLAY_BOARDINFO
>> DRAM:  2 GiB
>> PMIC:  RK809 (on=0x40, off=0x00)
>> Core:  293 devices, 27 uclasses, devicetree: separate
>> MMC:   mmc at ff370000: 1, mmc at ff390000: 0
>> Loading Environment from MMC... Reading from MMC(1)... OK
>>
>> In:    serial at ff030000
>> Out:   serial at ff030000
>> Err:   serial at ff030000
>> Model: Theobroma Systems PX30-uQ7 SoM on Haikou devkit
>> SoC:   PX30  <----- due to DISPLAY_BOARDINFO_LATE
>> Net:   eth0: ethernet at ff360000
>>
>> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
>> ---
>> Tested on a PX30 Ringneck and PX30K Ringneck. Would be nice if anyone
>> had a device with a PX30S or any other variant so we could verify it
>> prints what it should :) Or maybe Kever knows :)?
> 
> PX30S has the same id with PX30 in byte 6.
> 
> For PX30, there should not have other variant now.
> 

Thanks for the info.

Is there a way to differentiate PX30 from PX30S from the OTP maybe?

If not, do you want to show

PX30/PX30S

when byte 6 is 0x21?

Cheers,
Quentin


More information about the U-Boot mailing list