rockchip: Ensure env in SPI Flash can work correctly
PATCH 1/1 rockchip: Ensure env in SPI Flash can work correctly
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc phase so that env can successfully be loaded from SPI Flash.
No boards with these SoCs seem to be affected as there is no default use of ENV_IS_IN_SPI_FLASH=y.
--- arch/arm/dts/rk3328-u-boot.dtsi | 4 ++++ arch/arm/dts/rk356x-u-boot.dtsi | 1 + arch/arm/dts/rk3588s-u-boot.dtsi | 1 + 3 files changed, 6 insertions(+)
arch/arm/dts/rk3328-u-boot.dtsi +4 -0
@@ -132,6 +132,10 @@ bootph-pre-ram; }; +&spi0 { + bootph-some-ram; +}; + &uart2 { bootph-all; clock-frequency = <24000000>;
arch/arm/dts/rk356x-u-boot.dtsi +1 -0
@@ -157,6 +157,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };
arch/arm/dts/rk3588s-u-boot.dtsi +1 -0
@@ -140,6 +140,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };
Signature · 1 line
2.49.0
Hi Jonas,
Quoted 3 lines · Jonas Karlman
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc phase so that env can successfully be loaded from SPI Flash.
Shouldn't the pinmux nodes be added as well? Or are you planning on having those part of the individual board's DTS rather than in the SoC DTSI?
Cheers,
Quentin
Hi Quentin,
Quoted 9 lines · Quentin Schulz
Hi Jonas,
Quoted 3 lines · Jonas Karlman
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc phase so that env can successfully be loaded from SPI Flash.
Shouldn't the pinmux nodes be added as well? Or are you planning on having those part of the individual board's DTS rather than in the SoC DTSI?
The boards that come with SPI flash should already have those added in the SoC or individual board's DTs, to my knowledge.
However, when I was testing env in SPI flash on odroid-go2 I noticed that env would not load unless we explicitly include the sfc/spi node in pre-reloc phase. And the recent added propagation of bootph- props in binman did not seem to really affect use of multiple FDTs in FIT.
With this patch I try to add this explicit bootph-some-ram prop so that if anyone enable the ENV_IN_SPI_FLASH option it actually works as intended on boards that already support booting from SPI flash.
Basically this fixes something I missed in old patches/series ;-)
Regards,
Jonas
Quoted 3 lines
Cheers,
Quentin
Hi Kever,
Please consider this patch for v2026.01.
Also found at https://patchwork.ozlabs.org/patch/2110369/
Regards,
Jonas
Quoted 52 lines · Jonas Karlman
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc phase so that env can successfully be loaded from SPI Flash.
No boards with these SoCs seem to be affected as there is no default use of ENV_IS_IN_SPI_FLASH=y.
Signed-off-by Jonas Karlman <[email protected]>--- arch/arm/dts/rk3328-u-boot.dtsi | 4 ++++ arch/arm/dts/rk356x-u-boot.dtsi | 1 + arch/arm/dts/rk3588s-u-boot.dtsi | 1 + 3 files changed, 6 insertions(+)arch/arm/dts/rk3328-u-boot.dtsi +4
-0@@ -132,6 +132,10 @@ bootph-pre-ram; }; +&spi0 { + bootph-some-ram; +}; + &uart2 { bootph-all; clock-frequency = <24000000>;arch/arm/dts/rk356x-u-boot.dtsi +1
-0@@ -157,6 +157,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };arch/arm/dts/rk3588s-u-boot.dtsi +1
-0@@ -140,6 +140,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };
Quoted 7 lines · Jonas Karlman
Ensure that the spi/sfc node for SPI flash is aviliable during pre-reloc phase so that env can successfully be loaded from SPI Flash.
No boards with these SoCs seem to be affected as there is no default use of ENV_IS_IN_SPI_FLASH=y.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 45 lines
--- arch/arm/dts/rk3328-u-boot.dtsi | 4 ++++ arch/arm/dts/rk356x-u-boot.dtsi | 1 + arch/arm/dts/rk3588s-u-boot.dtsi | 1 + 3 files changed, 6 insertions(+)arch/arm/dts/rk3328-u-boot.dtsi +4
-0@@ -132,6 +132,10 @@ bootph-pre-ram; }; +&spi0 { + bootph-some-ram; +}; + &uart2 { bootph-all; clock-frequency = <24000000>;arch/arm/dts/rk356x-u-boot.dtsi +1
-0@@ -157,6 +157,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };arch/arm/dts/rk3588s-u-boot.dtsi +1
-0@@ -140,6 +140,7 @@ }; &sfc { + bootph-some-ram; u-boot,spl-sfc-no-dma; };