[PATCH 2/2] board: rockchip: rgxx3: Use sdmmc0 as first device

Chris Morgan macromorgan at hotmail.com
Tue May 21 17:12:07 CEST 2024


On Thu, May 02, 2024 at 10:00:46PM +0200, Jonas Karlman wrote:
> Hi Chris,
> 
> On 2024-05-02 21:34, Chris Morgan wrote:
> > From: Chris Morgan <macromorgan at hotmail.com>
> > 
> > Some of the rgxx3 devices do not have a way to recover from a poor
> > flash of a bootloader to eMMC. Set the device to always attempt to boot
> > from sdmmc0 first which ensures that we can override the boot from
> > emmc if we have a card present with a valid U-Boot stage.
> 
> I would expect that after [1] was merged in v2024.07-rc1 the likelihood
> of booting a bad/poor flash (where FIT checksum is invalid) have been
> mitigated and the boot process now fall back to loading FIT from SD-card?
> 
> Or is it to protect against flashing a FIT containing a non working
> U-Boot proper that this tries to protect against?

This is to protect against a valid FIT with a non-working U-Boot.

> 
> Also sdmmc1 seem to be missing from SPL control FDT so that could also
> impact fallback logic in SPL. Following nodes should be added to
> rk3566-anbernic-rgxx3-u-boot.dtsi:

sdmmc1 isn't really needed. As long as we have sdmmc0 we should be
good. I can remove it for the next patch series.

> 
> &sdmmc1 {
> 	bootph-pre-ram;
> 	bootph-some-ram;
> };
> 
> &sdmmc1_bus4 {
> 	bootph-pre-ram;
> 	bootph-some-ram;
> };
> 
> &sdmmc1_clk {
> 	bootph-pre-ram;
> 	bootph-some-ram;
> };
> 
> &sdmmc1_cmd {
> 	bootph-pre-ram;
> 	bootph-some-ram;
> };
> 
> &sdmmc1_det {
> 	bootph-pre-ram;
> 	bootph-some-ram;
> };
> 
> [1] https://source.denx.de/u-boot/u-boot/-/commit/61177bead95d366d3155722eb52db8077829579c
> 
> Regards,
> Jonas
> 
> > 
> > Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> > ---
> >  arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi b/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
> > index 793ed4ae8a..18f540a3a2 100644
> > --- a/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi
> > @@ -4,7 +4,7 @@
> >  
> >  / {
> >  	chosen {
> > -		u-boot,spl-boot-order = "same-as-spl", &sdmmc1, &sdmmc0;
> > +		u-boot,spl-boot-order = &sdmmc0, &sdmmc1, &sdhci;
> >  	};
> >  };
> >  
> 


More information about the U-Boot mailing list