Skip to contentSkip to conversation

rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMC

PATCH Superseded Jonas Karlman 3 participants 35 messages Apr 30, 2024 – May 6, 2024

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

v2 cover rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMC

This series enables use of FIT signature check for checksum validation in SPL and fixes loading FIT from SD-card when loading FIT from eMMC or SPI flash fails.

Changes in v2:
- Split series in two, this is the first part, second part will follow
- Split a big patch into smaller and more reviewable parts
- Change rk3399-puma to use common bss and stack addresses
- Skip UART related pinctrl nodes at pre-reloc phase to not slow down boot for i.e. rk3399-puma
- Rebase on latest master branch
- Collect r-b tags

I have runtime tested this series on following devices:
- 96boards Rock960
- Khadas Edge Captain
- Pine64 PineBook Pro
- Pine64 RockPro64
- Radxa ROCK 4C+
- Radxa ROCK 4SE
- Radxa ROCK Pi 4A
- Radxa ROCK Pi 4B+

Boot times before this series using rock-pi-4-rk3399:

=> bootstage report
Timer summary in microseconds (11 records):

         Mark    Elapsed  Stage
                 204,349  SPL
      494,212    289,863  end phase
        8,637      8,637  board_init_f
    1,314,991  1,306,354  board_init_r
    3,483,389  2,168,398  eth_common_init
    3,814,525    331,136  eth_initialize
    3,814,762        237  main_loop
    3,823,030      8,268  cli_loop

Accumulated time:

                  22,295  dm_spl
                 852,152  dm_f
                  60,268  dm_r

After this series the boot time have improved, mostly thanks to the use of ARMv8 crypto, OF_LIVE and reduced clutter in FDT:

=> bootstage report
Timer summary in microseconds (12 records):

         Mark    Elapsed  Stage
                 165,322  SPL
      419,002    253,680  end phase
        8,620      8,620  board_init_f
    1,314,364  1,305,744  board_init_r
    2,234,295    919,931  eth_common_init
    2,399,375    165,080  eth_initialize
    2,406,203      6,828  main_loop
    2,406,499        296  cli_loop

Accumulated time:

                  28,365  dm_spl
                 864,210  dm_f
                  11,943  of_live
                  13,085  dm_r

After this the board still spend a long time waiting for timeout during probe of display/hdmi driver (~1200 ms) or reading FDT during pre-reloc phase (~600ms).

A copy of this series can be found at [1].

[1] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3399-dt-sync-v2-part1

Jonas Karlman (18):
rockchip: rk3399-gru: Fix max SPL size on bob and kevin
rockchip: rk3399-puma: Update SPL_PAD_TO Kconfig option
rockchip: rk3399-puma: Use common bss and stack addresses
rockchip: rk3399-ficus: Enable TPL and use common bss and stack addr
rockchip: rk3399: Sort imply statements alphabetically
rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation
rockchip: rk3399: Enable random generator on all boards
rockchip: rk3399: Imply support for GbE PHY
rockchip: rk3399: Enable DT overlay support on all boards
rockchip: rk3399: Remove use of xPL_MISC_DRIVERS options
rockchip: rk3399: Add a default spl-boot-order prop
rockchip: rk3399: Remove inherited bootph-all props
rockchip: rk3399: Sort nodes in u-boot.dtsi files
rockchip: rk3399: Fix bootph prop for vop nodes
rockchip: rk3399-puma: Move uart0 bootph to board u-boot.dtsi
rockchip: rk3399: Include uart related pinctrl nodes in TPL/SPL
rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMC
rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL

 arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi     |   1 -
 arch/arm/dts/rk3399-evb-u-boot.dtsi           |  26 +++--
 arch/arm/dts/rk3399-ficus-u-boot.dtsi         |  12 ++-
 arch/arm/dts/rk3399-firefly-u-boot.dtsi       |   6 --
 arch/arm/dts/rk3399-gru-u-boot.dtsi           |  24 +++++
 arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi   |   6 --
 arch/arm/dts/rk3399-leez-p710-u-boot.dtsi     |   6 --
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi       |  14 ++-
 arch/arm/dts/rk3399-orangepi-u-boot.dtsi      |  12 +++
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi  |  23 ++--
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi |  12 ---
 arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi   |  25 ++---
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi        |  31 ++++--
 arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi  |  10 ++
 arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi     |   6 --
 arch/arm/dts/rk3399-rock960-u-boot.dtsi       |  13 ++-
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi     |  22 ++--
 arch/arm/dts/rk3399-u-boot.dtsi               | 101 +++++++++++++-----
 .../arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi |   6 --
 arch/arm/mach-rockchip/Kconfig                |  36 ++++---
 configs/chromebook_bob_defconfig              |   6 +-
 configs/chromebook_kevin_defconfig            |   6 +-
 configs/eaidk-610-rk3399_defconfig            |   2 +-
 configs/evb-rk3399_defconfig                  |   4 +-
 configs/ficus-rk3399_defconfig                |  16 +--
 configs/firefly-rk3399_defconfig              |   4 +-
 configs/khadas-edge-captain-rk3399_defconfig  |   2 +-
 configs/khadas-edge-rk3399_defconfig          |   2 +-
 configs/khadas-edge-v-rk3399_defconfig        |   2 +-
 configs/leez-rk3399_defconfig                 |   3 +-
 configs/nanopc-t4-rk3399_defconfig            |   4 +-
 configs/nanopi-m4-2gb-rk3399_defconfig        |   4 +-
 configs/nanopi-m4-rk3399_defconfig            |   4 +-
 configs/nanopi-m4b-rk3399_defconfig           |   4 +-
 configs/nanopi-neo4-rk3399_defconfig          |   4 +-
 configs/nanopi-r4s-rk3399_defconfig           |   4 +-
 configs/orangepi-rk3399_defconfig             |   4 +-
 configs/pinebook-pro-rk3399_defconfig         |   7 +-
 configs/pinephone-pro-rk3399_defconfig        |   5 +-
 configs/puma-rk3399_defconfig                 |  14 +--
 configs/roc-pc-mezzanine-rk3399_defconfig     |   4 +-
 configs/roc-pc-rk3399_defconfig               |   6 +-
 configs/rock-4c-plus-rk3399_defconfig         |   3 +-
 configs/rock-4se-rk3399_defconfig             |   5 +-
 configs/rock-pi-4-rk3399_defconfig            |   5 +-
 configs/rock-pi-4c-rk3399_defconfig           |   3 +-
 configs/rock-pi-n10-rk3399pro_defconfig       |   2 +-
 configs/rock960-rk3399_defconfig              |   4 +-
 configs/rockpro64-rk3399_defconfig            |   9 +-
 49 files changed, 298 insertions(+), 236 deletions(-)
Signature · 1 line
2.43.2
#1 lore raw

PATCH v2 1/18 rockchip: rk3399-gru: Fix max SPL size on bob and kevin

Chromebook bob and kevin typically run coreboot as the initial boot loader, however, U-Boot proper can be used as a secondary boot loader. It is also possible to run U-Boot SPL and proper bare metal, with SPL and the U-Boot payload loaded from SPI flash.

Because of this chromebook bob and kevin only use SPL and not TPL+SPL like other RK3399 boards, this mean that SPL is loaded to and run from SRAM instead of DRAM.

The U-Boot payload is located at 0x40000 (256 KiB) offset in SPI flash and because the BROM only read first 2 KiB for each 4 KiB page, the size of SPL (idbloader.img) is limited to max 128 KiB.

The chosen bss start address further limits the size of SPL to 120 KiB.

0xff8e0000 (SPL_BSS_START_ADDR) - 0xff8c2000 (SPL_TEXT_BASE) = 0x1e000

Update SPL_MAX_SIZE to reflect the 120 KiB max size limitation.

---
v2: Update commit message
v2: Collet r-b tag

---
 configs/chromebook_bob_defconfig   | 2 +-
 configs/chromebook_kevin_defconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configs/chromebook_bob_defconfig +1 -1
index 55d44700d6ec..805da11dbf6a 100644
@@ -35,7 +35,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_BLOBLIST=y
 CONFIG_BLOBLIST_ADDR=0x100000
 CONFIG_BLOBLIST_SIZE=0x1000
-CONFIG_SPL_MAX_SIZE=0x2e000
+CONFIG_SPL_MAX_SIZE=0x1e000
 CONFIG_SPL_PAD_TO=0x7f8000
 CONFIG_HANDOFF=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
configs/chromebook_kevin_defconfig +1 -1
index 48ee8b9fd258..8744152df61d 100644
@@ -36,7 +36,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_BLOBLIST=y
 CONFIG_BLOBLIST_ADDR=0x100000
 CONFIG_BLOBLIST_SIZE=0x1000
-CONFIG_SPL_MAX_SIZE=0x2e000
+CONFIG_SPL_MAX_SIZE=0x1e000
 CONFIG_SPL_PAD_TO=0x7f8000
 CONFIG_HANDOFF=y
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
Signature · 1 line
2.43.2
#2 lore raw

PATCH v2 2/18 rockchip: rk3399-puma: Update SPL_PAD_TO Kconfig option

In reply to Jonas Karlman

On rk3399-puma the FIT payload is located at sector 0x200 compared to the more Rockchip common sector 0x4000 offset:

SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200

Because FIT payload is located at sector 0x200 and IDBlock is located at sector 64, the combined size of TPL+SPL (idbloader.img) cannot take up more than 224 KiB:

(0x200 - 64) x 512 = 0x38000 (224 KiB)

Adjust SPL_PAD_TO to match the used 0x200 sector offset.

---
v2: New patch split from DT sync patch

With this change it should be possible to drop the following u-boot.dtsi override and use the default offset = <CONFIG_SPL_PAD_TO>.

offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;

---
 configs/puma-rk3399_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/puma-rk3399_defconfig +1 -1
index 14a7bc8b1e00..ec7d52a6e13e 100644
@@ -31,7 +31,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
-CONFIG_SPL_PAD_TO=0x7f8000
+CONFIG_SPL_PAD_TO=0x38000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
Signature · 1 line
2.43.2
Reviewed-by on v2 2/18
#3 lore raw

Re: [PATCH v2 02/18] rockchip: rk3399-puma: Update SPL_PAD_TO Kconfig option

Quoted 9 lines · Jonas Karlman

On rk3399-puma the FIT payload is located at sector 0x200 compared to the more Rockchip common sector 0x4000 offset:

   SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200

Because FIT payload is located at sector 0x200 and IDBlock is located at sector 64, the combined size of TPL+SPL (idbloader.img) cannot take up more than 224 KiB:

Quoted 5 lines
   (0x200 - 64) x 512 = 0x38000 (224 KiB)

Adjust SPL_PAD_TO to match the used 0x200 sector offset.

Thanks,
- Kever

Quoted 24 lines

---
v2: New patch split from DT sync patch

With this change it should be possible to drop the following u-boot.dtsi override and use the default offset = <CONFIG_SPL_PAD_TO>.

   offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;
---
  configs/puma-rk3399_defconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
configs/puma-rk3399_defconfig +1 -1
index 14a7bc8b1e00..ec7d52a6e13e 100644
@@ -31,7 +31,7 @@ CONFIG_DEBUG_UART=y
  CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb"
  CONFIG_DISPLAY_BOARDINFO_LATE=y
  CONFIG_SPL_MAX_SIZE=0x2e000
-CONFIG_SPL_PAD_TO=0x7f8000
+CONFIG_SPL_PAD_TO=0x38000
  # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
  # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
#4 lore raw

PATCH v2 3/18 rockchip: rk3399-puma: Use common bss and stack addresses

In reply to Jonas Karlman

The rk3399-puma board is currently using SPL stack and bss addr in SRAM, the same addr typically used by TPL, this differs from most other RK3399 boards.

Switch to use the common bss and stack addresses introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and stack addresses").

---
v2: New patch

---
 configs/puma-rk3399_defconfig | 10 ----------
 1 file changed, 10 deletions(-)
configs/puma-rk3399_defconfig +0 -10
index ec7d52a6e13e..bd4926cf0fce 100644
@@ -2,11 +2,8 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
-CONFIG_TEXT_BASE=0x00200000
 CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_ENV_SIZE=0x3000
 CONFIG_ENV_OFFSET=0x3F8000
@@ -16,12 +13,6 @@ CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_BOOT_MODE_REG=0x0
 CONFIG_ROCKCHIP_SPI_IMAGE=y
 CONFIG_TARGET_PUMA_RK3399=y
-CONFIG_SPL_STACK=0xff8effff
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0xff8e0000
-CONFIG_SPL_BSS_MAX_SIZE=0x10000
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
 CONFIG_DEBUG_UART_BASE=0xFF180000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -33,7 +24,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
 CONFIG_SPL_PAD_TO=0x38000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
 CONFIG_SPL_I2C=y
 CONFIG_SPL_POWER=y
Signature · 1 line
2.43.2
Reviewed-by on v2 3/18
#5 lore raw

Re: [PATCH v2 03/18] rockchip: rk3399-puma: Use common bss and stack addresses

Quoted 8 lines · Jonas Karlman

The rk3399-puma board is currently using SPL stack and bss addr in SRAM, the same addr typically used by TPL, this differs from most other RK3399 boards.

Switch to use the common bss and stack addresses introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and stack addresses").

Thanks,
- Kever

Quoted 43 lines

---
v2: New patch

---
  configs/puma-rk3399_defconfig | 10 ----------
  1 file changed, 10 deletions(-)
configs/puma-rk3399_defconfig +0 -10
index ec7d52a6e13e..bd4926cf0fce 100644
@@ -2,11 +2,8 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
-CONFIG_TEXT_BASE=0x00200000
  CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
  CONFIG_SF_DEFAULT_SPEED=20000000
  CONFIG_ENV_SIZE=0x3000
  CONFIG_ENV_OFFSET=0x3F8000
@@ -16,12 +13,6 @@ CONFIG_ROCKCHIP_RK3399=y
  CONFIG_ROCKCHIP_BOOT_MODE_REG=0x0
  CONFIG_ROCKCHIP_SPI_IMAGE=y
  CONFIG_TARGET_PUMA_RK3399=y
-CONFIG_SPL_STACK=0xff8effff
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0xff8e0000
-CONFIG_SPL_BSS_MAX_SIZE=0x10000
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
  CONFIG_DEBUG_UART_BASE=0xFF180000
  CONFIG_DEBUG_UART_CLOCK=24000000
  CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -33,7 +24,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
  CONFIG_SPL_MAX_SIZE=0x2e000
  CONFIG_SPL_PAD_TO=0x38000
  # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
  CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
  CONFIG_SPL_I2C=y
  CONFIG_SPL_POWER=y
#6 lore raw

PATCH v2 4/18 rockchip: rk3399-ficus: Enable TPL and use common bss and stack addr

In reply to Jonas Karlman

The rk3399-ficus board is only using SPL and not TPL+SPL like all other RK3399 boards, chromebook bob/kevin excluded. It does not seem to be any technical reason why this board was left using only SPL.

Switch to use TPL+SPL and to use the common bss and stack addresses introduced in commit 008ba0d56d00 ("rockchip: Add common default bss and stack addresses"). Also add the missing DEFAULT_FDT_FILE option.

---
v2: Update commit message
v2: Collet r-b tags

---
 configs/ficus-rk3399_defconfig | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
configs/ficus-rk3399_defconfig +2 -12
index 618f6baf91a5..3bcd0fd66b91 100644
@@ -2,32 +2,22 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
-CONFIG_TEXT_BASE=0x00200000
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-ficus"
-CONFIG_SPL_TEXT_BASE=0xff8c2000
 CONFIG_ROCKCHIP_RK3399=y
-CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000
 CONFIG_TARGET_ROCK960_RK3399=y
-CONFIG_SPL_STACK=0xff8effff
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0xff8e0000
-CONFIG_SPL_BSS_MAX_SIZE=0x10000
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
 CONFIG_DEBUG_UART_BASE=0xFF1A0000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-ficus.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
 CONFIG_SPL_PAD_TO=0x7f8000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
+CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
Signature · 1 line
2.43.2
#7 lore raw

PATCH v2 5/18 rockchip: rk3399: Sort imply statements alphabetically

In reply to Jonas Karlman

Sort imply statements under ROCKCHIP_RK3399 alphabetically.

---
v2: Collet r-b tags

---
 arch/arm/mach-rockchip/Kconfig | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
arch/arm/mach-rockchip/Kconfig +13 -13
index 67d3b28d058f..20f1b7572a31 100644
@@ -261,30 +261,30 @@ config ROCKCHIP_RK3399
 	select DM_PMIC
 	select DM_REGULATOR_FIXED
 	select BOARD_LATE_INIT
+	imply BOOTSTD_FULL
+	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply MISC
+	imply MISC_INIT_R
 	imply PARTITION_TYPE_GUID
 	imply PRE_CONSOLE_BUFFER
 	imply ROCKCHIP_COMMON_BOARD
+	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
 	imply SPL_ROCKCHIP_COMMON_BOARD
-	imply TPL_SERIAL
+	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
+	imply TPL_CLK
+	imply TPL_DM
+	imply TPL_DRIVERS_MISC
 	imply TPL_LIBCOMMON_SUPPORT
 	imply TPL_LIBGENERIC_SUPPORT
-	imply TPL_SYS_MALLOC_SIMPLE
-	imply TPL_DRIVERS_MISC
 	imply TPL_OF_CONTROL
-	imply TPL_DM
+	imply TPL_RAM
 	imply TPL_REGMAP
+	imply TPL_ROCKCHIP_COMMON_BOARD
+	imply TPL_SERIAL
+	imply TPL_SYS_MALLOC_SIMPLE
 	imply TPL_SYSCON
-	imply TPL_RAM
-	imply TPL_CLK
 	imply TPL_TINY_MEMSET
-	imply TPL_ROCKCHIP_COMMON_BOARD
-	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
-	imply BOOTSTD_FULL
-	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
-	imply MISC
-	imply ROCKCHIP_EFUSE
-	imply MISC_INIT_R
 	help
 	  The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72
 	  and quad-core Cortex-A53.
Signature · 1 line
2.43.2
Reviewed-by on v2 5/18
#8 lore raw

Re: [PATCH v2 05/18] rockchip: rk3399: Sort imply statements alphabetically

Quoted 4 lines · Jonas Karlman

Sort imply statements under ROCKCHIP_RK3399 alphabetically.

Looking good to me.

Quoted 54 lines

---
v2: Collet r-b tags

---
 arch/arm/mach-rockchip/Kconfig | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
arch/arm/mach-rockchip/Kconfig +13 -13
index 67d3b28d058f..20f1b7572a31 100644
@@ -261,30 +261,30 @@ config ROCKCHIP_RK3399
 	select DM_PMIC
 	select DM_REGULATOR_FIXED
 	select BOARD_LATE_INIT
+	imply BOOTSTD_FULL
+	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply MISC
+	imply MISC_INIT_R
 	imply PARTITION_TYPE_GUID
 	imply PRE_CONSOLE_BUFFER
 	imply ROCKCHIP_COMMON_BOARD
+	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
 	imply SPL_ROCKCHIP_COMMON_BOARD
-	imply TPL_SERIAL
+	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
+	imply TPL_CLK
+	imply TPL_DM
+	imply TPL_DRIVERS_MISC
 	imply TPL_LIBCOMMON_SUPPORT
 	imply TPL_LIBGENERIC_SUPPORT
-	imply TPL_SYS_MALLOC_SIMPLE
-	imply TPL_DRIVERS_MISC
 	imply TPL_OF_CONTROL
-	imply TPL_DM
+	imply TPL_RAM
 	imply TPL_REGMAP
+	imply TPL_ROCKCHIP_COMMON_BOARD
+	imply TPL_SERIAL
+	imply TPL_SYS_MALLOC_SIMPLE
 	imply TPL_SYSCON
-	imply TPL_RAM
-	imply TPL_CLK
 	imply TPL_TINY_MEMSET
-	imply TPL_ROCKCHIP_COMMON_BOARD
-	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
-	imply BOOTSTD_FULL
-	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
-	imply MISC
-	imply ROCKCHIP_EFUSE
-	imply MISC_INIT_R
 	help
 	  The Rockchip RK3399 is a ARM-based SoC with a dual-core Cortex-A72
 	  and quad-core Cortex-A53.
#9 lore raw

PATCH v2 6/18 rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation

In reply to Jonas Karlman

The RK3399 SoC support the ARMv8 Cryptography Extensions, use of ARMv8 crypto can speed up FIT checksum validation in SPL.

Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto extensions for SHA256 when validating checksum of FIT images.

Imply SPL_FIT_SIGNATURE and LEGACY_IMAGE_FORMAT to enable FIT checksum validation to almost all RK3399 boards.

The following boards have been excluded:
- chromebook_bob: SPL max size limitation of 120 KiB
- chromebook_kevin: SPL max size limitation of 120 KiB

Also imply OF_LIVE to help speed up init of U-Boot proper and disable CONFIG_SPL_RAW_IMAGE_SUPPORT on leez-rk3399 to ensure SPL does not try to jump to code that failed checksum validation.

---
v2: Do not exclude puma-rk3399 from FIT checksum validation in SPL

---
 arch/arm/mach-rockchip/Kconfig     | 5 +++++
 configs/chromebook_bob_defconfig   | 1 +
 configs/chromebook_kevin_defconfig | 1 +
 configs/leez-rk3399_defconfig      | 1 +
 configs/puma-rk3399_defconfig      | 1 -
 configs/rock-4se-rk3399_defconfig  | 2 --
 configs/rock-pi-4-rk3399_defconfig | 1 -
 configs/rockpro64-rk3399_defconfig | 2 --
 8 files changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-rockchip/Kconfig +5 -0
index 20f1b7572a31..7c0116da4921 100644
@@ -261,15 +261,20 @@ config ROCKCHIP_RK3399
 	select DM_PMIC
 	select DM_REGULATOR_FIXED
 	select BOARD_LATE_INIT
+	imply ARMV8_CRYPTO
+	imply ARMV8_SET_SMPEN
 	imply BOOTSTD_FULL
 	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply LEGACY_IMAGE_FORMAT
 	imply MISC
 	imply MISC_INIT_R
+	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
 	imply PRE_CONSOLE_BUFFER
 	imply ROCKCHIP_COMMON_BOARD
 	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
+	imply SPL_FIT_SIGNATURE
 	imply SPL_ROCKCHIP_COMMON_BOARD
 	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
 	imply TPL_CLK
configs/chromebook_bob_defconfig +1 -0
index 805da11dbf6a..400b2d7ed7de 100644
@@ -28,6 +28,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
configs/chromebook_kevin_defconfig +1 -0
index 8744152df61d..a881028cc7eb 100644
@@ -29,6 +29,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
configs/leez-rk3399_defconfig +1 -0
index e5088341389a..2831cfb36689 100644
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-leez-p710.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
 CONFIG_SPL_PAD_TO=0x7f8000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_TPL=y
 CONFIG_CMD_BOOTZ=y
configs/puma-rk3399_defconfig +0 -1
index bd4926cf0fce..53fc62bf7e35 100644
@@ -42,7 +42,6 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIVE=y
 CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
configs/rock-4se-rk3399_defconfig +0 -2
index 712502517eb2..04622df3c0a0 100644
@@ -15,8 +15,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-4se.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x2e000
configs/rock-pi-4-rk3399_defconfig +0 -1
index 315b8b853fc3..9036c51de421 100644
@@ -19,7 +19,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
 CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4a.dtb"
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
configs/rockpro64-rk3399_defconfig +0 -2
index d66b4a9d8900..062477286708 100644
@@ -17,8 +17,6 @@ CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x800800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
 CONFIG_BOOTSTAGE=y
 CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_USE_PREBOOT=y
Signature · 1 line
2.43.2
Reviewed-by on v2 6/18
#10 lore raw

Re: [PATCH v2 06/18] rockchip: rk3399: Enable ARMv8 crypto and FIT checksum validation

Quoted 13 lines · Jonas Karlman

The RK3399 SoC support the ARMv8 Cryptography Extensions, use of ARMv8 crypto can speed up FIT checksum validation in SPL.

Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto extensions for SHA256 when validating checksum of FIT images.

Imply SPL_FIT_SIGNATURE and LEGACY_IMAGE_FORMAT to enable FIT checksum validation to almost all RK3399 boards.

The following boards have been excluded:
- chromebook_bob: SPL max size limitation of 120 KiB
- chromebook_kevin: SPL max size limitation of 120 KiB

Quoted 5 lines

Also imply OF_LIVE to help speed up init of U-Boot proper and disable CONFIG_SPL_RAW_IMAGE_SUPPORT on leez-rk3399 to ensure SPL does not try to jump to code that failed checksum validation.

Thanks,
- Kever

Quoted 124 lines

---
v2: Do not exclude puma-rk3399 from FIT checksum validation in SPL

---
  arch/arm/mach-rockchip/Kconfig     | 5 +++++
  configs/chromebook_bob_defconfig   | 1 +
  configs/chromebook_kevin_defconfig | 1 +
  configs/leez-rk3399_defconfig      | 1 +
  configs/puma-rk3399_defconfig      | 1 -
  configs/rock-4se-rk3399_defconfig  | 2 --
  configs/rock-pi-4-rk3399_defconfig | 1 -
  configs/rockpro64-rk3399_defconfig | 2 --
  8 files changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-rockchip/Kconfig +5 -0
index 20f1b7572a31..7c0116da4921 100644
@@ -261,15 +261,20 @@ config ROCKCHIP_RK3399
  	select DM_PMIC
  	select DM_REGULATOR_FIXED
  	select BOARD_LATE_INIT
+	imply ARMV8_CRYPTO
+	imply ARMV8_SET_SMPEN
  	imply BOOTSTD_FULL
  	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply LEGACY_IMAGE_FORMAT
  	imply MISC
  	imply MISC_INIT_R
+	imply OF_LIVE
  	imply PARTITION_TYPE_GUID
  	imply PRE_CONSOLE_BUFFER
  	imply ROCKCHIP_COMMON_BOARD
  	imply ROCKCHIP_EFUSE
  	imply ROCKCHIP_SDRAM_COMMON
+	imply SPL_FIT_SIGNATURE
  	imply SPL_ROCKCHIP_COMMON_BOARD
  	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
  	imply TPL_CLK
configs/chromebook_bob_defconfig +1 -0
index 805da11dbf6a..400b2d7ed7de 100644
@@ -28,6 +28,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
  CONFIG_SPL_SPI=y
  CONFIG_SYS_LOAD_ADDR=0x800800
  CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
  CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb"
  # CONFIG_DISPLAY_CPUINFO is not set
  CONFIG_DISPLAY_BOARDINFO_LATE=y
configs/chromebook_kevin_defconfig +1 -0
index 8744152df61d..a881028cc7eb 100644
@@ -29,6 +29,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
  CONFIG_SPL_SPI=y
  CONFIG_SYS_LOAD_ADDR=0x800800
  CONFIG_DEBUG_UART=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
  CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb"
  # CONFIG_DISPLAY_CPUINFO is not set
  CONFIG_DISPLAY_BOARDINFO_LATE=y
configs/leez-rk3399_defconfig +1 -0
index e5088341389a..2831cfb36689 100644
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-leez-p710.dtb"
  CONFIG_DISPLAY_BOARDINFO_LATE=y
  CONFIG_SPL_MAX_SIZE=0x2e000
  CONFIG_SPL_PAD_TO=0x7f8000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
  CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
  CONFIG_TPL=y
  CONFIG_CMD_BOOTZ=y
configs/puma-rk3399_defconfig +0 -1
index bd4926cf0fce..53fc62bf7e35 100644
@@ -42,7 +42,6 @@ CONFIG_CMD_TIME=y
  CONFIG_CMD_PMIC=y
  CONFIG_CMD_REGULATOR=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIVE=y
  CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_OVERWRITE=y
  CONFIG_ENV_IS_IN_MMC=y
configs/rock-4se-rk3399_defconfig +0 -2
index 712502517eb2..04622df3c0a0 100644
@@ -15,8 +15,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
  CONFIG_PCI=y
  CONFIG_DEBUG_UART=y
  # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
  CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-4se.dtb"
  CONFIG_DISPLAY_BOARDINFO_LATE=y
  CONFIG_SPL_MAX_SIZE=0x2e000
configs/rock-pi-4-rk3399_defconfig +0 -1
index 315b8b853fc3..9036c51de421 100644
@@ -19,7 +19,6 @@ CONFIG_SYS_LOAD_ADDR=0x800800
  CONFIG_PCI=y
  CONFIG_DEBUG_UART=y
  # CONFIG_ANDROID_BOOT_IMAGE is not set
-CONFIG_SPL_FIT_SIGNATURE=y
  CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4a.dtb"
  CONFIG_DISPLAY_BOARDINFO_LATE=y
  CONFIG_SPL_MAX_SIZE=0x40000
configs/rockpro64-rk3399_defconfig +0 -2
index d66b4a9d8900..062477286708 100644
@@ -17,8 +17,6 @@ CONFIG_SPL_SPI=y
  CONFIG_SYS_LOAD_ADDR=0x800800
  CONFIG_PCI=y
  CONFIG_DEBUG_UART=y
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_LEGACY_IMAGE_FORMAT=y
  CONFIG_BOOTSTAGE=y
  CONFIG_BOOTSTAGE_REPORT=y
  CONFIG_USE_PREBOOT=y
#11 lore raw

PATCH v2 7/18 rockchip: rk3399: Enable random generator on all boards

In reply to Jonas Karlman

The RK3399 SoC contain a crypto engine block that can generate random numbers.

Imply DM_RNG and RNG_ROCKCHIP Kconfig options to take advantage of the random generator on all RK3399 boards. Also remove the unnecessary use of a status = "okay" prop.

---
v2: Move rng node cleanup to this patch
v2: Collect r-b tags

---
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi | 4 ----
 arch/arm/dts/rk3399-u-boot.dtsi               | 1 -
 arch/arm/mach-rockchip/Kconfig                | 2 ++
 configs/chromebook_bob_defconfig              | 2 --
 configs/chromebook_kevin_defconfig            | 2 --
 configs/evb-rk3399_defconfig                  | 2 --
 configs/firefly-rk3399_defconfig              | 2 --
 configs/pinebook-pro-rk3399_defconfig         | 2 --
 configs/pinephone-pro-rk3399_defconfig        | 2 --
 configs/roc-pc-rk3399_defconfig               | 2 --
 configs/rock960-rk3399_defconfig              | 2 --
 configs/rockpro64-rk3399_defconfig            | 2 --
 12 files changed, 2 insertions(+), 23 deletions(-)
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -4
index cabf0a9dae89..0e46e87e1fa0 100644
@@ -12,10 +12,6 @@
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &sdhci {
 	max-frequency = <25000000>;
 	bootph-all;
arch/arm/dts/rk3399-u-boot.dtsi +0 -1
index 87b173e59579..0b0a90acf431 100644
@@ -32,7 +32,6 @@
 	rng: rng@ff8b8000 {
 		compatible = "rockchip,rk3399-crypto";
 		reg = <0x0 0xff8b8000 0x0 0x1000>;
-		status = "okay";
 	};
 
 	dmc: dmc {
arch/arm/mach-rockchip/Kconfig +2 -0
index 7c0116da4921..f580d69ed879 100644
@@ -265,12 +265,14 @@ config ROCKCHIP_RK3399
 	imply ARMV8_SET_SMPEN
 	imply BOOTSTD_FULL
 	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply DM_RNG
 	imply LEGACY_IMAGE_FORMAT
 	imply MISC
 	imply MISC_INIT_R
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
 	imply PRE_CONSOLE_BUFFER
+	imply RNG_ROCKCHIP
 	imply ROCKCHIP_COMMON_BOARD
 	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
configs/chromebook_bob_defconfig +0 -2
index 400b2d7ed7de..5ffd5195ea19 100644
@@ -89,8 +89,6 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_CROS_EC=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_ROCKCHIP_SPI=y
configs/chromebook_kevin_defconfig +0 -2
index a881028cc7eb..bacdcc367bda 100644
@@ -90,8 +90,6 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_CROS_EC=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_ROCKCHIP_SPI=y
configs/evb-rk3399_defconfig +0 -2
index d81c7f9604e1..c4936768ffb6 100644
@@ -47,8 +47,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/firefly-rk3399_defconfig +0 -2
index 545c047c6df8..8f68ffbd3a49 100644
@@ -45,8 +45,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/pinebook-pro-rk3399_defconfig +0 -2
index 23ac24a0bffe..e4aad1b710cb 100644
@@ -75,8 +75,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/pinephone-pro-rk3399_defconfig +0 -2
index 8c6323f6c516..285c47d76b6e 100644
@@ -65,8 +65,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_ROCKCHIP_SPI=y
configs/roc-pc-rk3399_defconfig +0 -2
index a41f71d9e167..5d6e6b17091f 100644
@@ -60,8 +60,6 @@ CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/rock960-rk3399_defconfig +0 -2
index 13575c580054..7a4a3df85b1b 100644
@@ -52,8 +52,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/rockpro64-rk3399_defconfig +0 -2
index 062477286708..368ef7c4b5db 100644
@@ -68,8 +68,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_SCSI=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
Signature · 1 line
2.43.2
Reviewed-by on v2 7/18
#12 lore raw

Re: [PATCH v2 07/18] rockchip: rk3399: Enable random generator on all boards

Quoted 11 lines · Jonas Karlman

The RK3399 SoC contain a crypto engine block that can generate random numbers.

Imply DM_RNG and RNG_ROCKCHIP Kconfig options to take advantage of the random generator on all RK3399 boards. Also remove the unnecessary use of a status = "okay" prop.

Looking good to me.

Quoted 186 lines

---
v2: Move rng node cleanup to this patch
v2: Collect r-b tags

---
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi | 4 ----
 arch/arm/dts/rk3399-u-boot.dtsi               | 1 -
 arch/arm/mach-rockchip/Kconfig                | 2 ++
 configs/chromebook_bob_defconfig              | 2 --
 configs/chromebook_kevin_defconfig            | 2 --
 configs/evb-rk3399_defconfig                  | 2 --
 configs/firefly-rk3399_defconfig              | 2 --
 configs/pinebook-pro-rk3399_defconfig         | 2 --
 configs/pinephone-pro-rk3399_defconfig        | 2 --
 configs/roc-pc-rk3399_defconfig               | 2 --
 configs/rock960-rk3399_defconfig              | 2 --
 configs/rockpro64-rk3399_defconfig            | 2 --
 12 files changed, 2 insertions(+), 23 deletions(-)
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -4
index cabf0a9dae89..0e46e87e1fa0 100644
@@ -12,10 +12,6 @@
 	};
 };
 
-&rng {
-	status = "okay";
-};
-
 &sdhci {
 	max-frequency = <25000000>;
 	bootph-all;
arch/arm/dts/rk3399-u-boot.dtsi +0 -1
index 87b173e59579..0b0a90acf431 100644
@@ -32,7 +32,6 @@
 	rng: rng@ff8b8000 {
 		compatible = "rockchip,rk3399-crypto";
 		reg = <0x0 0xff8b8000 0x0 0x1000>;
-		status = "okay";
 	};
 
 	dmc: dmc {
arch/arm/mach-rockchip/Kconfig +2 -0
index 7c0116da4921..f580d69ed879 100644
@@ -265,12 +265,14 @@ config ROCKCHIP_RK3399
 	imply ARMV8_SET_SMPEN
 	imply BOOTSTD_FULL
 	imply CMD_BOOTCOUNT if BOOTCOUNT_LIMIT
+	imply DM_RNG
 	imply LEGACY_IMAGE_FORMAT
 	imply MISC
 	imply MISC_INIT_R
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
 	imply PRE_CONSOLE_BUFFER
+	imply RNG_ROCKCHIP
 	imply ROCKCHIP_COMMON_BOARD
 	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
configs/chromebook_bob_defconfig +0 -2
index 400b2d7ed7de..5ffd5195ea19 100644
@@ -89,8 +89,6 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_CROS_EC=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_ROCKCHIP_SPI=y
configs/chromebook_kevin_defconfig +0 -2
index a881028cc7eb..bacdcc367bda 100644
@@ -90,8 +90,6 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_CROS_EC=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_ROCKCHIP_SPI=y
configs/evb-rk3399_defconfig +0 -2
index d81c7f9604e1..c4936768ffb6 100644
@@ -47,8 +47,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/firefly-rk3399_defconfig +0 -2
index 545c047c6df8..8f68ffbd3a49 100644
@@ -45,8 +45,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/pinebook-pro-rk3399_defconfig +0 -2
index 23ac24a0bffe..e4aad1b710cb 100644
@@ -75,8 +75,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/pinephone-pro-rk3399_defconfig +0 -2
index 8c6323f6c516..285c47d76b6e 100644
@@ -65,8 +65,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_ROCKCHIP_SPI=y
configs/roc-pc-rk3399_defconfig +0 -2
index a41f71d9e167..5d6e6b17091f 100644
@@ -60,8 +60,6 @@ CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/rock960-rk3399_defconfig +0 -2
index 13575c580054..7a4a3df85b1b 100644
@@ -52,8 +52,6 @@ CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550_MEM32=y
configs/rockpro64-rk3399_defconfig +0 -2
index 062477286708..368ef7c4b5db 100644
@@ -68,8 +68,6 @@ CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
-CONFIG_DM_RNG=y
-CONFIG_RNG_ROCKCHIP=y
 CONFIG_SCSI=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
#13 lore raw

PATCH v2 8/18 rockchip: rk3399: Imply support for GbE PHY

In reply to Jonas Karlman

Imply support for GbE PHY status parsing and configuration when support for onboard ethernet is enabled.

---
v2: Collect r-b tags

---
 arch/arm/mach-rockchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/Kconfig +1 -0
index f580d69ed879..6f1213b1710c 100644
@@ -271,6 +271,7 @@ config ROCKCHIP_RK3399
 	imply MISC_INIT_R
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
+	imply PHY_GIGE if GMAC_ROCKCHIP
 	imply PRE_CONSOLE_BUFFER
 	imply RNG_ROCKCHIP
 	imply ROCKCHIP_COMMON_BOARD
Signature · 1 line
2.43.2
Reviewed-by on v2 8/18
#14 lore raw

Re: [PATCH v2 08/18] rockchip: rk3399: Imply support for GbE PHY

Quoted 6 lines · Jonas Karlman

Imply support for GbE PHY status parsing and configuration when support for onboard ethernet is enabled.

Looking good to me.

Quoted 18 lines

---
v2: Collect r-b tags

---
 arch/arm/mach-rockchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/Kconfig +1 -0
index f580d69ed879..6f1213b1710c 100644
@@ -271,6 +271,7 @@ config ROCKCHIP_RK3399
 	imply MISC_INIT_R
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
+	imply PHY_GIGE if GMAC_ROCKCHIP
 	imply PRE_CONSOLE_BUFFER
 	imply RNG_ROCKCHIP
 	imply ROCKCHIP_COMMON_BOARD
#15 lore raw

PATCH v2 9/18 rockchip: rk3399: Enable DT overlay support on all boards

In reply to Jonas Karlman

Imply OF_LIBFDT_OVERLAY Kconfig options to add device tree overlay support on all RK3399 boards.

---
v2: Collect r-b tags

---
 arch/arm/mach-rockchip/Kconfig        | 1 +
 configs/rock-4c-plus-rk3399_defconfig | 1 -
 configs/rock-4se-rk3399_defconfig     | 1 -
 configs/rock-pi-4-rk3399_defconfig    | 1 -
 configs/rock-pi-4c-rk3399_defconfig   | 1 -
 5 files changed, 1 insertion(+), 4 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index 6f1213b1710c..bfde9bf8dd16 100644
@@ -269,6 +269,7 @@ config ROCKCHIP_RK3399
 	imply LEGACY_IMAGE_FORMAT
 	imply MISC
 	imply MISC_INIT_R
+	imply OF_LIBFDT_OVERLAY
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
 	imply PHY_GIGE if GMAC_ROCKCHIP
configs/rock-4c-plus-rk3399_defconfig +0 -1
index bebea4fd0691..6c69e8bdcb92 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4c-plus"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
configs/rock-4se-rk3399_defconfig +0 -1
index 04622df3c0a0..e5ed81022bd6 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4se"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
configs/rock-pi-4-rk3399_defconfig +0 -1
index 9036c51de421..2801becedb4b 100644
@@ -6,7 +6,6 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_SF_DEFAULT_SPEED=10000000
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4a"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_SPI_IMAGE=y
configs/rock-pi-4c-rk3399_defconfig +0 -1
index e1adec600174..72d37bff9e9a 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4c"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
Signature · 1 line
2.43.2
Reviewed-by on v2 9/18
#16 lore raw

Re: [PATCH v2 09/18] rockchip: rk3399: Enable DT overlay support on all boards

Quoted 6 lines · Jonas Karlman

Imply OF_LIBFDT_OVERLAY Kconfig options to add device tree overlay support on all RK3399 boards.

Looking good to me.

Quoted 74 lines

---
v2: Collect r-b tags

---
 arch/arm/mach-rockchip/Kconfig        | 1 +
 configs/rock-4c-plus-rk3399_defconfig | 1 -
 configs/rock-4se-rk3399_defconfig     | 1 -
 configs/rock-pi-4-rk3399_defconfig    | 1 -
 configs/rock-pi-4c-rk3399_defconfig   | 1 -
 5 files changed, 1 insertion(+), 4 deletions(-)
arch/arm/mach-rockchip/Kconfig +1 -0
index 6f1213b1710c..bfde9bf8dd16 100644
@@ -269,6 +269,7 @@ config ROCKCHIP_RK3399
 	imply LEGACY_IMAGE_FORMAT
 	imply MISC
 	imply MISC_INIT_R
+	imply OF_LIBFDT_OVERLAY
 	imply OF_LIVE
 	imply PARTITION_TYPE_GUID
 	imply PHY_GIGE if GMAC_ROCKCHIP
configs/rock-4c-plus-rk3399_defconfig +0 -1
index bebea4fd0691..6c69e8bdcb92 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4c-plus"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
configs/rock-4se-rk3399_defconfig +0 -1
index 04622df3c0a0..e5ed81022bd6 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-4se"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
configs/rock-pi-4-rk3399_defconfig +0 -1
index 9036c51de421..2801becedb4b 100644
@@ -6,7 +6,6 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_SF_DEFAULT_SPEED=10000000
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4a"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_ROCKCHIP_SPI_IMAGE=y
configs/rock-pi-4c-rk3399_defconfig +0 -1
index e1adec600174..72d37bff9e9a 100644
@@ -5,7 +5,6 @@ CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4c"
-CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_DM_RESET=y
 CONFIG_ROCKCHIP_RK3399=y
 CONFIG_TARGET_ROCKPI4_RK3399=y
#17 lore raw

PATCH v2 10/18 rockchip: rk3399: Remove use of xPL_MISC_DRIVERS options

In reply to Jonas Karlman

The TPL and/or SPL control FDT on RK3399 boards does not contain any node with a compatible that is supported by driver/misc/ drivers.

Remove use of xPL_MISC_DRIVERS options to stop including e.g an unused efuse driver in TPL and/or SPL.

---
v2: Collect r-b tags

---
 arch/arm/mach-rockchip/Kconfig | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-rockchip/Kconfig +0 -2
index bfde9bf8dd16..7d6374b73586 100644
@@ -251,7 +251,6 @@ config ROCKCHIP_RK3399
 	select TPL_NEEDS_SEPARATE_STACK if TPL
 	select SPL_SEPARATE_BSS
 	select SPL_SERIAL
-	select SPL_DRIVERS_MISC
 	select CLK
 	select FIT
 	select PINCTRL
@@ -283,7 +282,6 @@ config ROCKCHIP_RK3399
 	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
 	imply TPL_CLK
 	imply TPL_DM
-	imply TPL_DRIVERS_MISC
 	imply TPL_LIBCOMMON_SUPPORT
 	imply TPL_LIBGENERIC_SUPPORT
 	imply TPL_OF_CONTROL
Signature · 1 line
2.43.2
#18 lore raw

PATCH v2 11/18 rockchip: rk3399: Add a default spl-boot-order prop

In reply to Jonas Karlman

A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl", &sdhci and &sdmmc.

Move this to rk3399-u-boot.dtsi and make this default for boards currently missing a u-boot,spl-boot-order prop.

Before commit a7e69952eb6d ("rockchip: spl: Cache boot source id for later use") it was required to include the SPI flash node in the u-boot,spl-boot-order prop to successfully load FIT from SPI flash.

The SPI flash node reference has been dropped from spl-boot-order from pinebook-pro, roc-pc and rockpro64 now that "same-as-spl" also gets resolved to the SPI flash node and loading FIT from SPI flash works without having the node explicitly referenced in spl-boot-order prop.

---
v2: Update commit message

---
 arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi      | 1 -
 arch/arm/dts/rk3399-evb-u-boot.dtsi            | 1 -
 arch/arm/dts/rk3399-ficus-u-boot.dtsi          | 6 ------
 arch/arm/dts/rk3399-firefly-u-boot.dtsi        | 6 ------
 arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi    | 6 ------
 arch/arm/dts/rk3399-leez-p710-u-boot.dtsi      | 6 ------
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi        | 6 ------
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi   | 6 ------
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi  | 6 ------
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi         | 4 ----
 arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi      | 6 ------
 arch/arm/dts/rk3399-rock960-u-boot.dtsi        | 5 -----
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi      | 5 +----
 arch/arm/dts/rk3399-u-boot.dtsi                | 4 ++++
 arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi | 6 ------
 15 files changed, 5 insertions(+), 69 deletions(-)
arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi +0 -1
index a3f27566e438..6c07de98fa01 100644
@@ -9,7 +9,6 @@
 / {
 	chosen {
 		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
 };
 
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -1
index dfce63e4d428..796ac9642399 100644
@@ -9,7 +9,6 @@
 / {
 	chosen {
 		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
 };
 
arch/arm/dts/rk3399-ficus-u-boot.dtsi +0 -6
index 38e0897db91d..67b63a835238 100644
@@ -5,9 +5,3 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
arch/arm/dts/rk3399-firefly-u-boot.dtsi +0 -6
index c58ad95d120a..1f5fda1d0f1d 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi +0 -6
index a7039d74a016..4a3b23e48313 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +0 -6
index c638ce259731..03b596850635 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +0 -6
index a9d10592d573..a126bbaf086f 100644
@@ -5,12 +5,6 @@
 
 #include "rk3399-u-boot.dtsi"
 
-/{
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdmmc {
 	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
 };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -6
index 88a77cad8d43..83b0c44e9ec5 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &spiflash, &sdmmc;
-	};
-};
-
 &edp {
 	rockchip,panel = <&edp_panel>;
 };
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -6
index 0e46e87e1fa0..5dc7d0db5f73 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdhci {
 	max-frequency = <25000000>;
 	bootph-all;
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +0 -4
index c8f4418a7389..e390cf3abab5 100644
@@ -7,10 +7,6 @@
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
 / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc;
-	};
-
 	vcc_hub_en: vcc_hub_en-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +0 -6
index 60122f3bcd6c..b3bfc77f7569 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdhci {
 	cap-mmc-highspeed;
 	mmc-ddr-1_8v;
arch/arm/dts/rk3399-rock960-u-boot.dtsi +0 -5
index c190089e2643..55716ba4df73 100644
@@ -7,10 +7,6 @@
 #include "rk3399-sdram-lpddr3-2GB-1600.dtsi"
 
 / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-
 	vdd_log: vdd-log {
 		compatible = "pwm-regulator";
 		pwms = <&pwm2 0 25000 1>;
@@ -22,5 +18,4 @@
 		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
-
 };
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +1 -4
index 089732524a76..b15e5392c3cf 100644
@@ -5,11 +5,8 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdmmc, &sdhci;
-	};
 
+/ {
         smbios {
                 compatible = "u-boot,sysinfo-smbios";
                 smbios {
arch/arm/dts/rk3399-u-boot.dtsi +4 -0
index 0b0a90acf431..96523a138ae3 100644
@@ -14,6 +14,10 @@
 		spi1 = &spi1;
 	};
 
+	chosen {
+		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+	};
+
 	cic: syscon@ff620000 {
 		bootph-all;
 		compatible = "rockchip,rk3399-cic", "syscon";
arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi +0 -6
index 7c66e1145a50..946a0230dbb4 100644
@@ -5,9 +5,3 @@
 
 #include "rk3399pro-u-boot.dtsi"
 #include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
Signature · 1 line
2.43.2
Reviewed-by on v2 11/18
#19 lore raw

Re: [PATCH v2 11/18] rockchip: rk3399: Add a default spl-boot-order prop

Quoted 10 lines · Jonas Karlman

A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl", &sdhci and &sdmmc.

Move this to rk3399-u-boot.dtsi and make this default for boards currently missing a u-boot,spl-boot-order prop.

Before commit a7e69952eb6d ("rockchip: spl: Cache boot source id for later use") it was required to include the SPI flash node in the u-boot,spl-boot-order prop to successfully load FIT from SPI flash.

Quoted 6 lines

The SPI flash node reference has been dropped from spl-boot-order from pinebook-pro, roc-pc and rockpro64 now that "same-as-spl" also gets resolved to the SPI flash node and loading FIT from SPI flash works without having the node explicitly referenced in spl-boot-order prop.

Looking good to me.

Quoted 273 lines

---
v2: Update commit message

---
 arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi      | 1 -
 arch/arm/dts/rk3399-evb-u-boot.dtsi            | 1 -
 arch/arm/dts/rk3399-ficus-u-boot.dtsi          | 6 ------
 arch/arm/dts/rk3399-firefly-u-boot.dtsi        | 6 ------
 arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi    | 6 ------
 arch/arm/dts/rk3399-leez-p710-u-boot.dtsi      | 6 ------
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi        | 6 ------
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi   | 6 ------
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi  | 6 ------
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi         | 4 ----
 arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi      | 6 ------
 arch/arm/dts/rk3399-rock960-u-boot.dtsi        | 5 -----
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi      | 5 +----
 arch/arm/dts/rk3399-u-boot.dtsi                | 4 ++++
 arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi | 6 ------
 15 files changed, 5 insertions(+), 69 deletions(-)
arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi +0 -1
index a3f27566e438..6c07de98fa01 100644
@@ -9,7 +9,6 @@
 / {
 	chosen {
 		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
 };
 
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -1
index dfce63e4d428..796ac9642399 100644
@@ -9,7 +9,6 @@
 / {
 	chosen {
 		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
 };
 
arch/arm/dts/rk3399-ficus-u-boot.dtsi +0 -6
index 38e0897db91d..67b63a835238 100644
@@ -5,9 +5,3 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
arch/arm/dts/rk3399-firefly-u-boot.dtsi +0 -6
index c58ad95d120a..1f5fda1d0f1d 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi +0 -6
index a7039d74a016..4a3b23e48313 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +0 -6
index c638ce259731..03b596850635 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +0 -6
index a9d10592d573..a126bbaf086f 100644
@@ -5,12 +5,6 @@
 
 #include "rk3399-u-boot.dtsi"
 
-/{
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdmmc {
 	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
 };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -6
index 88a77cad8d43..83b0c44e9ec5 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &spiflash, &sdmmc;
-	};
-};
-
 &edp {
 	rockchip,panel = <&edp_panel>;
 };
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -6
index 0e46e87e1fa0..5dc7d0db5f73 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdhci {
 	max-frequency = <25000000>;
 	bootph-all;
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +0 -4
index c8f4418a7389..e390cf3abab5 100644
@@ -7,10 +7,6 @@
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
 / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc;
-	};
-
 	vcc_hub_en: vcc_hub_en-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +0 -6
index 60122f3bcd6c..b3bfc77f7569 100644
@@ -6,12 +6,6 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
 &sdhci {
 	cap-mmc-highspeed;
 	mmc-ddr-1_8v;
arch/arm/dts/rk3399-rock960-u-boot.dtsi +0 -5
index c190089e2643..55716ba4df73 100644
@@ -7,10 +7,6 @@
 #include "rk3399-sdram-lpddr3-2GB-1600.dtsi"
 
 / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-
 	vdd_log: vdd-log {
 		compatible = "pwm-regulator";
 		pwms = <&pwm2 0 25000 1>;
@@ -22,5 +18,4 @@
 		regulator-init-microvolt = <950000>;
 		vin-supply = <&vcc5v0_sys>;
 	};
-
 };
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +1 -4
index 089732524a76..b15e5392c3cf 100644
@@ -5,11 +5,8 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-lpddr4-100.dtsi"
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdmmc, &sdhci;
-	};
 
+/ {
         smbios {
                 compatible = "u-boot,sysinfo-smbios";
                 smbios {
arch/arm/dts/rk3399-u-boot.dtsi +4 -0
index 0b0a90acf431..96523a138ae3 100644
@@ -14,6 +14,10 @@
 		spi1 = &spi1;
 	};
 
+	chosen {
+		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+	};
+
 	cic: syscon@ff620000 {
 		bootph-all;
 		compatible = "rockchip,rk3399-cic", "syscon";
arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi +0 -6
index 7c66e1145a50..946a0230dbb4 100644
@@ -5,9 +5,3 @@
 
 #include "rk3399pro-u-boot.dtsi"
 #include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
Reviewed-by on v2 11/18
#20 lore raw

Re: [PATCH v2 11/18] rockchip: rk3399: Add a default spl-boot-order prop

In reply to Jonas Karlman
Quoted 10 lines · Jonas Karlman

A lot of RK3399 boards use a u-boot,spl-boot-order of "same-as-spl", &sdhci and &sdmmc.

Move this to rk3399-u-boot.dtsi and make this default for boards currently missing a u-boot,spl-boot-order prop.

Before commit a7e69952eb6d ("rockchip: spl: Cache boot source id for later use") it was required to include the SPI flash node in the u-boot,spl-boot-order prop to successfully load FIT from SPI flash.

Quoted 6 lines

The SPI flash node reference has been dropped from spl-boot-order from pinebook-pro, roc-pc and rockpro64 now that "same-as-spl" also gets resolved to the SPI flash node and loading FIT from SPI flash works without having the node explicitly referenced in spl-boot-order prop.

Thanks,
- Kever

Quoted 259 lines

---
v2: Update commit message

---
  arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi      | 1 -
  arch/arm/dts/rk3399-evb-u-boot.dtsi            | 1 -
  arch/arm/dts/rk3399-ficus-u-boot.dtsi          | 6 ------
  arch/arm/dts/rk3399-firefly-u-boot.dtsi        | 6 ------
  arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi    | 6 ------
  arch/arm/dts/rk3399-leez-p710-u-boot.dtsi      | 6 ------
  arch/arm/dts/rk3399-nanopi4-u-boot.dtsi        | 6 ------
  arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi   | 6 ------
  arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi  | 6 ------
  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi         | 4 ----
  arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi      | 6 ------
  arch/arm/dts/rk3399-rock960-u-boot.dtsi        | 5 -----
  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi      | 5 +----
  arch/arm/dts/rk3399-u-boot.dtsi                | 4 ++++
  arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi | 6 ------
  15 files changed, 5 insertions(+), 69 deletions(-)
arch/arm/dts/rk3399-eaidk-610-u-boot.dtsi +0 -1
index a3f27566e438..6c07de98fa01 100644
@@ -9,7 +9,6 @@
  / {
  	chosen {
  		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
  	};
  };
 
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -1
index dfce63e4d428..796ac9642399 100644
@@ -9,7 +9,6 @@
  / {
  	chosen {
  		stdout-path = "serial2:1500000n8";
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
  	};
  };
 
arch/arm/dts/rk3399-ficus-u-boot.dtsi +0 -6
index 38e0897db91d..67b63a835238 100644
@@ -5,9 +5,3 @@
 
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-ddr3-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
arch/arm/dts/rk3399-firefly-u-boot.dtsi +0 -6
index c58ad95d120a..1f5fda1d0f1d 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-ddr3-1600.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &vdd_log {
  	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-khadas-edge-u-boot.dtsi +0 -6
index a7039d74a016..4a3b23e48313 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &vdd_log {
  	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-leez-p710-u-boot.dtsi +0 -6
index c638ce259731..03b596850635 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &vdd_log {
  	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +0 -6
index a9d10592d573..a126bbaf086f 100644
@@ -5,12 +5,6 @@
 
  #include "rk3399-u-boot.dtsi"
 
-/{
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &sdmmc {
  	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
  };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -6
index 88a77cad8d43..83b0c44e9ec5 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &spiflash, &sdmmc;
-	};
-};
-
  &edp {
  	rockchip,panel = <&edp_panel>;
  };
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -6
index 0e46e87e1fa0..5dc7d0db5f73 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &sdhci {
  	max-frequency = <25000000>;
  	bootph-all;
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +0 -4
index c8f4418a7389..e390cf3abab5 100644
@@ -7,10 +7,6 @@
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
  / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc;
-	};
-
  	vcc_hub_en: vcc_hub_en-regulator {
  		compatible = "regulator-fixed";
  		enable-active-high;
arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +0 -6
index 60122f3bcd6c..b3bfc77f7569 100644
@@ -6,12 +6,6 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
 
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
-
  &sdhci {
  	cap-mmc-highspeed;
  	mmc-ddr-1_8v;
arch/arm/dts/rk3399-rock960-u-boot.dtsi +0 -5
index c190089e2643..55716ba4df73 100644
@@ -7,10 +7,6 @@
  #include "rk3399-sdram-lpddr3-2GB-1600.dtsi"
 
  / {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-
  	vdd_log: vdd-log {
  		compatible = "pwm-regulator";
  		pwms = <&pwm2 0 25000 1>;
@@ -22,5 +18,4 @@
  		regulator-init-microvolt = <950000>;
  		vin-supply = <&vcc5v0_sys>;
  	};
-
  };
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +1 -4
index 089732524a76..b15e5392c3cf 100644
@@ -5,11 +5,8 @@
 
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-lpddr4-100.dtsi"
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdmmc, &sdhci;
-	};
 
+/ {
          smbios {
                  compatible = "u-boot,sysinfo-smbios";
                  smbios {
arch/arm/dts/rk3399-u-boot.dtsi +4 -0
index 0b0a90acf431..96523a138ae3 100644
@@ -14,6 +14,10 @@
  		spi1 = &spi1;
  	};
 
+	chosen {
+		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
+	};
+
  	cic: syscon@ff620000 {
  		bootph-all;
  		compatible = "rockchip,rk3399-cic", "syscon";
arch/arm/dts/rk3399pro-rock-pi-n10-u-boot.dtsi +0 -6
index 7c66e1145a50..946a0230dbb4 100644
@@ -5,9 +5,3 @@
 
  #include "rk3399pro-u-boot.dtsi"
  #include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
-
-/ {
-	chosen {
-		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
-	};
-};
#21 lore raw

PATCH v2 12/18 rockchip: rk3399: Remove inherited bootph-all props

In reply to Jonas Karlman

Remove superfluous bootph-all props already inherited from main soc u-boot.dtsi file.

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
 arch/arm/dts/rk3399-evb-u-boot.dtsi           | 1 -
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi  | 2 --
 arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi | 2 --
 3 files changed, 5 deletions(-)
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -1
index 796ac9642399..9df4a02c3e74 100644
@@ -38,7 +38,6 @@
 };
 
 &sdmmc {
-	bootph-all;
 	bus-width = <4>;
 	cap-mmc-highspeed;
 	cap-sd-highspeed;
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -2
index 83b0c44e9ec5..56fdaf440aea 100644
@@ -12,12 +12,10 @@
 
 &sdhci {
 	max-frequency = <25000000>;
-	bootph-all;
 };
 
 &sdmmc {
 	max-frequency = <20000000>;
-	bootph-all;
 };
 
 &spiflash {
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -2
index 5dc7d0db5f73..dcfcec4f3072 100644
@@ -8,10 +8,8 @@
 
 &sdhci {
 	max-frequency = <25000000>;
-	bootph-all;
 };
 
 &sdmmc {
 	max-frequency = <20000000>;
-	bootph-all;
 };
Signature · 1 line
2.43.2
Reviewed-by on v2 12/18
#22 lore raw

Re: [PATCH v2 12/18] rockchip: rk3399: Remove inherited bootph-all props

Quoted 4 lines · Jonas Karlman

Remove superfluous bootph-all props already inherited from main soc u-boot.dtsi file.

Thanks,
- Kever

Quoted 52 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
  arch/arm/dts/rk3399-evb-u-boot.dtsi           | 1 -
  arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi  | 2 --
  arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi | 2 --
  3 files changed, 5 deletions(-)
arch/arm/dts/rk3399-evb-u-boot.dtsi +0 -1
index 796ac9642399..9df4a02c3e74 100644
@@ -38,7 +38,6 @@
  };
 
  &sdmmc {
-	bootph-all;
  	bus-width = <4>;
  	cap-mmc-highspeed;
  	cap-sd-highspeed;
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +0 -2
index 83b0c44e9ec5..56fdaf440aea 100644
@@ -12,12 +12,10 @@
 
  &sdhci {
  	max-frequency = <25000000>;
-	bootph-all;
  };
 
  &sdmmc {
  	max-frequency = <20000000>;
-	bootph-all;
  };
 
  &spiflash {
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi +0 -2
index 5dc7d0db5f73..dcfcec4f3072 100644
@@ -8,10 +8,8 @@
 
  &sdhci {
  	max-frequency = <25000000>;
-	bootph-all;
  };
 
  &sdmmc {
  	max-frequency = <20000000>;
-	bootph-all;
  };
#23 lore raw

PATCH v2 13/18 rockchip: rk3399: Sort nodes in u-boot.dtsi files

In reply to Jonas Karlman

Sort nodes alphabetically by name, symbol or reg addr in RK3399 related u-boot.dtsi files. Also remove one of the duplicated &pmu nodes.

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
 arch/arm/dts/rk3399-evb-u-boot.dtsi    | 24 ++++++++---------
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 ++++-----
 arch/arm/dts/rk3399-u-boot.dtsi        | 37 ++++++++++++--------------
 3 files changed, 35 insertions(+), 38 deletions(-)
arch/arm/dts/rk3399-evb-u-boot.dtsi +12 -12
index 9df4a02c3e74..6dedfeec0722 100644
@@ -20,6 +20,18 @@
 	bootph-all;
 };
 
+&sdmmc {
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	max-frequency = <150000000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+	status = "okay";
+};
+
 &tcphy1 {
 	status = "okay";
 };
@@ -36,15 +48,3 @@
 &vdd_center {
 	regulator-init-microvolt = <900000>;
 };
-
-&sdmmc {
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
-	disable-wp;
-	max-frequency = <150000000>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
-	status = "okay";
-};
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +6 -6
index e390cf3abab5..58a3c0afcddd 100644
@@ -38,12 +38,11 @@
 	};
 };
 
-&vdd_log {
-	regulator-min-microvolt = <430000>;
-	regulator-init-microvolt = <950000>;
+&vcc5v0_host {
+	regulator-always-on;
 };
 
-&vcc5v0_host {
+&vcc_sdio {
 	regulator-always-on;
 };
 
@@ -51,6 +50,7 @@
 	regulator-always-on;
 };
 
-&vcc_sdio {
-	regulator-always-on;
+&vdd_log {
+	regulator-min-microvolt = <430000>;
+	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-u-boot.dtsi +17 -20
index 96523a138ae3..b9b8d3ee1d92 100644
@@ -18,19 +18,25 @@
 		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
 
-	cic: syscon@ff620000 {
+	pmusgrf: syscon@ff330000 {
+		compatible = "rockchip,rk3399-pmusgrf", "syscon";
+		reg = <0x0 0xff330000 0x0 0xe3d4>;
 		bootph-all;
+	};
+
+	cic: syscon@ff620000 {
 		compatible = "rockchip,rk3399-cic", "syscon";
 		reg = <0x0 0xff620000 0x0 0x100>;
+		bootph-all;
 	};
 
 	dfi: dfi@ff630000 {
-		bootph-all;
 		reg = <0x00 0xff630000 0x00 0x4000>;
 		compatible = "rockchip,rk3399-dfi";
 		rockchip,pmu = <&pmugrf>;
 		clocks = <&cru PCLK_DDR_MON>;
 		clock-names = "pclk_ddr_mon";
+		bootph-all;
 	};
 
 	rng: rng@ff8b8000 {
@@ -39,12 +45,7 @@
 	};
 
 	dmc: dmc {
-		bootph-all;
 		compatible = "rockchip,rk3399-dmc";
-		devfreq-events = <&dfi>;
-		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
-		clocks = <&cru SCLK_DDRCLK>;
-		clock-names = "dmc_clk";
 		reg = <0x0 0xffa80000 0x0 0x0800
 		       0x0 0xffa80800 0x0 0x1800
 		       0x0 0xffa82000 0x0 0x2000
@@ -53,14 +54,12 @@
 		       0x0 0xffa88800 0x0 0x1800
 		       0x0 0xffa8a000 0x0 0x2000
 		       0x0 0xffa8c000 0x0 0x1000>;
-	};
-
-	pmusgrf: syscon@ff330000 {
+		devfreq-events = <&dfi>;
+		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_DDRCLK>;
+		clock-names = "dmc_clk";
 		bootph-all;
-		compatible = "rockchip,rk3399-pmusgrf", "syscon";
-		reg = <0x0 0xff330000 0x0 0xe3d4>;
 	};
-
 };
 
 #if defined(CONFIG_ROCKCHIP_SPI_IMAGE) && defined(CONFIG_HAS_ROM)
@@ -108,21 +107,19 @@
 	bootph-all;
 };
 
-&pmugrf {
-	bootph-all;
-};
-
-&pmu {
+&pmucru {
 	bootph-all;
 };
 
-&pmucru {
+&pmugrf {
 	bootph-all;
 };
 
 &sdhci {
-	max-frequency = <200000000>;
 	bootph-all;
+	max-frequency = <200000000>;
+
+	/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
 	u-boot,spl-fifo-mode;
 };
 
Signature · 1 line
2.43.2
Reviewed-by on v2 13/18
#24 lore raw

Re: [PATCH v2 13/18] rockchip: rk3399: Sort nodes in u-boot.dtsi files

Quoted 4 lines · Jonas Karlman

Sort nodes alphabetically by name, symbol or reg addr in RK3399 related u-boot.dtsi files. Also remove one of the duplicated &pmu nodes.

Thanks,
- Kever

Quoted 168 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
  arch/arm/dts/rk3399-evb-u-boot.dtsi    | 24 ++++++++---------
  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 ++++-----
  arch/arm/dts/rk3399-u-boot.dtsi        | 37 ++++++++++++--------------
  3 files changed, 35 insertions(+), 38 deletions(-)
arch/arm/dts/rk3399-evb-u-boot.dtsi +12 -12
index 9df4a02c3e74..6dedfeec0722 100644
@@ -20,6 +20,18 @@
  	bootph-all;
  };
 
+&sdmmc {
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+	disable-wp;
+	max-frequency = <150000000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+	status = "okay";
+};
+
  &tcphy1 {
  	status = "okay";
  };
@@ -36,15 +48,3 @@
  &vdd_center {
  	regulator-init-microvolt = <900000>;
  };
-
-&sdmmc {
-	bus-width = <4>;
-	cap-mmc-highspeed;
-	cap-sd-highspeed;
-	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
-	disable-wp;
-	max-frequency = <150000000>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
-	status = "okay";
-};
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +6 -6
index e390cf3abab5..58a3c0afcddd 100644
@@ -38,12 +38,11 @@
  	};
  };
 
-&vdd_log {
-	regulator-min-microvolt = <430000>;
-	regulator-init-microvolt = <950000>;
+&vcc5v0_host {
+	regulator-always-on;
  };
 
-&vcc5v0_host {
+&vcc_sdio {
  	regulator-always-on;
  };
 
@@ -51,6 +50,7 @@
  	regulator-always-on;
  };
 
-&vcc_sdio {
-	regulator-always-on;
+&vdd_log {
+	regulator-min-microvolt = <430000>;
+	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-u-boot.dtsi +17 -20
index 96523a138ae3..b9b8d3ee1d92 100644
@@ -18,19 +18,25 @@
  		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
  	};
 
-	cic: syscon@ff620000 {
+	pmusgrf: syscon@ff330000 {
+		compatible = "rockchip,rk3399-pmusgrf", "syscon";
+		reg = <0x0 0xff330000 0x0 0xe3d4>;
  		bootph-all;
+	};
+
+	cic: syscon@ff620000 {
  		compatible = "rockchip,rk3399-cic", "syscon";
  		reg = <0x0 0xff620000 0x0 0x100>;
+		bootph-all;
  	};
 
  	dfi: dfi@ff630000 {
-		bootph-all;
  		reg = <0x00 0xff630000 0x00 0x4000>;
  		compatible = "rockchip,rk3399-dfi";
  		rockchip,pmu = <&pmugrf>;
  		clocks = <&cru PCLK_DDR_MON>;
  		clock-names = "pclk_ddr_mon";
+		bootph-all;
  	};
 
  	rng: rng@ff8b8000 {
@@ -39,12 +45,7 @@
  	};
 
  	dmc: dmc {
-		bootph-all;
  		compatible = "rockchip,rk3399-dmc";
-		devfreq-events = <&dfi>;
-		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
-		clocks = <&cru SCLK_DDRCLK>;
-		clock-names = "dmc_clk";
  		reg = <0x0 0xffa80000 0x0 0x0800
  		       0x0 0xffa80800 0x0 0x1800
  		       0x0 0xffa82000 0x0 0x2000
@@ -53,14 +54,12 @@
  		       0x0 0xffa88800 0x0 0x1800
  		       0x0 0xffa8a000 0x0 0x2000
  		       0x0 0xffa8c000 0x0 0x1000>;
-	};
-
-	pmusgrf: syscon@ff330000 {
+		devfreq-events = <&dfi>;
+		interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_DDRCLK>;
+		clock-names = "dmc_clk";
  		bootph-all;
-		compatible = "rockchip,rk3399-pmusgrf", "syscon";
-		reg = <0x0 0xff330000 0x0 0xe3d4>;
  	};
-
  };
 
  #if defined(CONFIG_ROCKCHIP_SPI_IMAGE) && defined(CONFIG_HAS_ROM)
@@ -108,21 +107,19 @@
  	bootph-all;
  };
 
-&pmugrf {
-	bootph-all;
-};
-
-&pmu {
+&pmucru {
  	bootph-all;
  };
 
-&pmucru {
+&pmugrf {
  	bootph-all;
  };
 
  &sdhci {
-	max-frequency = <200000000>;
  	bootph-all;
+	max-frequency = <200000000>;
+
+	/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
  	u-boot,spl-fifo-mode;
  };
 
#25 lore raw

PATCH v2 14/18 rockchip: rk3399: Fix bootph prop for vop nodes

In reply to Jonas Karlman

The vop nodes should not be included in TPL/SPL control FDT, it should only be included at U-Boot proper pre-reloc phase.

Change to use bootph-some-ram prop to fix this.

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
 arch/arm/dts/rk3399-u-boot.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/rk3399-u-boot.dtsi +2 -2
index b9b8d3ee1d92..496f25d9fbf6 100644
@@ -143,9 +143,9 @@
 };
 
 &vopb {
-	bootph-all;
+	bootph-some-ram;
 };
 
 &vopl {
-	bootph-all;
+	bootph-some-ram;
 };
Signature · 1 line
2.43.2
Reviewed-by on v2 14/18
#26 lore raw

Re: [PATCH v2 14/18] rockchip: rk3399: Fix bootph prop for vop nodes

Quoted 6 lines · Jonas Karlman

The vop nodes should not be included in TPL/SPL control FDT, it should only be included at U-Boot proper pre-reloc phase.

Change to use bootph-some-ram prop to fix this.

Thanks,
- Kever

Quoted 22 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
  arch/arm/dts/rk3399-u-boot.dtsi | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/rk3399-u-boot.dtsi +2 -2
index b9b8d3ee1d92..496f25d9fbf6 100644
@@ -143,9 +143,9 @@
  };
 
  &vopb {
-	bootph-all;
+	bootph-some-ram;
  };
 
  &vopl {
-	bootph-all;
+	bootph-some-ram;
  };
#27 lore raw

PATCH v2 15/18 rockchip: rk3399-puma: Move uart0 bootph to board u-boot.dtsi

In reply to Jonas Karlman

rk3399-puma is the only supported board that use uart0 for serial console, other RK3399 boards typically use uart2 for serial console and may use uart0 for bluetooth.

Move setting bootph prop to board u-boot.dtsi to only include the uart0 node in TPL/SPL control FDT for the rk3399-puma target.

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
 arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 4 ++++
 arch/arm/dts/rk3399-u-boot.dtsi             | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +4 -0
index 2b3ea6da88db..390cf24152a6 100644
@@ -110,3 +110,7 @@
 &sdmmc_cmd {
 	bootph-all;
 };
+
+&uart0 {
+	bootph-all;
+};
arch/arm/dts/rk3399-u-boot.dtsi +0 -4
index 496f25d9fbf6..9815dc53e8ed 100644
@@ -134,10 +134,6 @@
 	bootph-all;
 };
 
-&uart0 {
-	bootph-all;
-};
-
 &uart2 {
 	bootph-all;
 };
Signature · 1 line
2.43.2
Reviewed-by on v2 15/18
#28 lore raw

Re: [PATCH v2 15/18] rockchip: rk3399-puma: Move uart0 bootph to board u-boot.dtsi

Quoted 8 lines · Jonas Karlman

rk3399-puma is the only supported board that use uart0 for serial console, other RK3399 boards typically use uart2 for serial console and may use uart0 for bluetooth.

Move setting bootph prop to board u-boot.dtsi to only include the uart0 node in TPL/SPL control FDT for the rk3399-puma target.

Thanks,
- Kever

Quoted 34 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
  arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 4 ++++
  arch/arm/dts/rk3399-u-boot.dtsi             | 4 ----
  2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +4 -0
index 2b3ea6da88db..390cf24152a6 100644
@@ -110,3 +110,7 @@
  &sdmmc_cmd {
  	bootph-all;
  };
+
+&uart0 {
+	bootph-all;
+};
arch/arm/dts/rk3399-u-boot.dtsi +0 -4
index 496f25d9fbf6..9815dc53e8ed 100644
@@ -134,10 +134,6 @@
  	bootph-all;
  };
 
-&uart0 {
-	bootph-all;
-};
-
  &uart2 {
  	bootph-all;
  };
#29 lore raw

PATCH v2 16/18 rockchip: rk3399: Include uart related pinctrl nodes in TPL/SPL

In reply to Jonas Karlman

The initial serial console UART iomux is typically configured in board_debug_uart_init() at TPL stage on Rockchip platform.

Later stages typically use pinctrl driver to configure iomux UART once again based on the control FDT.

Include uart related pinctrl nodes in TPL/SPL control FDT to make it possible for pinctrl driver to configure UART iomux at TPL/SPL stage.

Following debug log message may also be seen at U-Boot pre-reloc stage:

ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

This can be resolved by including bootph prop for U-Bood pre-reloc phase (bootph-some-ram or bootph-all). However, this has intentionally been excluded due to including it unnecessarily slows down boot around 200-400 ms.

Also add the clock-frequency prop similar to what has been done for other Rockchip SoCs.

---
v2: New patch split from "Fix loading FIT from SD-card" patch
v2: Change to only include pinctrl nodes in TPL and SPL phase

Hopefully the clock-frequency prop can be used to help speed up boot in a future patch series, loading the uart rate from clock driver currently delays boot at i.e. U-Boot proper pre-reloc.

---
 arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 16 ++++++++++++++++
 arch/arm/dts/rk3399-u-boot.dtsi             |  6 ++++++
 2 files changed, 22 insertions(+)
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +16 -0
index 390cf24152a6..d1912a2ef6a9 100644
@@ -113,4 +113,20 @@
 
 &uart0 {
 	bootph-all;
+	clock-frequency = <24000000>;
+};
+
+&uart0_cts {
+	bootph-pre-sram;
+	bootph-pre-ram;
+};
+
+&uart0_rts {
+	bootph-pre-sram;
+	bootph-pre-ram;
+};
+
+&uart0_xfer {
+	bootph-pre-sram;
+	bootph-pre-ram;
 };
arch/arm/dts/rk3399-u-boot.dtsi +6 -0
index 9815dc53e8ed..b39fe39fa2b3 100644
@@ -136,6 +136,12 @@
 
 &uart2 {
 	bootph-all;
+	clock-frequency = <24000000>;
+};
+
+&uart2c_xfer {
+	bootph-pre-sram;
+	bootph-pre-ram;
 };
 
 &vopb {
Signature · 1 line
2.43.2
Reviewed-by on v2 16/18
#30 lore raw

Re: [PATCH v2 16/18] rockchip: rk3399: Include uart related pinctrl nodes in TPL/SPL

Quoted 18 lines · Jonas Karlman

The initial serial console UART iomux is typically configured in board_debug_uart_init() at TPL stage on Rockchip platform.

Later stages typically use pinctrl driver to configure iomux UART once again based on the control FDT.

Include uart related pinctrl nodes in TPL/SPL control FDT to make it possible for pinctrl driver to configure UART iomux at TPL/SPL stage.

Following debug log message may also be seen at U-Boot pre-reloc stage:

   ns16550_serial serial@ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

This can be resolved by including bootph prop for U-Bood pre-reloc phase (bootph-some-ram or bootph-all). However, this has intentionally been excluded due to including it unnecessarily slows down boot around 200-400 ms.

Quoted 4 lines

Also add the clock-frequency prop similar to what has been done for other Rockchip SoCs.

Thanks,
- Kever

Quoted 54 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch
v2: Change to only include pinctrl nodes in TPL and SPL phase

Hopefully the clock-frequency prop can be used to help speed up boot in a future patch series, loading the uart rate from clock driver currently delays boot at i.e. U-Boot proper pre-reloc.

---
  arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 16 ++++++++++++++++
  arch/arm/dts/rk3399-u-boot.dtsi             |  6 ++++++
  2 files changed, 22 insertions(+)
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +16 -0
index 390cf24152a6..d1912a2ef6a9 100644
@@ -113,4 +113,20 @@
 
  &uart0 {
  	bootph-all;
+	clock-frequency = <24000000>;
+};
+
+&uart0_cts {
+	bootph-pre-sram;
+	bootph-pre-ram;
+};
+
+&uart0_rts {
+	bootph-pre-sram;
+	bootph-pre-ram;
+};
+
+&uart0_xfer {
+	bootph-pre-sram;
+	bootph-pre-ram;
  };
arch/arm/dts/rk3399-u-boot.dtsi +6 -0
index 9815dc53e8ed..b39fe39fa2b3 100644
@@ -136,6 +136,12 @@
 
  &uart2 {
  	bootph-all;
+	clock-frequency = <24000000>;
+};
+
+&uart2c_xfer {
+	bootph-pre-sram;
+	bootph-pre-ram;
  };
 
  &vopb {
#31 lore raw

PATCH v2 17/18 rockchip: rk3399: Fix loading FIT from SD-card when booting from eMMC

In reply to Jonas Karlman

When RK3399 boards run SPL from eMMC and fail to load FIT from eMMC due to it being missing or checksum validation fails there can be a fallback to read FIT from SD-card. However, without proper pinctrl configuration reading FIT from SD-card may fail:

U-Boot SPL 2024.04-rc4 (Mar 17 2024 - 22:54:45 +0000) Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC1
Card did not respond to voltage select! : -110
mmc_init: -95, time 12
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices (err=-6) ### ERROR ### Please RESET the board ###

Fix this by tagging related sdhci, sdmmc and spi flash pinctrl nodes with bootph props. Also move bootph for common nodes shared by all boards to the SoC u-boot.dtsi.

eMMC, SD-Card and SPI flash nodes are also changed to only be tagged with bootph props for SPL and U-Boot pre-reloc phases.

---
v2: Split patch, only keep sdhci, sdmmc and spi1 bootph/pinctrl changes
in this patch
v2: Also include sdhci, sdmmc and spi1 nodes at pre-reloc phase
v2: Update commit message

---
 arch/arm/dts/rk3399-ficus-u-boot.dtsi        | 10 ++++
 arch/arm/dts/rk3399-gru-u-boot.dtsi          | 24 +++++++++
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi |  3 +-
 arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi  | 23 +-------
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi       |  5 +-
 arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi | 10 ++++
 arch/arm/dts/rk3399-rock960-u-boot.dtsi      | 10 ++++
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi    |  7 ++-
 arch/arm/dts/rk3399-u-boot.dtsi              | 57 ++++++++++++++++++--
 configs/eaidk-610-rk3399_defconfig           |  2 +-
 configs/evb-rk3399_defconfig                 |  2 +-
 configs/ficus-rk3399_defconfig               |  2 +-
 configs/firefly-rk3399_defconfig             |  2 +-
 configs/khadas-edge-captain-rk3399_defconfig |  2 +-
 configs/khadas-edge-rk3399_defconfig         |  2 +-
 configs/khadas-edge-v-rk3399_defconfig       |  2 +-
 configs/leez-rk3399_defconfig                |  2 +-
 configs/nanopc-t4-rk3399_defconfig           |  2 +-
 configs/nanopi-m4-2gb-rk3399_defconfig       |  2 +-
 configs/nanopi-m4-rk3399_defconfig           |  2 +-
 configs/nanopi-m4b-rk3399_defconfig          |  2 +-
 configs/nanopi-neo4-rk3399_defconfig         |  2 +-
 configs/nanopi-r4s-rk3399_defconfig          |  2 +-
 configs/orangepi-rk3399_defconfig            |  2 +-
 configs/pinebook-pro-rk3399_defconfig        |  2 +-
 configs/pinephone-pro-rk3399_defconfig       |  2 +-
 configs/roc-pc-mezzanine-rk3399_defconfig    |  2 +-
 configs/roc-pc-rk3399_defconfig              |  2 +-
 configs/rock-4c-plus-rk3399_defconfig        |  2 +-
 configs/rock-4se-rk3399_defconfig            |  2 +-
 configs/rock-pi-4-rk3399_defconfig           |  2 +-
 configs/rock-pi-4c-rk3399_defconfig          |  2 +-
 configs/rock-pi-n10-rk3399pro_defconfig      |  2 +-
 configs/rock960-rk3399_defconfig             |  2 +-
 configs/rockpro64-rk3399_defconfig           |  2 +-
 35 files changed, 142 insertions(+), 59 deletions(-)
arch/arm/dts/rk3399-ficus-u-boot.dtsi +10 -0
index 67b63a835238..ac924d6dc592 100644
@@ -5,3 +5,13 @@
 
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-gru-u-boot.dtsi +24 -0
index b1604a6872c0..0cc40eb6d6f6 100644
@@ -54,6 +54,30 @@
 	enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 };
 
+&sdhci {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_bus4 {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cd {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_clk {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cmd {
+	/delete-property/ bootph-pre-ram;
+};
+
 &spi5 {
 	spi-activate-delay = <100>;
 	spi-max-frequency = <3000000>;
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +2 -1
index 56fdaf440aea..17af95a114fc 100644
@@ -19,7 +19,8 @@
 };
 
 &spiflash {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
 };
 
 &vdd_log {
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +2 -21
index d1912a2ef6a9..1930e5e10353 100644
@@ -88,27 +88,8 @@
 };
 
 &norflash {
-	bootph-all;
-};
-
-&pcfg_pull_none {
-	bootph-all;
-};
-
-&pcfg_pull_up {
-	bootph-all;
-};
-
-&sdmmc_bus4 {
-	bootph-all;
-};
-
-&sdmmc_clk {
-	bootph-all;
-};
-
-&sdmmc_cmd {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
 };
 
 &uart0 {
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +3 -2
index 58a3c0afcddd..d40daacc7823 100644
@@ -33,8 +33,9 @@
 };
 
 &spi1 {
-	spi_flash: flash@0 {
-		bootph-all;
+	flash@0 {
+		bootph-pre-ram;
+		bootph-some-ram;
 	};
 };
 
arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi +10 -0
index 5c1c451b8f85..44dab14dc211 100644
@@ -3,3 +3,13 @@
  * Copyright (c) 2023 Radxa Limited
  */
 #include "rk3399-rock-pi-4-u-boot.dtsi"
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-rock960-u-boot.dtsi +10 -0
index 55716ba4df73..ef08d8987cee 100644
@@ -19,3 +19,13 @@
 		vin-supply = <&vcc5v0_sys>;
 	};
 };
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +3 -4
index b15e5392c3cf..e280739057df 100644
@@ -26,8 +26,6 @@
                         };
                 };
         };
-
-
 };
 
 &sdhci {
@@ -36,8 +34,9 @@
 };
 
 &spi1 {
-	spi_flash: flash@0 {
-		bootph-all;
+	flash@0 {
+		bootph-pre-ram;
+		bootph-some-ram;
 	};
 };
 
arch/arm/dts/rk3399-u-boot.dtsi +52 -5

86 lines not on this page · raw message

configs/eaidk-610-rk3399_defconfig +1 -1
index 4d8b495ccfec..eba6f90c605b 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/evb-rk3399_defconfig +1 -1
index c4936768ffb6..afb79987464f 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
configs/ficus-rk3399_defconfig +1 -1
index 3bcd0fd66b91..f4e3ebba8f46 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
configs/firefly-rk3399_defconfig +1 -1
index 8f68ffbd3a49..db98926b627a 100644
@@ -29,7 +29,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/khadas-edge-captain-rk3399_defconfig +1 -1
index 310250ed4a52..230b9d796442 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
configs/khadas-edge-rk3399_defconfig +1 -1
index 3fe5542d1256..9f13cbf58398 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/khadas-edge-v-rk3399_defconfig +1 -1
index 4b41454d710d..abc4f2054cfd 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
configs/leez-rk3399_defconfig +1 -1
index 2831cfb36689..13453e523444 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopc-t4-rk3399_defconfig +1 -1
index cdfacb66e678..f935716ccf47 100644
@@ -28,7 +28,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4-2gb-rk3399_defconfig +1 -1
index 51596f57ae35..d142b702ce89 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4-rk3399_defconfig +1 -1
index 2af84fb6ff17..8ce879da4c07 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4b-rk3399_defconfig +1 -1
index 1b76f98e0df7..33ef74a1f690 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-neo4-rk3399_defconfig +1 -1
index c176c5a12111..45a7d0a3257d 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-r4s-rk3399_defconfig +1 -1
index ea01d323541b..a666547fe597 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/orangepi-rk3399_defconfig +1 -1
index c6a92b2decf3..337eeab8b42b 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/pinebook-pro-rk3399_defconfig +1 -1
index e4aad1b710cb..a250624dfaa9 100644
@@ -41,7 +41,7 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/pinephone-pro-rk3399_defconfig +1 -1
index 285c47d76b6e..dcdac6b32d6d 100644
@@ -40,7 +40,7 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/roc-pc-mezzanine-rk3399_defconfig +1 -1
index 1ff4e15c8c10..f281df6c1b12 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/roc-pc-rk3399_defconfig +1 -1
index 5d6e6b17091f..0d4a03db9e65 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/rock-4c-plus-rk3399_defconfig +1 -1
index 6c69e8bdcb92..2024defb2bf0 100644
@@ -34,7 +34,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DFU_MMC=y
configs/rock-4se-rk3399_defconfig +1 -1
index e5ed81022bd6..9b2303fdf792 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DFU_MMC=y
configs/rock-pi-4-rk3399_defconfig +1 -1
index 2801becedb4b..6cf445dd6338 100644
@@ -40,7 +40,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
configs/rock-pi-4c-rk3399_defconfig +1 -1
index 72d37bff9e9a..4a9d1c531c10 100644
@@ -34,7 +34,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_EFIDEBUG=y
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DFU_MMC=y
configs/rock-pi-n10-rk3399pro_defconfig +1 -1
index 6889cdcbf7d8..234d0c9ab0f5 100644
@@ -31,7 +31,7 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ROCKCHIP_GPIO=y
configs/rock960-rk3399_defconfig +1 -1
index 7a4a3df85b1b..3b5ab7dc5781 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
configs/rockpro64-rk3399_defconfig +1 -1
index 368ef7c4b5db..6c829089fd91 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
Signature · 1 line
2.43.2
Reviewed-by on v2 17/18
#32 lore raw
Quoted 17 lines · Jonas Karlman

When RK3399 boards run SPL from eMMC and fail to load FIT from eMMC due to it being missing or checksum validation fails there can be a fallback to read FIT from SD-card. However, without proper pinctrl configuration reading FIT from SD-card may fail:

U-Boot SPL 2024.04-rc4 (Mar 17 2024 - 22:54:45 +0000) Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error Trying to boot from MMC1
Card did not respond to voltage select! : -110
mmc_init: -95, time 12
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices (err=-6) ### ERROR ### Please RESET the board ###

Quoted 8 lines

Fix this by tagging related sdhci, sdmmc and spi flash pinctrl nodes with bootph props. Also move bootph for common nodes shared by all boards to the SoC u-boot.dtsi.

eMMC, SD-Card and SPI flash nodes are also changed to only be tagged with bootph props for SPL and U-Boot pre-reloc phases.

Thanks,
- Kever

Quoted 652 lines

---
v2: Split patch, only keep sdhci, sdmmc and spi1 bootph/pinctrl changes
in this patch
v2: Also include sdhci, sdmmc and spi1 nodes at pre-reloc phase
v2: Update commit message

---
  arch/arm/dts/rk3399-ficus-u-boot.dtsi        | 10 ++++
  arch/arm/dts/rk3399-gru-u-boot.dtsi          | 24 +++++++++
  arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi |  3 +-
  arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi  | 23 +-------
  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi       |  5 +-
  arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi | 10 ++++
  arch/arm/dts/rk3399-rock960-u-boot.dtsi      | 10 ++++
  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi    |  7 ++-
  arch/arm/dts/rk3399-u-boot.dtsi              | 57 ++++++++++++++++++--
  configs/eaidk-610-rk3399_defconfig           |  2 +-
  configs/evb-rk3399_defconfig                 |  2 +-
  configs/ficus-rk3399_defconfig               |  2 +-
  configs/firefly-rk3399_defconfig             |  2 +-
  configs/khadas-edge-captain-rk3399_defconfig |  2 +-
  configs/khadas-edge-rk3399_defconfig         |  2 +-
  configs/khadas-edge-v-rk3399_defconfig       |  2 +-
  configs/leez-rk3399_defconfig                |  2 +-
  configs/nanopc-t4-rk3399_defconfig           |  2 +-
  configs/nanopi-m4-2gb-rk3399_defconfig       |  2 +-
  configs/nanopi-m4-rk3399_defconfig           |  2 +-
  configs/nanopi-m4b-rk3399_defconfig          |  2 +-
  configs/nanopi-neo4-rk3399_defconfig         |  2 +-
  configs/nanopi-r4s-rk3399_defconfig          |  2 +-
  configs/orangepi-rk3399_defconfig            |  2 +-
  configs/pinebook-pro-rk3399_defconfig        |  2 +-
  configs/pinephone-pro-rk3399_defconfig       |  2 +-
  configs/roc-pc-mezzanine-rk3399_defconfig    |  2 +-
  configs/roc-pc-rk3399_defconfig              |  2 +-
  configs/rock-4c-plus-rk3399_defconfig        |  2 +-
  configs/rock-4se-rk3399_defconfig            |  2 +-
  configs/rock-pi-4-rk3399_defconfig           |  2 +-
  configs/rock-pi-4c-rk3399_defconfig          |  2 +-
  configs/rock-pi-n10-rk3399pro_defconfig      |  2 +-
  configs/rock960-rk3399_defconfig             |  2 +-
  configs/rockpro64-rk3399_defconfig           |  2 +-
  35 files changed, 142 insertions(+), 59 deletions(-)
arch/arm/dts/rk3399-ficus-u-boot.dtsi +10 -0
index 67b63a835238..ac924d6dc592 100644
@@ -5,3 +5,13 @@
 
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-ddr3-1600.dtsi"
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-gru-u-boot.dtsi +24 -0
index b1604a6872c0..0cc40eb6d6f6 100644
@@ -54,6 +54,30 @@
  	enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
  };
 
+&sdhci {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_bus4 {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cd {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_clk {
+	/delete-property/ bootph-pre-ram;
+};
+
+&sdmmc_cmd {
+	/delete-property/ bootph-pre-ram;
+};
+
  &spi5 {
  	spi-activate-delay = <100>;
  	spi-max-frequency = <3000000>;
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +2 -1
index 56fdaf440aea..17af95a114fc 100644
@@ -19,7 +19,8 @@
  };
 
  &spiflash {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
  };
 
  &vdd_log {
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi +2 -21
index d1912a2ef6a9..1930e5e10353 100644
@@ -88,27 +88,8 @@
  };
 
  &norflash {
-	bootph-all;
-};
-
-&pcfg_pull_none {
-	bootph-all;
-};
-
-&pcfg_pull_up {
-	bootph-all;
-};
-
-&sdmmc_bus4 {
-	bootph-all;
-};
-
-&sdmmc_clk {
-	bootph-all;
-};
-
-&sdmmc_cmd {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
  };
 
  &uart0 {
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +3 -2
index 58a3c0afcddd..d40daacc7823 100644
@@ -33,8 +33,9 @@
  };
 
  &spi1 {
-	spi_flash: flash@0 {
-		bootph-all;
+	flash@0 {
+		bootph-pre-ram;
+		bootph-some-ram;
  	};
  };
 
arch/arm/dts/rk3399-rock-4c-plus-u-boot.dtsi +10 -0
index 5c1c451b8f85..44dab14dc211 100644
@@ -3,3 +3,13 @@
   * Copyright (c) 2023 Radxa Limited
   */
  #include "rk3399-rock-pi-4-u-boot.dtsi"
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-rock960-u-boot.dtsi +10 -0
index 55716ba4df73..ef08d8987cee 100644
@@ -19,3 +19,13 @@
  		vin-supply = <&vcc5v0_sys>;
  	};
  };
+
+&pcfg_pull_none_18ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pcfg_pull_up_8ma {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +3 -4
index b15e5392c3cf..e280739057df 100644
@@ -26,8 +26,6 @@
                          };
                  };
          };
-
-
  };
 
  &sdhci {
@@ -36,8 +34,9 @@
  };
 
  &spi1 {
-	spi_flash: flash@0 {
-		bootph-all;
+	flash@0 {
+		bootph-pre-ram;
+		bootph-some-ram;
  	};
  };
 
arch/arm/dts/rk3399-u-boot.dtsi +52 -5
index b39fe39fa2b3..4298552dd999 100644
@@ -92,13 +92,22 @@
  };
 
  &emmc_phy {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
  };
 
  &grf {
  	bootph-all;
  };
 
+&pcfg_pull_none {
+	bootph-all;
+};
+
+&pcfg_pull_up {
+	bootph-all;
+};
+
  &pinctrl {
  	bootph-all;
  };
@@ -116,7 +125,8 @@
  };
 
  &sdhci {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
  	max-frequency = <200000000>;
 
  	/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
@@ -124,14 +134,51 @@
  };
 
  &sdmmc {
-	bootph-all;
+	bootph-pre-ram;
+	bootph-some-ram;
 
  	/* mmc to sram can't do dma, prevent aborts transferring TF-A parts */
  	u-boot,spl-fifo-mode;
  };
 
-&spi1 {
-	bootph-all;
+&sdmmc_bus4 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&sdmmc_cd {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&sdmmc_clk {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&sdmmc_cmd {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&spi1_clk {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&spi1_cs0 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&spi1_rx {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&spi1_tx {
+	bootph-pre-ram;
+	bootph-some-ram;
  };
 
  &uart2 {
configs/eaidk-610-rk3399_defconfig +1 -1
index 4d8b495ccfec..eba6f90c605b 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/evb-rk3399_defconfig +1 -1
index c4936768ffb6..afb79987464f 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_NET_RANDOM_ETHADDR=y
configs/ficus-rk3399_defconfig +1 -1
index 3bcd0fd66b91..f4e3ebba8f46 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SYS_MMC_ENV_DEV=1
configs/firefly-rk3399_defconfig +1 -1
index 8f68ffbd3a49..db98926b627a 100644
@@ -29,7 +29,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/khadas-edge-captain-rk3399_defconfig +1 -1
index 310250ed4a52..230b9d796442 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_NET_RANDOM_ETHADDR=y
configs/khadas-edge-rk3399_defconfig +1 -1
index 3fe5542d1256..9f13cbf58398 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/khadas-edge-v-rk3399_defconfig +1 -1
index 4b41454d710d..abc4f2054cfd 100644
@@ -27,7 +27,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_NET_RANDOM_ETHADDR=y
configs/leez-rk3399_defconfig +1 -1
index 2831cfb36689..13453e523444 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopc-t4-rk3399_defconfig +1 -1
index cdfacb66e678..f935716ccf47 100644
@@ -28,7 +28,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4-2gb-rk3399_defconfig +1 -1
index 51596f57ae35..d142b702ce89 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4-rk3399_defconfig +1 -1
index 2af84fb6ff17..8ce879da4c07 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-m4b-rk3399_defconfig +1 -1
index 1b76f98e0df7..33ef74a1f690 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-neo4-rk3399_defconfig +1 -1
index c176c5a12111..45a7d0a3257d 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/nanopi-r4s-rk3399_defconfig +1 -1
index ea01d323541b..a666547fe597 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/orangepi-rk3399_defconfig +1 -1
index c6a92b2decf3..337eeab8b42b 100644
@@ -25,7 +25,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/pinebook-pro-rk3399_defconfig +1 -1
index e4aad1b710cb..a250624dfaa9 100644
@@ -41,7 +41,7 @@ CONFIG_CMD_TIME=y
  CONFIG_CMD_PMIC=y
  CONFIG_CMD_REGULATOR=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
configs/pinephone-pro-rk3399_defconfig +1 -1
index 285c47d76b6e..dcdac6b32d6d 100644
@@ -40,7 +40,7 @@ CONFIG_CMD_TIME=y
  CONFIG_CMD_PMIC=y
  CONFIG_CMD_REGULATOR=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
configs/roc-pc-mezzanine-rk3399_defconfig +1 -1
index 1ff4e15c8c10..f281df6c1b12 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
configs/roc-pc-rk3399_defconfig +1 -1
index 5d6e6b17091f..0d4a03db9e65 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
configs/rock-4c-plus-rk3399_defconfig +1 -1
index 6c69e8bdcb92..2024defb2bf0 100644
@@ -34,7 +34,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
  CONFIG_CMD_EFIDEBUG=y
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_DFU_MMC=y
configs/rock-4se-rk3399_defconfig +1 -1
index e5ed81022bd6..9b2303fdf792 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
  CONFIG_CMD_EFIDEBUG=y
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_DFU_MMC=y
configs/rock-pi-4-rk3399_defconfig +1 -1
index 2801becedb4b..6cf445dd6338 100644
@@ -40,7 +40,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
  CONFIG_CMD_EFIDEBUG=y
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
configs/rock-pi-4c-rk3399_defconfig +1 -1
index 72d37bff9e9a..4a9d1c531c10 100644
@@ -34,7 +34,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
  CONFIG_CMD_EFIDEBUG=y
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_DFU_MMC=y
configs/rock-pi-n10-rk3399pro_defconfig +1 -1
index 6889cdcbf7d8..234d0c9ab0f5 100644
@@ -31,7 +31,7 @@ CONFIG_CMD_USB=y
  # CONFIG_CMD_SETEXPR is not set
  CONFIG_CMD_TIME=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_ROCKCHIP_GPIO=y
configs/rock960-rk3399_defconfig +1 -1
index 7a4a3df85b1b..3b5ab7dc5781 100644
@@ -33,7 +33,7 @@ CONFIG_CMD_TIME=y
  CONFIG_CMD_PMIC=y
  CONFIG_CMD_REGULATOR=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SYS_MMC_ENV_DEV=1
configs/rockpro64-rk3399_defconfig +1 -1
index 368ef7c4b5db..6c829089fd91 100644
@@ -38,7 +38,7 @@ CONFIG_CMD_USB=y
  CONFIG_CMD_TIME=y
  CONFIG_CMD_BOOTSTAGE=y
  CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SPL_DM_SEQ_ALIAS=y
#33 lore raw

PATCH v2 18/18 rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL

In reply to Jonas Karlman

A few boards have shown to be required to properly configure pinctrl for the fixed regulator gpio pin used by sdmmc before being able to read from SD-cards.

Include the related gpio, regulator and pinctrl nodes and enable related Kconfig options so that pinctrl can be configured in SPL for boards that may be affected by such issue.

Also change to imply SPL_DM_SEQ_ALIAS for all boards because it must be enabled for working gpio usage in SPL after a future DT sync.

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi      | 12 ++++++++++++
 arch/arm/dts/rk3399-orangepi-u-boot.dtsi     | 12 ++++++++++++
 arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 12 ++++++++++++
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi       | 12 ++++++++++++
 arch/arm/dts/rk3399-rockpro64-u-boot.dtsi    | 12 ++++++++++++
 arch/arm/mach-rockchip/Kconfig               |  1 +
 configs/chromebook_bob_defconfig             |  1 -
 configs/chromebook_kevin_defconfig           |  1 -
 configs/nanopc-t4-rk3399_defconfig           |  2 ++
 configs/nanopi-m4-2gb-rk3399_defconfig       |  2 ++
 configs/nanopi-m4-rk3399_defconfig           |  2 ++
 configs/nanopi-m4b-rk3399_defconfig          |  2 ++
 configs/nanopi-neo4-rk3399_defconfig         |  2 ++
 configs/nanopi-r4s-rk3399_defconfig          |  2 ++
 configs/orangepi-rk3399_defconfig            |  2 ++
 configs/pinebook-pro-rk3399_defconfig        |  3 ++-
 configs/pinephone-pro-rk3399_defconfig       |  1 -
 configs/puma-rk3399_defconfig                |  1 -
 configs/roc-pc-mezzanine-rk3399_defconfig    |  2 +-
 configs/roc-pc-rk3399_defconfig              |  2 +-
 configs/rock-pi-4-rk3399_defconfig           |  1 -
 configs/rockpro64-rk3399_defconfig           |  3 ++-
 22 files changed, 81 insertions(+), 9 deletions(-)
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +12 -0
index a126bbaf086f..e0d7a518dfc2 100644
@@ -5,6 +5,18 @@
 
 #include "rk3399-u-boot.dtsi"
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
 &sdmmc {
 	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
 };
+
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
arch/arm/dts/rk3399-orangepi-u-boot.dtsi +12 -0
index d4327ea607c4..b7452eca2254 100644
@@ -6,6 +6,18 @@
 #include "rk3399-u-boot.dtsi"
 #include "rk3399-sdram-ddr3-1333.dtsi"
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +12 -0
index 17af95a114fc..2341db444ef3 100644
@@ -10,6 +10,10 @@
 	rockchip,panel = <&edp_panel>;
 };
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
 &sdhci {
 	max-frequency = <25000000>;
 };
@@ -18,11 +22,19 @@
 	max-frequency = <20000000>;
 };
 
+&sdmmc0_pwr_h_pin {
+	bootph-pre-ram;
+};
+
 &spiflash {
 	bootph-pre-ram;
 	bootph-some-ram;
 };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
 &vdd_log {
 	regulator-init-microvolt = <950000>;
 };
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +12 -0
index d40daacc7823..aecf7dbe383c 100644
@@ -32,6 +32,10 @@
 	vin-supply = <&vcc_vbus_typec0>;
 };
 
+&gpio4 {
+	bootph-pre-ram;
+};
+
 &spi1 {
 	flash@0 {
 		bootph-pre-ram;
@@ -39,6 +43,14 @@
 	};
 };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd_en {
+	bootph-pre-ram;
+};
+
 &vcc5v0_host {
 	regulator-always-on;
 };
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +12 -0
index e280739057df..43b67991fe5a 100644
@@ -28,11 +28,19 @@
         };
 };
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
 &sdhci {
 	cap-mmc-highspeed;
 	mmc-ddr-1_8v;
 };
 
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
 &spi1 {
 	flash@0 {
 		bootph-pre-ram;
@@ -40,6 +48,10 @@
 	};
 };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
 &vdd_center {
 	regulator-min-microvolt = <950000>;
 	regulator-max-microvolt = <950000>;
arch/arm/mach-rockchip/Kconfig +1 -0
index 7d6374b73586..262cb7cba3ea 100644
@@ -277,6 +277,7 @@ config ROCKCHIP_RK3399
 	imply ROCKCHIP_COMMON_BOARD
 	imply ROCKCHIP_EFUSE
 	imply ROCKCHIP_SDRAM_COMMON
+	imply SPL_DM_SEQ_ALIAS
 	imply SPL_FIT_SIGNATURE
 	imply SPL_ROCKCHIP_COMMON_BOARD
 	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
configs/chromebook_bob_defconfig +0 -1
index 5ffd5195ea19..9e15d9e3b8f6 100644
@@ -61,7 +61,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
configs/chromebook_kevin_defconfig +0 -1
index bacdcc367bda..a79703c0a138 100644
@@ -62,7 +62,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
configs/nanopc-t4-rk3399_defconfig +2 -0
index f935716ccf47..89c36e273a9b 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopc-t4"
@@ -42,6 +43,7 @@ CONFIG_GMAC_ROCKCHIP=y
 CONFIG_NVME_PCI=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/nanopi-m4-2gb-rk3399_defconfig +2 -0
index d142b702ce89..eb1d2c1f51fc 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4-2gb"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/nanopi-m4-rk3399_defconfig +2 -0
index 8ce879da4c07..bc0b90b3d861 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/nanopi-m4b-rk3399_defconfig +2 -0
index 33ef74a1f690..678f4d9d823f 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4b"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/nanopi-neo4-rk3399_defconfig +2 -0
index 45a7d0a3257d..d9b7a90e8402 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-neo4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/nanopi-r4s-rk3399_defconfig +2 -0
index a666547fe597..1fcccf2bae6e 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4s"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
configs/orangepi-rk3399_defconfig +2 -0
index 337eeab8b42b..703732ad15f0 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-orangepi"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_BAUDRATE=1500000
configs/pinebook-pro-rk3399_defconfig +2 -1
index a250624dfaa9..dd8bc2b72cc3 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_SF_DEFAULT_SPEED=20000000
 CONFIG_ENV_SIZE=0x8000
@@ -44,7 +45,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_LED=y
@@ -72,6 +72,7 @@ CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_DM_PMIC_FAN53555=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
configs/pinephone-pro-rk3399_defconfig +0 -1
index dcdac6b32d6d..c36898364b5d 100644
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_LED=y
configs/puma-rk3399_defconfig +0 -1
index 53fc62bf7e35..5edba19e6ce8 100644
@@ -50,7 +50,6 @@ CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_GPIO_HOG=y
 CONFIG_SPL_GPIO_HOG=y
 CONFIG_ROCKCHIP_GPIO=y
configs/roc-pc-mezzanine-rk3399_defconfig +1 -1
index f281df6c1b12..e13356faabbc 100644
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_MMC_DW=y
@@ -57,6 +56,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
configs/roc-pc-rk3399_defconfig +1 -1
index 0d4a03db9e65..dee342898d1f 100644
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_MMC_DW=y
@@ -56,6 +55,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 # CONFIG_RAM_ROCKCHIP_DEBUG is not set
configs/rock-pi-4-rk3399_defconfig +0 -1
index 6cf445dd6338..e5a2bba8e7ff 100644
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DFU_MMC=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
configs/rockpro64-rk3399_defconfig +2 -1
index 6c829089fd91..173f8f75020d 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x8000
 CONFIG_ENV_OFFSET=0x3F8000
@@ -41,7 +42,6 @@ CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SATA=y
 CONFIG_SCSI_AHCI=y
 CONFIG_AHCI_PCI=y
@@ -65,6 +65,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_PMIC_RK8XX=y
 CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
Signature · 1 line
2.43.2
Reviewed-by on v2 18/18
#34 lore raw

Re: [PATCH v2 18/18] rockchip: rk3399: Configure sdmmc regulator pinctrl in SPL

Quoted 4 lines · Jonas Karlman

A few boards have shown to be required to properly configure pinctrl for the fixed regulator gpio pin used by sdmmc before being able to read from SD-cards.

Quoted 8 lines

Include the related gpio, regulator and pinctrl nodes and enable related Kconfig options so that pinctrl can be configured in SPL for boards that may be affected by such issue.

Also change to imply SPL_DM_SEQ_ALIAS for all boards because it must be enabled for working gpio usage in SPL after a future DT sync.

Thanks,
- Kever

Quoted 481 lines

---
v2: New patch split from "Fix loading FIT from SD-card" patch

---
  arch/arm/dts/rk3399-nanopi4-u-boot.dtsi      | 12 ++++++++++++
  arch/arm/dts/rk3399-orangepi-u-boot.dtsi     | 12 ++++++++++++
  arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 12 ++++++++++++
  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi       | 12 ++++++++++++
  arch/arm/dts/rk3399-rockpro64-u-boot.dtsi    | 12 ++++++++++++
  arch/arm/mach-rockchip/Kconfig               |  1 +
  configs/chromebook_bob_defconfig             |  1 -
  configs/chromebook_kevin_defconfig           |  1 -
  configs/nanopc-t4-rk3399_defconfig           |  2 ++
  configs/nanopi-m4-2gb-rk3399_defconfig       |  2 ++
  configs/nanopi-m4-rk3399_defconfig           |  2 ++
  configs/nanopi-m4b-rk3399_defconfig          |  2 ++
  configs/nanopi-neo4-rk3399_defconfig         |  2 ++
  configs/nanopi-r4s-rk3399_defconfig          |  2 ++
  configs/orangepi-rk3399_defconfig            |  2 ++
  configs/pinebook-pro-rk3399_defconfig        |  3 ++-
  configs/pinephone-pro-rk3399_defconfig       |  1 -
  configs/puma-rk3399_defconfig                |  1 -
  configs/roc-pc-mezzanine-rk3399_defconfig    |  2 +-
  configs/roc-pc-rk3399_defconfig              |  2 +-
  configs/rock-pi-4-rk3399_defconfig           |  1 -
  configs/rockpro64-rk3399_defconfig           |  3 ++-
  22 files changed, 81 insertions(+), 9 deletions(-)
arch/arm/dts/rk3399-nanopi4-u-boot.dtsi +12 -0
index a126bbaf086f..e0d7a518dfc2 100644
@@ -5,6 +5,18 @@
 
  #include "rk3399-u-boot.dtsi"
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
  &sdmmc {
  	pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
  };
+
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
arch/arm/dts/rk3399-orangepi-u-boot.dtsi +12 -0
index d4327ea607c4..b7452eca2254 100644
@@ -6,6 +6,18 @@
  #include "rk3399-u-boot.dtsi"
  #include "rk3399-sdram-ddr3-1333.dtsi"
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
  &vdd_log {
  	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi +12 -0
index 17af95a114fc..2341db444ef3 100644
@@ -10,6 +10,10 @@
  	rockchip,panel = <&edp_panel>;
  };
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
  &sdhci {
  	max-frequency = <25000000>;
  };
@@ -18,11 +22,19 @@
  	max-frequency = <20000000>;
  };
 
+&sdmmc0_pwr_h_pin {
+	bootph-pre-ram;
+};
+
  &spiflash {
  	bootph-pre-ram;
  	bootph-some-ram;
  };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
  &vdd_log {
  	regulator-init-microvolt = <950000>;
  };
arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +12 -0
index d40daacc7823..aecf7dbe383c 100644
@@ -32,6 +32,10 @@
  	vin-supply = <&vcc_vbus_typec0>;
  };
 
+&gpio4 {
+	bootph-pre-ram;
+};
+
  &spi1 {
  	flash@0 {
  		bootph-pre-ram;
@@ -39,6 +43,14 @@
  	};
  };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
+&vcc3v0_sd_en {
+	bootph-pre-ram;
+};
+
  &vcc5v0_host {
  	regulator-always-on;
  };
arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +12 -0
index e280739057df..43b67991fe5a 100644
@@ -28,11 +28,19 @@
          };
  };
 
+&gpio0 {
+	bootph-pre-ram;
+};
+
  &sdhci {
  	cap-mmc-highspeed;
  	mmc-ddr-1_8v;
  };
 
+&sdmmc0_pwr_h {
+	bootph-pre-ram;
+};
+
  &spi1 {
  	flash@0 {
  		bootph-pre-ram;
@@ -40,6 +48,10 @@
  	};
  };
 
+&vcc3v0_sd {
+	bootph-pre-ram;
+};
+
  &vdd_center {
  	regulator-min-microvolt = <950000>;
  	regulator-max-microvolt = <950000>;
arch/arm/mach-rockchip/Kconfig +1 -0
index 7d6374b73586..262cb7cba3ea 100644
@@ -277,6 +277,7 @@ config ROCKCHIP_RK3399
  	imply ROCKCHIP_COMMON_BOARD
  	imply ROCKCHIP_EFUSE
  	imply ROCKCHIP_SDRAM_COMMON
+	imply SPL_DM_SEQ_ALIAS
  	imply SPL_FIT_SIGNATURE
  	imply SPL_ROCKCHIP_COMMON_BOARD
  	imply SYS_BOOTCOUNT_SINGLEWORD if BOOTCOUNT_LIMIT
configs/chromebook_bob_defconfig +0 -1
index 5ffd5195ea19..9e15d9e3b8f6 100644
@@ -61,7 +61,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_I2C_CROS_EC_TUNNEL=y
  CONFIG_SYS_I2C_ROCKCHIP=y
configs/chromebook_kevin_defconfig +0 -1
index bacdcc367bda..a79703c0a138 100644
@@ -62,7 +62,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_I2C_CROS_EC_TUNNEL=y
  CONFIG_SYS_I2C_ROCKCHIP=y
configs/nanopc-t4-rk3399_defconfig +2 -0
index f935716ccf47..89c36e273a9b 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopc-t4"
@@ -42,6 +43,7 @@ CONFIG_GMAC_ROCKCHIP=y
  CONFIG_NVME_PCI=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/nanopi-m4-2gb-rk3399_defconfig +2 -0
index d142b702ce89..eb1d2c1f51fc 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4-2gb"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/nanopi-m4-rk3399_defconfig +2 -0
index 8ce879da4c07..bc0b90b3d861 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/nanopi-m4b-rk3399_defconfig +2 -0
index 33ef74a1f690..678f4d9d823f 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-m4b"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/nanopi-neo4-rk3399_defconfig +2 -0
index 45a7d0a3257d..d9b7a90e8402 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-neo4"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/nanopi-r4s-rk3399_defconfig +2 -0
index a666547fe597..1fcccf2bae6e 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4s"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_RAM_ROCKCHIP_LPDDR4=y
configs/orangepi-rk3399_defconfig +2 -0
index 337eeab8b42b..703732ad15f0 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_OFFSET=0x3F8000
  CONFIG_DEFAULT_DEVICE_TREE="rk3399-orangepi"
@@ -38,6 +39,7 @@ CONFIG_ETH_DESIGNWARE=y
  CONFIG_GMAC_ROCKCHIP=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_BAUDRATE=1500000
configs/pinebook-pro-rk3399_defconfig +2 -1
index a250624dfaa9..dd8bc2b72cc3 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_SF_DEFAULT_SPEED=20000000
  CONFIG_ENV_SIZE=0x8000
@@ -44,7 +45,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_SYS_I2C_ROCKCHIP=y
  CONFIG_LED=y
@@ -72,6 +72,7 @@ CONFIG_PHY_ROCKCHIP_TYPEC=y
  CONFIG_DM_PMIC_FAN53555=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_RAM_ROCKCHIP_LPDDR4=y
configs/pinephone-pro-rk3399_defconfig +0 -1
index dcdac6b32d6d..c36898364b5d 100644
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_SYS_I2C_ROCKCHIP=y
  CONFIG_LED=y
configs/puma-rk3399_defconfig +0 -1
index 53fc62bf7e35..5edba19e6ce8 100644
@@ -50,7 +50,6 @@ CONFIG_ENV_SPI_MAX_HZ=50000000
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_SYS_MMC_ENV_DEV=1
  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_GPIO_HOG=y
  CONFIG_SPL_GPIO_HOG=y
  CONFIG_ROCKCHIP_GPIO=y
configs/roc-pc-mezzanine-rk3399_defconfig +1 -1
index f281df6c1b12..e13356faabbc 100644
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_SYS_I2C_ROCKCHIP=y
  CONFIG_MMC_DW=y
@@ -57,6 +56,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
  CONFIG_PHY_ROCKCHIP_TYPEC=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  # CONFIG_RAM_ROCKCHIP_DEBUG is not set
configs/roc-pc-rk3399_defconfig +1 -1
index 0d4a03db9e65..dee342898d1f 100644
@@ -41,7 +41,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_SYS_I2C_ROCKCHIP=y
  CONFIG_MMC_DW=y
@@ -56,6 +55,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
  CONFIG_PHY_ROCKCHIP_TYPEC=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  # CONFIG_RAM_ROCKCHIP_DEBUG is not set
configs/rock-pi-4-rk3399_defconfig +0 -1
index 6cf445dd6338..e5a2bba8e7ff 100644
@@ -43,7 +43,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_DFU_MMC=y
  CONFIG_ROCKCHIP_GPIO=y
  CONFIG_SYS_I2C_ROCKCHIP=y
configs/rockpro64-rk3399_defconfig +2 -1
index 6c829089fd91..173f8f75020d 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_SKIP_LOWLEVEL_INIT=y
  CONFIG_COUNTER_FREQUENCY=24000000
  CONFIG_ARCH_ROCKCHIP=y
+CONFIG_SPL_GPIO=y
  CONFIG_NR_DRAM_BANKS=1
  CONFIG_ENV_SIZE=0x8000
  CONFIG_ENV_OFFSET=0x3F8000
@@ -41,7 +42,6 @@ CONFIG_SPL_OF_CONTROL=y
  CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
  CONFIG_ENV_IS_IN_SPI_FLASH=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
  CONFIG_SATA=y
  CONFIG_SCSI_AHCI=y
  CONFIG_AHCI_PCI=y
@@ -65,6 +65,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y
  CONFIG_PHY_ROCKCHIP_TYPEC=y
  CONFIG_PMIC_RK8XX=y
  CONFIG_REGULATOR_PWM=y
+CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_REGULATOR_RK8XX=y
  CONFIG_PWM_ROCKCHIP=y
  CONFIG_RAM_ROCKCHIP_LPDDR4=y