[PATCH v2 0/5] rockchip: rk3399: rk3399-nanopi-4: Fix SD power initialization in SPL

Justin Klaassen justin at tidylabs.net
Tue Jan 28 22:37:32 CET 2025


The NanoPi RK3399 boards support UHS-I (up to SDR104) SD cards, however
using any of these 1.8v modes results in a boot failure in SPL upon soft
reboot.

The issue is that the "vcc_sdio" regulator is left at 1.8v on reboot and
the corresponding GPIO defaults to 3.3v. This prevents the SD card from
being reinitialized and read successfully.

This change series resolves this issue by allowing the proper
initialization and control of the "vcc3v0_sd" (vmmc-supply) and
"vcc_sdio" (vqmmc-supply) regulators and corresponding GPIO in SPL.

Changes in v2:
- Made added IO-domain driver logs verbose and consistent
- Added separate patch for added CONFIG_SPL_ROCKCHIP_IODOMAIN Kconfig
- Added separate patch for added CONFIG_SPL_REGULATOR_RK8XX Kconfig
- Added patch to remove device-tree properties that conflicted with MMC driver initialization
- Added defconfig changes for all NanoPi RK3399 boards

Justin Klaassen (5):
  rockchip: io-domain: Add debug logging for regulators during probe
  rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAIN
  regulator: rk8xx: Add CONFIG_SPL_REGULATOR_RK8XX
  rockchip: rk3399-nanopi-4: Allow MMC driver to control SD regulators
  rockchip: rk3399-nanopi-4: Enable IO-domain driver in SPL

 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 12 ++++++++++++
 configs/nanopc-t4-rk3399_defconfig      |  7 +++++++
 configs/nanopi-m4-2gb-rk3399_defconfig  |  7 +++++++
 configs/nanopi-m4-rk3399_defconfig      |  7 +++++++
 configs/nanopi-m4b-rk3399_defconfig     |  7 +++++++
 configs/nanopi-neo4-rk3399_defconfig    |  7 +++++++
 configs/nanopi-r4s-rk3399_defconfig     |  7 +++++++
 drivers/misc/Kconfig                    |  8 ++++++++
 drivers/misc/rockchip-io-domain.c       |  7 ++++++-
 drivers/power/regulator/Kconfig         |  9 +++++++++
 drivers/power/regulator/rk8xx.c         |  8 ++------
 11 files changed, 79 insertions(+), 7 deletions(-)

-- 
2.45.3



More information about the U-Boot mailing list