* [PATCH] rockchip: rock64: store env in SPI flash
@ 2024-02-24 23:50 Ben Wolsieffer
2024-02-25 10:05 ` Matwey V. Kornilov
0 siblings, 1 reply; 3+ messages in thread
From: Ben Wolsieffer @ 2024-02-24 23:50 UTC (permalink / raw)
To: u-boot; +Cc: Matwey V. Kornilov, Tom Rini, Kever Yang, Ben Wolsieffer
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 <benwolsieffer@gmail.com>
---
configs/rock64-rk3328_defconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 0297d09876..589e5184ca 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rockchip: rock64: store env in SPI flash
2024-02-24 23:50 [PATCH] rockchip: rock64: store env in SPI flash Ben Wolsieffer
@ 2024-02-25 10:05 ` Matwey V. Kornilov
2024-02-25 19:05 ` Ben Wolsieffer
0 siblings, 1 reply; 3+ messages in thread
From: Matwey V. Kornilov @ 2024-02-25 10:05 UTC (permalink / raw)
To: Ben Wolsieffer; +Cc: u-boot, Tom Rini, Kever Yang
As far as I remember not all Rock64 are supplied with soldered SPI.
вс, 25 февр. 2024 г. в 02:52, Ben Wolsieffer <benwolsieffer@gmail.com>:
>
> 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 <benwolsieffer@gmail.com>
> ---
> configs/rock64-rk3328_defconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
> index 0297d09876..589e5184ca 100644
> --- a/configs/rock64-rk3328_defconfig
> +++ b/configs/rock64-rk3328_defconfig
> @@ -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
>
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rockchip: rock64: store env in SPI flash
2024-02-25 10:05 ` Matwey V. Kornilov
@ 2024-02-25 19:05 ` Ben Wolsieffer
0 siblings, 0 replies; 3+ messages in thread
From: Ben Wolsieffer @ 2024-02-25 19:05 UTC (permalink / raw)
To: Matwey V. Kornilov; +Cc: u-boot, Tom Rini, Kever Yang
On Sun, Feb 25, 2024 at 01:05:28PM +0300, Matwey V. Kornilov wrote:
> 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.
>
> вс, 25 февр. 2024 г. в 02:52, Ben Wolsieffer <benwolsieffer@gmail.com>:
> >
> > 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.
>
> --
> With best regards,
> Matwey V. Kornilov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-25 19:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-24 23:50 [PATCH] rockchip: rock64: store env in SPI flash Ben Wolsieffer
2024-02-25 10:05 ` Matwey V. Kornilov
2024-02-25 19:05 ` Ben Wolsieffer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.