Skip to contentSkip to conversation

rockchip: Use an external TPL binary on RK3588

PATCH In review Jonas Karlman 2 participants 2 messages Feb 28, 2023 – Mar 1, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: Use an external TPL binary on RK3588

There is no support to initialize DRAM on RK3588 SoCs using U-Boot TPL and instead an external TPL binary must be used to generate a bootable u-boot-rockchip.bin image.

Enable ROCKCHIP_EXTERNAL_TPL by default for RK3588, add build steps for RK3588 to documentation and clean up CONFIG_BINMAN_FDT options.

---
 arch/arm/mach-rockchip/Kconfig    | 2 +-
 configs/neu6a-io-rk3588_defconfig | 1 -
 configs/rock-3a-rk3568_defconfig  | 1 -
 configs/rock5b-rk3588_defconfig   | 1 -
 doc/board/rockchip/rockchip.rst   | 9 +++++++++
 5 files changed, 10 insertions(+), 4 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -1
index 0390431601f9..e5ac58ae60b5 100644
@@ -428,7 +428,7 @@ config TPL_ROCKCHIP_COMMON_BOARD
 
 config ROCKCHIP_EXTERNAL_TPL
 	bool "Use external TPL binary"
-	default y if ROCKCHIP_RK3568
+	default y if ROCKCHIP_RK3568 || ROCKCHIP_RK3588
 	help
 	  Some Rockchip SoCs require an external TPL to initialize DRAM.
 	  Enable this option and build with ROCKCHIP_TPL=/path/to/ddr.bin to
configs/neu6a-io-rk3588_defconfig +0 -1
index fb5a2b7dbceb..33c03b58a16c 100644
@@ -63,5 +63,4 @@ CONFIG_DM_RESET=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
-# CONFIG_BINMAN_FDT is not set
 CONFIG_ERRNO_STR=y
configs/rock-3a-rk3568_defconfig +0 -1
index 1686c8c1aa5a..e16d98b07af9 100644
@@ -70,5 +70,4 @@ CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_SYSRESET=y
-# CONFIG_BINMAN_FDT is not set
 CONFIG_ERRNO_STR=y
configs/rock5b-rk3588_defconfig +0 -1
index f3026c7ea166..66199387195a 100644
@@ -68,5 +68,4 @@ CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYSRESET=y
-# CONFIG_BINMAN_FDT is not set
 CONFIG_ERRNO_STR=y
doc/board/rockchip/rockchip.rst +9 -0
index b5563b8f7f9e..1f88d15aad2a 100644
@@ -185,6 +185,15 @@ To build rk3568 boards:
         make evb-rk3568_defconfig
         make CROSS_COMPILE=aarch64-linux-gnu-
 
+To build rk3588 boards:
+
+.. code-block:: bash
+
+        export BL31=../rkbin/bin/rk35/rk3588_bl31_v1.27.elf
+        export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin
+        make rock5b-rk3588_defconfig
+        make CROSS_COMPILE=aarch64-linux-gnu-
+
 Flashing
 --------
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jonas Karlman

There is no support to initialize DRAM on RK3588 SoCs using U-Boot TPL and instead an external TPL binary must be used to generate a bootable u-boot-rockchip.bin image.

Enable ROCKCHIP_EXTERNAL_TPL by default for RK3588, add build steps for RK3588 to documentation and clean up CONFIG_BINMAN_FDT options.

---