From 9b92a43a4f5acf4cba14fd9d473b3120688532dc Mon Sep 17 00:00:00 2001 From: Peter Geis Date: Sun, 19 Dec 2021 08:10:24 -0500 Subject: [PATCH 01/11] rockchip: rk3568: add boot device detection Enable spl to detect which device it was booted from. Signed-off-by: Peter Geis --- arch/arm/mach-rockchip/rk3568/rk3568.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/arch/arm/mach-rockchip/rk3568/rk3568.c +++ b/arch/arm/mach-rockchip/rk3568/rk3568.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,7 @@ #define SGRF_SOC_CON4 0x10 #define EMMC_HPROT_SECURE_CTRL 0x03 #define SDMMC0_HPROT_SECURE_CTRL 0x01 + /* PMU_GRF_GPIO0D_IOMUX_L */ enum { GPIO0D1_SHIFT = 4, @@ -43,6 +45,12 @@ enum { UART2_IO_SEL_M0 = 0, }; +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { + [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe310000", + [BROM_BOOTSOURCE_SPINOR] = "/spi@fe300000/flash@0", + [BROM_BOOTSOURCE_SD] = "/mmc@fe2b0000", +}; + static struct mm_region rk3568_mem_map[] = { { .virt = 0x0UL,