[PATCH 03/12] rockchip: puma-rk3399: allow non-SD-Card-loaded SPL to load U-Boot proper from SD-Card

Kever Yang kever.yang at rock-chips.com
Thu Sep 1 15:04:36 CEST 2022


On 2022/7/23 00:06, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz at theobroma-systems.com>
>
> Trying to load U-Boot proper from SPL when SPL was not loaded from
> SD-Card is currently not working because the SDMMC pins aren't muxed
> correctly. It is assumed the BootROM is doing this for us when booting
> from SD-Card hence why it's not needed when booting TPL/SPL from
> SD-Card.
>
> The pinctrl properties are removed from the SPL DT property removal list
> and the pinctrl configuration nodes made available in the SPL DT, in
> addition to the pull-up configurations to allow loading U-Boot proper
> from SD-Card as a fallback mechanism for SPI-NOR and eMMC.
>
> Cc: Quentin Schulz <foss+uboot at 0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>

Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 24 +++++++++++++++++++++
>   configs/puma-rk3399_defconfig               |  2 +-
>   2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
> index b9b6ac3f6c..5dc345bbe8 100644
> --- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi
> @@ -66,6 +66,30 @@
>   	};
>   };
>   
> +&gpio4 {
> +	u-boot,dm-pre-reloc;
> +};
> +
>   &norflash {
>   	u-boot,dm-pre-reloc;
>   };
> +
> +&pcfg_pull_none {
> +	u-boot,dm-pre-reloc;
> +};
> +
> +&pcfg_pull_up {
> +	u-boot,dm-pre-reloc;
> +};
> +
> +&sdmmc_bus4 {
> +	u-boot,dm-pre-reloc;
> +};
> +
> +&sdmmc_clk {
> +	u-boot,dm-pre-reloc;
> +};
> +
> +&sdmmc_cmd {
> +	u-boot,dm-pre-reloc;
> +};
> diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
> index 6093943ee8..779fe5a5cd 100644
> --- a/configs/puma-rk3399_defconfig
> +++ b/configs/puma-rk3399_defconfig
> @@ -42,7 +42,7 @@ CONFIG_CMD_PMIC=y
>   CONFIG_CMD_REGULATOR=y
>   CONFIG_SPL_OF_CONTROL=y
>   CONFIG_OF_LIVE=y
> -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
> +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
>   CONFIG_SYS_RELOC_GD_ENV_ADDR=y


More information about the U-Boot mailing list