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

Jonas Karlman jonas at kwiboo.se
Mon Jul 14 01:32:12 CEST 2025


On 6/10/2025 11:42 AM, 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:   PX30S
> SoC:   PX30K
> SoC:   RK3326
> SoC:   RK3326S
> 
> when U-Boot proper is running.
> 
> The information is read from the OTP and also the DDR_GRF. There's no
> public information as far as I know about the layout and stored
> information on OTP but this was provided by Rockchip themselves through
> their support channel.
> 
> The OTP stores the information of whether the SoC is PX30K or something
> else. To differentiate between PX30/RK3326 and PX30S/RK3326S, one needs
> to read some undocumented bitfield in a DDR_GRF register as done in
> vendor kernel,
> c.f. https://github.com/armbian/linux-rockchip/blob/rk-6.1-rkr5.1/drivers/soc/rockchip/rockchip-cpuinfo.c#L118-L133
> 
> I do not own a PX30S, nor RK3326/RK3326S so cannot test it works
> properly.
> 
> 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>

I have now tested this on my RK3326 ODROID-GO Super:

  U-Boot 2025.07 (Jul 13 2025 - 10:07:16 +0000)

  Model: ODROID-GO Super
  SoC:   RK3326
  DRAM:  1 GiB (total 1022 MiB)

so this is,

Reviewed-by: Jonas Karlman <jonas at kwiboo.se>

Regards,
Jonas

> ---
> Tested on a PX30 Ringneck and PX30K Ringneck. Would be nice if anyone
> had a device with a PX30S, RK3326 or RK3326S so we could verify it
> prints what it should :)
> ---
> Changes in v3:
> - added (theoretical, untested) support for RK3326/RK3326S based on
>   feedback from Jonas,
> - Link to v2: https://lore.kernel.org/r/20250606-px30-identify-variant-v2-1-624d34ccc381@cherry.de
> 
> Changes in v2:
> - added (theoretical, untested) support for PX30S based on feedback from
>   Kever,
> - Link to v1: https://lore.kernel.org/r/20250528-px30-identify-variant-v1-1-4ea69c527a0d@cherry.de
> ---
>  arch/arm/dts/px30-u-boot.dtsi      |  4 +++
>  arch/arm/mach-rockchip/px30/px30.c | 61 ++++++++++++++++++++++++++++++++++++++
>  2 files changed, 65 insertions(+)

[snip]


More information about the U-Boot mailing list