]> git.ipfire.org Git - thirdparty/u-boot.git/commit
rockchip: puma-rk3399: use gpio-hog instead of fixed-regulator for enabling eMMC...
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Thu, 15 Sep 2022 09:14:22 +0000 (11:14 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 19 Oct 2022 11:30:49 +0000 (19:30 +0800)
commitc9bc7f988f26b5aa3768c5304c08a7b43a54b6e2
treeeed1770e55c92dc3d327ff14e5ce5bcc3c9f5828
parent12c84d59847140e52c2b8f4763ff6895c14e6f14
rockchip: puma-rk3399: use gpio-hog instead of fixed-regulator for enabling eMMC/SPI-NOR

On Haikou devkit, it is possible to disable eMMC and SPI-NOR to force
booting from SD card or USB via rkdeveloptool by toggling a switch. This
switch needs to be overridden in software to be able to access eMMC and
SPI-NOR once the device has booted from SD Card. Puma SoM can override
this pin via gpio3_d5.

Until now, fixed regulator device was abused to model this, but since
there's now support for GPIO hogs, let's use it.

Since we want to be able to boot the SPL from SD Card but give it the
ability to load U-Boot proper from a fallback medium such as eMMC and
SPI-NOR, SPL support for GPIO hogs needs to be enabled too. Support for
other kinds of regulators are not needed anymore, so let's disable them.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
configs/puma-rk3399_defconfig