rockchip: rock64: store env in SPI flash
PATCH 1/1 rockchip: rock64: store env in SPI flash
Currently, U-Boot attempts to store the environment in MMC 0, which doesn't work when an eMMC is used without an SD card. There is an SPI flash chip on the board, so use that instead which should work in all cases. Additionally, this brings the Rock64 into line with the RockPro64.
--- configs/rock64-rk3328_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configs/rock64-rk3328_defconfig +2 -1
@@ -8,6 +8,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 CONFIG_SF_DEFAULT_SPEED=20000000 +CONFIG_ENV_SIZE=0x8000 CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" CONFIG_DM_RESET=y
@@ -54,7 +55,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_TPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_TPL_OF_PLATDATA=y -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_NET_RANDOM_ETHADDR=y
Signature · 1 line
2.43.2
As far as I remember not all Rock64 are supplied with soldered SPI.
вс, 25 февр. 2024 г. в 02:52, Ben Wolsieffer <[email protected]>:
Quoted 36 lines
Currently, U-Boot attempts to store the environment in MMC 0, which doesn't work when an eMMC is used without an SD card. There is an SPI flash chip on the board, so use that instead which should work in all cases. Additionally, this brings the Rock64 into line with the RockPro64.
Signed-off-by Ben Wolsieffer <[email protected]>--- configs/rock64-rk3328_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)configs/rock64-rk3328_defconfig +2
-2@@ -8,6 +8,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 CONFIG_SF_DEFAULT_SPEED=20000000 +CONFIG_ENV_SIZE=0x8000 CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3328-rock64" CONFIG_DM_RESET=y@@ -54,7 +55,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_TPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_TPL_OF_PLATDATA=y -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_NET_RANDOM_ETHADDR=y --2.43.2
Signature · 2 lines
With best regards, Matwey V. Kornilov
Quoted 1 line · Matwey V. Kornilov
As far as I remember not all Rock64 are supplied with soldered SPI.
That's unfortunate. I see that now too in the fine print on the product page. I think I can come up with an alternate solution using mmc_get_env_dev() as is done for the tinker-rk3288 board.
Quoted 12 lines
вс, 25 февр. 2024 г. в 02:52, Ben Wolsieffer <[email protected]>:
Quoted 6 lines
Currently, U-Boot attempts to store the environment in MMC 0, which doesn't work when an eMMC is used without an SD card. There is an SPI flash chip on the board, so use that instead which should work in all cases. Additionally, this brings the Rock64 into line with the RockPro64.
Signature · 2 lines
With best regards, Matwey V. Kornilov