[PATCH next v2 4/6] rockchip: rk3588: insert u-boot, spl-boot-device into U-Boot device tree

Quentin Schulz foss+uboot at 0leil.net
Wed Nov 8 18:25:40 CET 2023


From: Quentin Schulz <quentin.schulz at theobroma-systems.com>

It is possible to boot U-Boot proper from a different storage medium
than the one used by the BOOTROM to load the SPL. This information is
stored in the u-boot,spl-boot-device Device Tree property and is
accessible from U-Boot proper so that it has knowledge at runtime where
it was loaded from.

Let's add support for this feature for rk3588 the same way it was done
for px30 and rk3399.

Cc: Quentin Schulz <foss+uboot at 0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>
---
 arch/arm/mach-rockchip/rk3588/rk3588.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
index b1f535fad50..fde5f281b0a 100644
--- a/arch/arm/mach-rockchip/rk3588/rk3588.c
+++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
@@ -163,3 +163,11 @@ int arch_cpu_init(void)
 	return 0;
 }
 #endif
+
+#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
+const char * const spl_boot_devices[BOOT_DEVICE_NONE + 1] = {
+	[BOOT_DEVICE_MMC2] = "/mmc at fe2e0000",
+	[BOOT_DEVICE_MMC1] = "/mmc at fe2c0000",
+	[BOOT_DEVICE_SPI] = "/spi at fe2b0000/flash at 0",
+};
+#endif

-- 
2.41.0



More information about the U-Boot mailing list