rockchip: rk3399: Migrate to use TPL on bob and kevin
Subsystems (3)
cover rockchip: rk3399: Migrate to use TPL on bob and kevin
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from 0x40000 to 0xE0000 in SPI flash
Changes sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from common rk3399.c
Please note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop common Kconfig options already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific code
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)
Signature · 1 line
2.47.1
PATCH 1/12 rockchip: rk3399: Fix TPL build of bob and kevin
Building chromebook_bob/kevin with TPL=y ends with a linking error:
arch/arm/mach-rockchip/rk3399/rk3399.o: in function `board_debug_uart_init':
arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
undefined reference to `spl_gpio_output'
arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `spl_gpio_output'
make[2]: *** [scripts/Makefile.xpl:542: tpl/u-boot-tpl] Error 1 make[1]: *** [Makefile:2134: tpl/u-boot-tpl] Error 2
make: *** [Makefile:568: __build_one_by_one] Error 2
Change to only use spl_gpio functions in SPL to fix this.
--- arch/arm/mach-rockchip/rk3399/rk3399.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/rk3399/rk3399.c +1 -1
@@ -136,7 +136,7 @@ void board_debug_uart_init(void)struct rk3399_pmugrf_regs *const pmugrf = (void *)PMUGRF_BASE ;struct rockchip_gpio_regs *const gpio = (void *)GPIO0_BASE ; -if (IS_ENABLED (CONFIG_XPL_BUILD ) && +if (IS_ENABLED (CONFIG_SPL_BUILD ) && (IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_BOB ) ||IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_KEVIN ))) {rk_setreg (&grf->io_vsel,1 <<0 );
Signature · 1 line
2.47.1
Re: [PATCH 01/12] rockchip: rk3399: Fix TPL build of bob and kevin
Quoted 12 lines · Jonas Karlman
Building chromebook_bob/kevin with TPL=y ends with a linking error:
arch/arm/mach-rockchip/rk3399/rk3399.o: in function `board_debug_uart_init': arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34): undefined reference to `spl_gpio_output' arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `spl_gpio_output' make[2]: *** [scripts/Makefile.xpl:542: tpl/u-boot-tpl] Error 1 make[1]: *** [Makefile:2134: tpl/u-boot-tpl] Error 2 make: *** [Makefile:568: __build_one_by_one] Error 2
Quoted 3 lines
Change to only use
spl_gpiofunctions in SPL to fix this.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 17 lines
--- arch/arm/mach-rockchip/rk3399/rk3399.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-rockchip/rk3399/rk3399.c +1
-1@@ -136,7 +136,7 @@ void board_debug_uart_init(void)struct rk3399_pmugrf_regs *const pmugrf = (void *)PMUGRF_BASE ;struct rockchip_gpio_regs *const gpio = (void *)GPIO0_BASE ; -if (IS_ENABLED (CONFIG_XPL_BUILD ) && +if (IS_ENABLED (CONFIG_SPL_BUILD ) && (IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_BOB ) ||IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_KEVIN ))) {rk_setreg (&grf->io_vsel,1 <<0 );
PATCH 2/12 rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
In reply to Jonas KarlmanUse the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option instead of a hardcoded 0x40000 for the FIT payload offset.
This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/rk3399-gru-u-boot.dtsi +1 -1
@@ -11,7 +11,7 @@ }; config { - u-boot,spl-payload-offset = <0x40000>; + u-boot,spl-payload-offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; };
arch/arm/dts/rk3399-u-boot.dtsi +1 -1
@@ -43,7 +43,7 @@ }; }; u-boot-img { - offset = <0x40000>; + offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; u-boot { offset = <0x300000>;
Signature · 1 line
2.47.1
Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
Quoted 6 lines · Jonas Karlman
Use the offset configured with
SYS_SPI_U_BOOT_OFFSKconfigoption instead of a hardcoded0x40000for the FIT payload offset.This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 31 lines
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/dts/rk3399-gru-u-boot.dtsi +1
-1@@ -11,7 +11,7 @@ }; config { - u-boot,spl-payload-offset = <0x40000>; + u-boot,spl-payload-offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; };arch/arm/dts/rk3399-u-boot.dtsi +1
-1@@ -43,7 +43,7 @@ }; }; u-boot-img { - offset = <0x40000>; + offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; u-boot { offset = <0x300000>;
Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
In reply to Jonas KarlmanHi Jonas,
Quoted 5 lines · Jonas Karlman
Use the offset configured with
SYS_SPI_U_BOOT_OFFSKconfigoption instead of a hardcoded0x40000for the FIT payload offset.This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
When you add CONFIG options into a devicetree, it makes it difficult to build it. We have to individually build U-Boot for each target just to get the right values.
For rk3399-generic, this means I have to drop gru.
Can we not use a binman symbols instead?
Quoted 6 lines
Signed-off-by Jonas Karlman <[email protected]>--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Regards,
SImon
Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
Hi Simon,
Quoted 4 lines · Simon Glass
Hi Jonas,
Quoted 1 line · Jonas Karlman
Quoted 8 lines
Quoted 4 lines
Use the offset configured with
SYS_SPI_U_BOOT_OFFSKconfigoption instead of a hardcoded0x40000for the FIT payload offset.This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
When you add CONFIG options into a devicetree, it makes it difficult to build it. We have to individually build U-Boot for each target just to get the right values.
This only aligned everything with the simple-bin-spi image and prepared for moving the SPI flash payload offset to 0xE0000.
If you are looking at this now, please also take a look at [1]. There where some questions directed at you there :-)
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 4 lines
For rk3399-generic, this means I have to drop gru.
Can we not use a binman symbols instead?
All RK3399 targets having support for building a SPI flash image now use CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 after these changes where merged.
Regards,
Jonas
Quoted 10 lines
Quoted 7 lines
Signed-off-by Jonas Karlman <[email protected]>--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 2 +- arch/arm/dts/rk3399-u-boot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Regards,
SImon
Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
Hi Jonas,
Quoted 26 lines · Jonas Karlman
Hi Simon,
Quoted 4 lines · Simon Glass
Hi Jonas,
Quoted 1 line · Jonas Karlman
Quoted 8 lines
Quoted 4 lines
Use the offset configured with
SYS_SPI_U_BOOT_OFFSKconfigoption instead of a hardcoded0x40000for the FIT payload offset.This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.
When you add CONFIG options into a devicetree, it makes it difficult to build it. We have to individually build U-Boot for each target just to get the right values.
This only aligned everything with the simple-bin-spi image and prepared for moving the SPI flash payload offset to
0xE0000.If you are looking at this now, please also take a look at [1]. There where some questions directed at you there :-)
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
For rk3399-generic, this means I have to drop gru.
Can we not use a binman symbols instead?
All RK3399 targets having support for building a SPI flash image now use
CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000after these changes where merged.
OK, but why have this config option? Binman is designed to remove the need for it.
Regards,
Simon
PATCH 3/12 rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
In reply to Jonas KarlmanThe BootROM on RK3399 only read the first 2 KB of each 4 KB page from SPI flash. With current FIT payload offset of 0x40000 this limits the supported TPL+SPL size to only 128 KB.
Change to use 0xE0000 as FIT payload offset, similar to other RK3399 boards, to allow a maximum size for TPL of 192 KB and SPL of 256 KB.
--- configs/chromebook_bob_defconfig | 2 +- configs/chromebook_kevin_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
configs/chromebook_bob_defconfig +1 -1
@@ -44,7 +44,7 @@ CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y
configs/chromebook_kevin_defconfig +1 -1
@@ -45,7 +45,7 @@ CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y
Signature · 1 line
2.47.1
Re: [PATCH 03/12] rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
Quoted 8 lines · Jonas Karlman
The BootROM on RK3399 only read the first 2 KB of each 4 KB page from SPI flash. With current FIT payload offset of
0x40000this limits the supported TPL+SPL size to only 128 KB.Change to use
0xE0000as FIT payload offset, similar to other RK3399 boards, to allow a maximum size for TPL of 192 KB and SPL of 256 KB.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 31 lines
--- configs/chromebook_bob_defconfig | 2 +- configs/chromebook_kevin_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)configs/chromebook_bob_defconfig +1
-1@@ -44,7 +44,7 @@ CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=yconfigs/chromebook_kevin_defconfig +1
-1@@ -45,7 +45,7 @@ CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x40000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y
PATCH 4/12 rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
In reply to Jonas KarlmanThe chromebook specific u-boot.rom image does not include TPL when building with TPL=y or ROCKCHIP_EXTERNAL_TPL=y.
Fix this by adding rockchip-tpl and u-boot-tpl nodes to the mkimage node for the u-boot.rom binman image.
--- arch/arm/dts/rk3399-u-boot.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/dts/rk3399-u-boot.dtsi +8 -0
@@ -39,6 +39,14 @@ mkimage { args = "-n rk3399 -T rkspi"; + multiple-data-files; +#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL + rockchip-tpl { + }; +#elif defined(CONFIG_TPL) + u-boot-tpl { + }; +#endif u-boot-spl { }; };
Signature · 1 line
2.47.1
Re: [PATCH 04/12] rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
Quoted 7 lines · Jonas Karlman
The chromebook specific u-boot.rom image does not include TPL when building with TPL=y or ROCKCHIP_EXTERNAL_TPL=y.
Fix this by adding rockchip-tpl and u-boot-tpl nodes to the mkimage node for the u-boot.rom binman image.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 23 lines
--- arch/arm/dts/rk3399-u-boot.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/dts/rk3399-u-boot.dtsi +8
-0@@ -39,6 +39,14 @@ mkimage { args = "-n rk3399 -T rkspi"; + multiple-data-files; +#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL + rockchip-tpl { + }; +#elif defined(CONFIG_TPL) + u-boot-tpl { + }; +#endif u-boot-spl { }; };
PATCH 5/12 rockchip: rk3399-gru: Use TPL with common bss and stack addresses
In reply to Jonas KarlmanMigrate to use TPL, common bss, stack and malloc heap size and addresses to unify memory use in TPL, SPL and pre-reloc with other RK3399 boards.
--- configs/chromebook_bob_defconfig | 13 +------------ configs/chromebook_kevin_defconfig | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-)
configs/chromebook_bob_defconfig +1 -12
@@ -3,26 +3,15 @@ CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y -CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y 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_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-gru-bob" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y CONFIG_ROCKCHIP_BOOT_MODE_REG=0 -CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 # CONFIG_SPL_MMC is not set -CONFIG_SPL_STACK=0xff8effff -CONFIG_SPL_TEXT_BASE=0xff8c2000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0xff8e0000 -CONFIG_SPL_BSS_MAX_SIZE=0x10000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xff1a0000
@@ -42,10 +31,10 @@ CONFIG_SPL_MAX_SIZE=0x1e000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y
configs/chromebook_kevin_defconfig +1 -12
@@ -3,27 +3,16 @@ CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y -CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y 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_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-gru-kevin" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y CONFIG_ROCKCHIP_BOOT_MODE_REG=0 -CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 # CONFIG_SPL_MMC is not set CONFIG_TARGET_CHROMEBOOK_KEVIN=y -CONFIG_SPL_STACK=0xff8effff -CONFIG_SPL_TEXT_BASE=0xff8c2000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0xff8e0000 -CONFIG_SPL_BSS_MAX_SIZE=0x10000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xff1a0000
@@ -43,10 +32,10 @@ CONFIG_SPL_MAX_SIZE=0x1e000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y
Signature · 1 line
2.47.1
Re: [PATCH 05/12] rockchip: rk3399-gru: Use TPL with common bss and stack addresses
Quoted 4 lines · Jonas Karlman
Migrate to use TPL, common bss, stack and malloc heap size and addresses to unify memory use in TPL, SPL and pre-reloc with other RK3399 boards.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 92 lines
--- configs/chromebook_bob_defconfig | 13 +------------ configs/chromebook_kevin_defconfig | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-)configs/chromebook_bob_defconfig +1
-12@@ -3,26 +3,15 @@ CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y -CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y 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_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-gru-bob" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y CONFIG_ROCKCHIP_BOOT_MODE_REG=0 -CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 # CONFIG_SPL_MMC is not set -CONFIG_SPL_STACK=0xff8effff -CONFIG_SPL_TEXT_BASE=0xff8c2000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0xff8e0000 -CONFIG_SPL_BSS_MAX_SIZE=0x10000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xff1a0000@@ -42,10 +31,10 @@ CONFIG_SPL_MAX_SIZE=0x1e000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=yconfigs/chromebook_kevin_defconfig +1
-12@@ -3,27 +3,16 @@ CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y -CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y 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_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-gru-kevin" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y CONFIG_ROCKCHIP_BOOT_MODE_REG=0 -CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 # CONFIG_SPL_MMC is not set CONFIG_TARGET_CHROMEBOOK_KEVIN=y -CONFIG_SPL_STACK=0xff8effff -CONFIG_SPL_TEXT_BASE=0xff8c2000 -CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0xff8e0000 -CONFIG_SPL_BSS_MAX_SIZE=0x10000 -CONFIG_SPL_STACK_R=y -CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xff1a0000@@ -43,10 +32,10 @@ CONFIG_SPL_MAX_SIZE=0x1e000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0xE0000 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y
PATCH 6/12 rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
In reply to Jonas KarlmanThe u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
--- arch/arm/dts/rk3399-u-boot.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/dts/rk3399-u-boot.dtsi +3 -1
@@ -50,7 +50,9 @@ u-boot-spl { }; }; - u-boot-img { + fit { + type = "blob"; + filename = "u-boot.itb"; offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; u-boot {
Signature · 1 line
2.47.1
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Hi Jonas,
Quoted 9 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>
IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Especially since the only RK3399 with CONGIG_HAS_ROM set are Bob and Kevin.
@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Cheers,
Quentin
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at 0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).
Regards,
Jonas
Quoted 8 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Cheers,
Quentin
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).
I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 9 lines
Regards,
JonasQuoted 5 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
Regards,
Simon
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Quoted 44 lines · Simon Glass
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 7 lines
Regards,
JonasQuoted 3 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
I really wish you would use the community gitlab instance and not encourage people to use your personal instance instead.
Signature · 1 line
Tom
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Hi Tom,
Quoted 49 lines · Tom Rini
Quoted 47 lines · Simon Glass
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 9 lines
Regards,
JonasQuoted 5 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Quoted 7 lines
Quoted 4 lines
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
I really wish you would use the community gitlab instance and not encourage people to use your personal instance instead.
I wish I didn't need one and anyway, that wasn't what I said. Jonas has u-boot-rockchip, I believe, so should be able to push things and run on my lab.
Perhaps the problem is that it's too complicated? If you could find a way to allow this change in, people could just click the button and may be more likely to use it?
.lab_template: &lab_dfn
stage: sjg-lab
rules:
- if: $SJG_LAB == "1"
when: always
- if: $SJG_LAB != "1"
when: manual
allow_failure: true
tags: [ 'lab' ]
Regards,
Simon
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Quoted 57 lines · Simon Glass
Hi Tom,
Quoted 54 lines · Tom Rini
Quoted 51 lines · Simon Glass
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 9 lines
Regards,
JonasQuoted 5 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
Quoted 6 lines
Quoted 2 lines
I really wish you would use the community gitlab instance and not encourage people to use your personal instance instead.
I wish I didn't need one and anyway, that wasn't what I said. Jonas has u-boot-rockchip, I believe, so should be able to push things and run on my lab.
For clarity, I only have my personal tree, named u-boot-rockchip, at GitHub, and do not have any tree at https://source.denx.de/u-boot/
Regards,
Jonas
Quoted 17 lines
Perhaps the problem is that it's too complicated? If you could find a way to allow this change in, people could just click the button and may be more likely to use it?
.lab_template:
&lab_dfn
stage: sjg-lab
rules:
- if: $SJG_LAB == "1"
when: always
- if: $SJG_LAB != "1"
when: manual
allow_failure: true
tags: [ 'lab' ]Regards,
Simon
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
On Sun, Feb 09, 2025 at 10:40:05PM +0100, Jonas Karlman wrote:
[snip]
Quoted 2 lines
For clarity, I only have my personal tree, named u-boot-rockchip, at GitHub, and do not have any tree at https://source.denx.de/u-boot/
On that note, while we don't have the resources to open our Gitlab CI to the world (which is why have Azure hooked up to GitHub, it's slow, but it's also free) I was thinking about adding a "contrib" repository to allow frequent contributors access to Gitlab CI as well.
Signature · 1 line
Tom
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
In reply to Simon GlassQuoted 57 lines · Simon Glass
Hi Tom,
Quoted 54 lines · Tom Rini
Quoted 51 lines · Simon Glass
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 9 lines
Regards,
JonasQuoted 5 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
Quoted 6 lines
Quoted 2 lines
I really wish you would use the community gitlab instance and not encourage people to use your personal instance instead.
I wish I didn't need one and anyway, that wasn't what I said. Jonas has u-boot-rockchip, I believe, so should be able to push things and run on my lab.
I don't know why you think you need your own gitlab instance, no one else does.
Quoted 4 lines
Perhaps the problem is that it's too complicated? If you could find a way to allow this change in, people could just click the button and may be more likely to use it?
Quoted 9 lines
.lab_template:
&lab_dfn
stage: sjg-lab
rules:
- if: $SJG_LAB == "1"
when: always
- if: $SJG_LAB != "1"
when: manual
allow_failure: true
tags: [ 'lab' ]
And I don't know what that's for. You can already click a button and run a pipeline that includes your lab.
Signature · 1 line
Tom
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Hi Tom,
Quoted 83 lines · Tom Rini
Quoted 57 lines · Simon Glass
Hi Tom,
Quoted 54 lines · Tom Rini
Quoted 51 lines · Simon Glass
Hi Jonas,
Quoted 23 lines · Jonas Karlman
Hi Quentin and Simon,
Quoted 8 lines · Quentin Schulz
Hi Jonas,
Quoted 5 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
Quoted 8 lines
Quoted 4 lines
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>IIRC Simon was fine with removing u-boot.rom support for RK3399 when I asked months (probably years?) ago, if that hasn't changed, maybe we should now.
Good to know and fully agree, we should try to remove it now.
Quoted 7 lines
I did a compare between u-boot-rockchip-spi.bin and u-boot.rom and after this series they are now identical for the full size of u-boot-rockchip-spi.bin.
However, the u-boot.rom also has a copy of ~u-boot.bin and a fdtmap starting at
0x300000. I have no idea if they are used for anything, if they are it is probably not for bare metal booting (TPL+SPL).I'm not sure about the extra u-boot.bin, but the fdtmap is so that 'binman ls -i xxx' works.
Quoted 9 lines
Regards,
JonasQuoted 5 lines
Especially since the only RK3399 with
CONGIG_HAS_ROMset are Bob and Kevin.@Simon, you said you tested the patch series on them, with which image did you do that? Are you still fine with removing the u-boot.rom for RK3399?
Yes that's fine.
Basically all my testing is in my lab now, which you should be able to use with gitlab.
Quoted 6 lines
Quoted 2 lines
I really wish you would use the community gitlab instance and not encourage people to use your personal instance instead.
I wish I didn't need one and anyway, that wasn't what I said. Jonas has u-boot-rockchip, I believe, so should be able to push things and run on my lab.
I don't know why you think you need your own gitlab instance, no one else does.
Quoted 4 lines
Perhaps the problem is that it's too complicated? If you could find a way to allow this change in, people could just click the button and may be more likely to use it?
Quoted 9 lines
.lab_template:
&lab_dfn
stage: sjg-lab
rules:
- if: $SJG_LAB == "1"
when: always
- if: $SJG_LAB != "1"
when: manual
allow_failure: true
tags: [ 'lab' ]
Quoted 2 lines
And I don't know what that's for. You can already click a button and run a pipeline that includes your lab.
Then please can you help Heinrich who is struggling on how to do this.
Regards,
Simon
Re: [PATCH 06/12] rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
In reply to Jonas KarlmanQuoted 9 lines · Jonas Karlman
The u-boot.rom image contain u-boot.img FIT instead of the FIT generated by binman for the u-boot-rockchip.bin image.
Change to include the binman generated FIT for the u-boot.rom image.
This change result in TF-A being included and the use sha256 instead of crc32 checksum in the u-boot.rom FIT.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 19 lines
--- arch/arm/dts/rk3399-u-boot.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/arm/dts/rk3399-u-boot.dtsi +3
-1@@ -50,7 +50,9 @@ u-boot-spl { }; }; - u-boot-img { + fit { + type = "blob"; + filename = "u-boot.itb"; offset = <CONFIG_SYS_SPI_U_BOOT_OFFS>; }; u-boot {
PATCH 7/12 rockchip: rk3399: Drop common Kconfig options already implied
In reply to Jonas KarlmanThe last two RK3399 boards, chromebook bob and kevin, have now migraded to use common bss and stack addresses.
Cleanup and remove Kconfig options no longer needed in rk3399/Kconfig when all boards now use common bss and stack addresses.
--- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/mach-rockchip/rk3399/Kconfig +0 -12
@@ -146,15 +146,6 @@ config SYS_SOC config ROCKCHIP_COMMON_STACK_ADDR default y -config SYS_MALLOC_F_LEN - default 0x4000 if !SPL_SHARES_INIT_SP_ADDR - -config SPL_LIBCOMMON_SUPPORT - default y - -config SPL_LIBGENERIC_SUPPORT - default y - config TPL_LDSCRIPT default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds"
@@ -164,9 +155,6 @@ config TPL_STACK config TPL_TEXT_BASE default 0xff8c2000 -config SPL_STACK_R_ADDR - default 0x04000000 if !SPL_SHARES_INIT_SP_ADDR - if BOOTCOUNT_LIMIT config BOOTCOUNT_BOOTLIMIT
Signature · 1 line
2.47.1
Re: [PATCH 07/12] rockchip: rk3399: Drop common Kconfig options already implied
Quoted 7 lines · Jonas Karlman
The last two RK3399 boards, chromebook bob and kevin, have now migraded to use common bss and stack addresses.
Cleanup and remove
Kconfigoptions no longer needed in rk3399/Kconfig when all boards now use common bss and stack addresses.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 34 lines
--- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ------------ 1 file changed, 12 deletions(-)arch/arm/mach-rockchip/rk3399/Kconfig +0
-12@@ -146,15 +146,6 @@ config SYS_SOC config ROCKCHIP_COMMON_STACK_ADDR default y -config SYS_MALLOC_F_LEN - default 0x4000 if !SPL_SHARES_INIT_SP_ADDR - -config SPL_LIBCOMMON_SUPPORT - default y - -config SPL_LIBGENERIC_SUPPORT - default y - config TPL_LDSCRIPT default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds"@@ -164,9 +155,6 @@ config TPL_STACK config TPL_TEXT_BASE default 0xff8c2000 -config SPL_STACK_R_ADDR - default 0x04000000 if !SPL_SHARES_INIT_SP_ADDR - if BOOTCOUNT_LIMIT config BOOTCOUNT_BOOTLIMIT
PATCH 8/12 rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
In reply to Jonas KarlmanThe eMMC PHY and SPI flash is not used in all xPL phases.
Change to no longer include emmc_phy and spi_flash in all xPL phases.
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/dts/rk3399-gru-u-boot.dtsi +7 -1
@@ -29,6 +29,11 @@ rockchip,panel = <&edp_panel>; }; +&emmc_phy { + /delete-property/ bootph-pre-ram; +}; + + &pp1800_audio { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -80,7 +85,8 @@ &spi1 { spi_flash: flash@0 { - bootph-all; + bootph-pre-ram; + bootph-some-ram; }; };
Signature · 1 line
2.47.1
Re: [PATCH 08/12] rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
Quoted 5 lines · Jonas Karlman
The eMMC PHY and SPI flash is not used in all xPL phases.
Change to no longer include
emmc_phyandspi_flashin all xPL phases.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 30 lines
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/dts/rk3399-gru-u-boot.dtsi +7
-1@@ -29,6 +29,11 @@ rockchip,panel = <&edp_panel>; }; +&emmc_phy { + /delete-property/ bootph-pre-ram; +}; + + &pp1800_audio { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;@@ -80,7 +85,8 @@ &spi1 { spi_flash: flash@0 { - bootph-all; + bootph-pre-ram; + bootph-some-ram; }; };
PATCH 9/12 rockchip: rk3399-gru: Enable dcache and signature validation in SPL
In reply to Jonas KarlmanWith TPL being used to init DRAM, SPL being used to load FIT and the adjusted FIT payload offset it is now possible to increase the size limit of SPL to 256 KB and enable uses of dcache and FIT signature validation.
Drop SPL_SYS_DCACHE_OFF=y to enable use of dcache in SPL.
Drop SPL_FIT_SIGNATURE=n to enable signature validation of FIT in SPL.
Change SPL_MAX_SIZE to 256 KB now that payload offset has moved in SPI and TF-A may be loaded to 0x40000 in DRAM.
--- configs/chromebook_bob_defconfig | 4 +--- configs/chromebook_kevin_defconfig | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
configs/chromebook_bob_defconfig +1 -3
@@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y -CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SPL_GPIO=y
@@ -19,7 +18,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y -# CONFIG_SPL_FIT_SIGNATURE is not set CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y
@@ -27,7 +25,7 @@ CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 -CONFIG_SPL_MAX_SIZE=0x1e000 +CONFIG_SPL_MAX_SIZE=0x40000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
configs/chromebook_kevin_defconfig +1 -3
@@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y -CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SPL_GPIO=y
@@ -20,7 +19,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y -# CONFIG_SPL_FIT_SIGNATURE is not set CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y
@@ -28,7 +26,7 @@ CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 -CONFIG_SPL_MAX_SIZE=0x1e000 +CONFIG_SPL_MAX_SIZE=0x40000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
Signature · 1 line
2.47.1
Re: [PATCH 09/12] rockchip: rk3399-gru: Enable dcache and signature validation in SPL
Quoted 5 lines · Jonas Karlman
With TPL being used to init DRAM, SPL being used to load FIT and the adjusted FIT payload offset it is now possible to increase the size limit of SPL to 256 KB and enable uses of dcache and FIT signature validation.
Quoted 8 lines
Drop SPL_SYS_DCACHE_OFF=y to enable use of dcache in SPL.
Drop SPL_FIT_SIGNATURE=n to enable signature validation of FIT in SPL.
Change
SPL_MAX_SIZEto 256 KB now that payload offset has moved in SPI and TF-A may be loaded to0x40000in DRAM.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 61 lines
--- configs/chromebook_bob_defconfig | 4 +--- configs/chromebook_kevin_defconfig | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)configs/chromebook_bob_defconfig +1
-3@@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y -CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SPL_GPIO=y@@ -19,7 +18,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y -# CONFIG_SPL_FIT_SIGNATURE is not set CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y@@ -27,7 +25,7 @@ CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 -CONFIG_SPL_MAX_SIZE=0x1e000 +CONFIG_SPL_MAX_SIZE=0x40000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not setconfigs/chromebook_kevin_defconfig +1
-3@@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y -CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SPL_GPIO=y@@ -20,7 +19,6 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y -# CONFIG_SPL_FIT_SIGNATURE is not set CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y@@ -28,7 +26,7 @@ CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 -CONFIG_SPL_MAX_SIZE=0x1e000 +CONFIG_SPL_MAX_SIZE=0x40000 CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_HANDOFF=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
PATCH 10/12 rockchip: rk3399-gru: Use SDMA mode to read from eMMC
In reply to Jonas KarlmanEnable use of SDMA mode when reading from eMMC to speed up boot.
--- configs/chromebook_bob_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + 2 files changed, 2 insertions(+)
configs/chromebook_bob_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_MMC_PWRSEQ=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH_GIGADEVICE=y CONFIG_SPI_FLASH_WINBOND=y
configs/chromebook_kevin_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_MMC_PWRSEQ=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH_GIGADEVICE=y CONFIG_SPI_FLASH_WINBOND=y
Signature · 1 line
2.47.1
Re: [PATCH 10/12] rockchip: rk3399-gru: Use SDMA mode to read from eMMC
Quoted 3 lines · Jonas Karlman
Enable use of SDMA mode when reading from eMMC to speed up boot.
Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 29 lines
--- configs/chromebook_bob_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + 2 files changed, 2 insertions(+)configs/chromebook_bob_defconfig +1
-0@@ -63,6 +63,7 @@ CONFIG_MMC_PWRSEQ=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH_GIGADEVICE=y CONFIG_SPI_FLASH_WINBOND=yconfigs/chromebook_kevin_defconfig +1
-0@@ -64,6 +64,7 @@ CONFIG_MMC_PWRSEQ=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH_GIGADEVICE=y CONFIG_SPI_FLASH_WINBOND=y
PATCH 11/12 rockchip: rk3399-gru: Include pinctrl and regulators in SPL
In reply to Jonas KarlmanAdd bootph props and enable related Kconfig options to include vital regulators in SPL.
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 19 +++++++++++++++++++ configs/chromebook_bob_defconfig | 3 ++- configs/chromebook_kevin_defconfig | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-)
arch/arm/dts/rk3399-gru-u-boot.dtsi +19 -0
@@ -33,12 +33,31 @@ /delete-property/ bootph-pre-ram; }; +&gpio0 { + bootph-pre-ram; +}; + +&pp1500_ap_io { + bootph-pre-ram; +}; &pp1800_audio { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; +&pp1500_en { + bootph-pre-ram; +}; + +&pp3000 { + bootph-pre-ram; +}; + +&pp3000_en { + bootph-pre-ram; +}; + &ppvar_bigcpu_pwm { regulator-init-microvolt = <900000>; };
configs/chromebook_bob_defconfig +2 -1
@@ -47,7 +47,7 @@ CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y
@@ -73,6 +73,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y +CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_CROS_EC=y
configs/chromebook_kevin_defconfig +2 -1
@@ -48,7 +48,7 @@ CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y
@@ -74,6 +74,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y +CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_CROS_EC=y
Signature · 1 line
2.47.1
Re: [PATCH 11/12] rockchip: rk3399-gru: Include pinctrl and regulators in SPL
Quoted 4 lines · Jonas Karlman
Add bootph props and enable related
Kconfigoptions to include vital regulators in SPL.Signed-off-by Jonas Karlman <[email protected]>
Thanks,
- Kever
Quoted 84 lines
--- arch/arm/dts/rk3399-gru-u-boot.dtsi | 19 +++++++++++++++++++ configs/chromebook_bob_defconfig | 3 ++- configs/chromebook_kevin_defconfig | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-)arch/arm/dts/rk3399-gru-u-boot.dtsi +19
-0@@ -33,12 +33,31 @@ /delete-property/ bootph-pre-ram; }; +&gpio0 { + bootph-pre-ram; +}; + +&pp1500_ap_io { + bootph-pre-ram; +}; &pp1800_audio { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; +&pp1500_en { + bootph-pre-ram; +}; + +&pp3000 { + bootph-pre-ram; +}; + +&pp3000_en { + bootph-pre-ram; +}; + &ppvar_bigcpu_pwm { regulator-init-microvolt = <900000>; };configs/chromebook_bob_defconfig +2
-1@@ -47,7 +47,7 @@ CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y@@ -73,6 +73,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y +CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_CROS_EC=yconfigs/chromebook_kevin_defconfig +2
-1@@ -48,7 +48,7 @@ CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y@@ -74,6 +74,7 @@ CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_TYPEC=y CONFIG_PMIC_RK8XX=y CONFIG_REGULATOR_PWM=y +CONFIG_SPL_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_REGULATOR_RK8XX=y CONFIG_PWM_CROS_EC=y
PATCH 12/12 rockchip: rk3399: Drop unneeded bob and kevin board specific code
In reply to Jonas KarlmanThe IO-domain driver will configure io_vsel and always-on/boot-on regulators will be enabled based on the board device tree now that required nodes and Kconfig options is enabled for SPL.
Remove the bob and kevin board specific code from the common rk3399.c, the IO-domain and regulator driver provide similar functionality.
--- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-)
arch/arm/mach-rockchip/rk3399/rk3399.c +1 -22
@@ -7,7 +7,6 @@#include <init.h> #include <log.h> #include <spl.h> -#include <spl_gpio.h> #include <syscon.h> #include <asm/armv8/mmu.h> #include <asm/arch-rockchip/bootrom.h>
@@ -16,6 +15,7 @@#include <asm/arch-rockchip/gpio.h> #include <asm/arch-rockchip/grf_rk3399.h> #include <asm/arch-rockchip/hardware.h> +#include <asm/gpio.h> #include <linux/bitops.h> #include <linux/printk.h> #include <power/regulator.h>
@@ -133,27 +133,6 @@ void board_debug_uart_init(void)GRF_GPIO3B7_SEL_MASK , GRF_UART3_SOUT << GRF_GPIO3B7_SEL_SHIFT);#else -struct rk3399_pmugrf_regs *const pmugrf = (void *)PMUGRF_BASE ; -struct rockchip_gpio_regs *const gpio = (void *)GPIO0_BASE ; - -if (IS_ENABLED (CONFIG_SPL_BUILD ) && - (IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_BOB ) || -IS_ENABLED (CONFIG_TARGET_CHROMEBOOK_KEVIN ))) { -rk_setreg (&grf->io_vsel,1 <<0 ); - -/* -* Let's enable these power rails here, we are already running -* the SPI-Flash-based code. -*/ -spl_gpio_output (gpio,GPIO (BANK_B ,2 ),1 );/* PP1500_EN */ -spl_gpio_set_pull (&pmugrf->gpio0_p,GPIO (BANK_B ,2 ), -GPIO_PULL_NORMAL ); - -spl_gpio_output (gpio,GPIO (BANK_B ,4 ),1 );/* PP3000_EN */ -spl_gpio_set_pull (&pmugrf->gpio0_p,GPIO (BANK_B ,4 ), -GPIO_PULL_NORMAL ); - } -/* Enable early UART2 channel C on the RK3399 */ rk_clrsetreg(&grf->gpio4c_iomux, GRF_GPIO4C3_SEL_MASK,
Signature · 1 line
2.47.1
Hi Jonas,
Quoted 42 lines · Jonas Karlman
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from0x40000to0xE0000in SPI flashChanges sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from commonrk3399.cPlease note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: UseSYS_SPI_U_BOOT_OFFSvalue in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop commonKconfigoptions already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific code
Quoted 7 lines
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)
Thank you for doing this!
I'm not sure if you have access to your own denx tree. If so, kevin and bob are in the sjg lab. If not, you can sign up at sjg.u-boot.org to get access to my tree.
This series eems to work for me, except for the final commit, which hangs with no output.
Regards,
Simon
Hi Simon,
Quoted 53 lines · Simon Glass
Hi Jonas,
Quoted 42 lines · Jonas Karlman
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from0x40000to0xE0000in SPI flashChanges sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from commonrk3399.cPlease note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: UseSYS_SPI_U_BOOT_OFFSvalue in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop commonKconfigoptions already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific codeQuoted 7 lines
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)
Quoted 5 lines
Thank you for doing this!
I'm not sure if you have access to your own denx tree. If so, kevin and bob are in the sjg lab. If not, you can sign up at sjg.u-boot.org to get access to my tree.
I do not have access to my own tree.
Quoted 3 lines
This series eems to work for me, except for the final commit, which hangs with no output.
Strange, guess we can just skip the last patch, should I send a v2 without the last patch?
I wonder if it is not setting io_vsel or the regulators that is causing an issue. Setting io_vsel is probably delayed until U-Boot proper instead of being set very early in SPL (due to no IO-domain driver in SPL), and enable of regulators may happen later in SPL with the last patch applied.
There is also some code in board/google/gru/gru.c that mention a delay related to the regulators may be needed, however board_early_init_f() is never called as following can be found in .config:
# CONFIG_BOARD_EARLY_INIT_F is not set
Will you be able to test with just the rk_setreg(&grf->io_vsel, 1 << 0); and remove the spl_gpio_output/set_pull parts of the last patch before I send a v2?
Regards,
Jonas
Quoted 3 lines
Regards,
Simon
Quoted 81 lines · Jonas Karlman
Hi Simon,
Quoted 53 lines · Simon Glass
Hi Jonas,
Quoted 42 lines · Jonas Karlman
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from0x40000to0xE0000in SPI flashChanges sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from commonrk3399.cPlease note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: UseSYS_SPI_U_BOOT_OFFSvalue in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop commonKconfigoptions already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific codeQuoted 7 lines
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)Quoted 5 lines
Thank you for doing this!
I'm not sure if you have access to your own denx tree. If so, kevin and bob are in the sjg lab. If not, you can sign up at sjg.u-boot.org to get access to my tree.
I do not have access to my own tree.
Quoted 3 lines
This series eems to work for me, except for the final commit, which hangs with no output.
Strange, guess we can just skip the last patch, should I send a v2 without the last patch?
I wonder if it is not setting
io_vselor the regulators that is causing an issue. Settingio_vselis probably delayed until U-Boot proper instead of being set very early in SPL (due to no IO-domain driver in SPL), and enable of regulators may happen later in SPL with the last patch applied.There is also some code in
board/google/gru/gru.cthat mention a delay related to the regulators may be needed, howeverboard_early_init_f()is never called as following can be found in .config:
Quoted 5 lines
#
CONFIG_BOARD_EARLY_INIT_Fis not setWill you be able to test with just the
rk_setreg(&grf->io_vsel, 1 << 0); and remove the spl_gpio_output/set_pull parts of the last patch before I send a v2?
If you send a v2, please include disabling TPL_BLOBLIST and then the boards should boot in mainline as well as Simon's tree. Thanks!
Signature · 1 line
Tom
Hi Tom,
Quoted 77 lines · Tom Rini
Quoted 76 lines · Jonas Karlman
Hi Simon,
Quoted 51 lines · Simon Glass
Hi Jonas,
Quoted 41 lines · Jonas Karlman
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from0x40000to0xE0000in SPI flashChanges sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from commonrk3399.cPlease note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: UseSYS_SPI_U_BOOT_OFFSvalue in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop commonKconfigoptions already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific codeQuoted 7 lines
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)Quoted 5 lines
Thank you for doing this!
I'm not sure if you have access to your own denx tree. If so, kevin and bob are in the sjg lab. If not, you can sign up at sjg.u-boot.org to get access to my tree.
I do not have access to my own tree.
Quoted 2 lines
This series eems to work for me, except for the final commit, which hangs with no output.
Strange, guess we can just skip the last patch, should I send a v2 without the last patch?
I wonder if it is not setting
io_vselor the regulators that is causing an issue. Settingio_vselis probably delayed until U-Boot proper instead of being set very early in SPL (due to no IO-domain driver in SPL), and enable of regulators may happen later in SPL with the last patch applied.There is also some code in
board/google/gru/gru.cthat mention a delay related to the regulators may be needed, howeverboard_early_init_f()is never called as following can be found in .config:
Quoted 7 lines
Quoted 5 lines
#
CONFIG_BOARD_EARLY_INIT_Fis not setWill you be able to test with just the
rk_setreg(&grf->io_vsel, 1 << 0); and remove the spl_gpio_output/set_pull parts of the last patch before I send a v2?If you send a v2, please include disabling
TPL_BLOBLISTand then the boards should boot in mainline as well as Simon's tree. Thanks!
Do you mean add below code in configs/chromebook_bob_defconfig and configs/chromebook_kevin_defconfig will make this patch set available? # CONFIG_TPL_BLOBLIST is not set
If yes, then I can do that when apply the patches.
Thanks,
- Kever
Quoted 1 line
Quoted 85 lines · Kever Yang
Hi Tom,
Quoted 82 lines · Tom Rini
Quoted 81 lines · Jonas Karlman
Hi Simon,
Quoted 51 lines · Simon Glass
Hi Jonas,
Quoted 41 lines · Jonas Karlman
This is a continuation of an RFC [1] sent back in August.
All Rockchip aarch64 boards, beside bob and kevin, use TPL to initialize DRAM and SPL to load FIT with U-Boot proper and TF-A.
Bob and kevin currently does not use TPL and instead initialize DRAM in SPL and directly after tries to load a FIT with only U-Boot proper.
This series migrate bob and kevin to also use TPL to uniform TPL/SPL use for all Rockchip aarch64 boards.
Features and changes in this series:
- Use of Rockchip aarch64 common bss and stack addresses
- SHA256 checksum/signature check of FIT images in SPL
- Use of dcache to speed up checksum check in SPL
- SDMA use for eMMC access to speed up read/write in U-Boot proper
- FIT location moved from0x40000to0xE0000in SPI flashChanges sinc RFC:
- Include pinctrl props and enable regulators based on DT in SPL
- Drop bob and kevin board specific code from commonrk3399.cPlease note that I do not have any bob or kevin so this has only been compile tested and the original RFC [1] was runtime tested by Simon.
[1] https://patchwork.ozlabs.org/patch/1967517/
Jonas Karlman (12):
rockchip: rk3399: Fix TPL build of bob and kevin
rockchip: rk3399-gru: UseSYS_SPI_U_BOOT_OFFSvalue in offset prop
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
rockchip: rk3399-gru: Use TPL with common bss and stack addresses
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
rockchip: rk3399: Drop commonKconfigoptions already implied
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT
rockchip: rk3399-gru: Enable dcache and signature validation in SPL
rockchip: rk3399-gru: Use SDMA mode to read from eMMC
rockchip: rk3399-gru: Include pinctrl and regulators in SPL
rockchip: rk3399: Drop unneeded bob and kevin board specific codeQuoted 7 lines
arch/arm/dts/rk3399-gru-u-boot.dtsi | 29 ++++++++++++++++++++++++-- arch/arm/dts/rk3399-u-boot.dtsi | 14 +++++++++++-- arch/arm/mach-rockchip/rk3399/Kconfig | 12 ----------- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 +------------------- configs/chromebook_bob_defconfig | 23 ++++++-------------- configs/chromebook_kevin_defconfig | 23 ++++++-------------- 6 files changed, 52 insertions(+), 72 deletions(-)Quoted 5 lines
Thank you for doing this!
I'm not sure if you have access to your own denx tree. If so, kevin and bob are in the sjg lab. If not, you can sign up at sjg.u-boot.org to get access to my tree.
I do not have access to my own tree.
Quoted 2 lines
This series eems to work for me, except for the final commit, which hangs with no output.
Strange, guess we can just skip the last patch, should I send a v2 without the last patch?
I wonder if it is not setting
io_vselor the regulators that is causing an issue. Settingio_vselis probably delayed until U-Boot proper instead of being set very early in SPL (due to no IO-domain driver in SPL), and enable of regulators may happen later in SPL with the last patch applied.There is also some code in
board/google/gru/gru.cthat mention a delay related to the regulators may be needed, howeverboard_early_init_f()is never called as following can be found in .config:#
CONFIG_BOARD_EARLY_INIT_Fis not setWill you be able to test with just the
rk_setreg(&grf->io_vsel, 1 << 0); and remove the spl_gpio_output/set_pull parts of the last patch before I send a v2?
Quoted 6 lines
Quoted 2 lines
If you send a v2, please include disabling
TPL_BLOBLISTand then the boards should boot in mainline as well as Simon's tree. Thanks!Do you mean add below code in configs/chromebook_bob_defconfig and configs/chromebook_kevin_defconfig will make this patch set available? #
CONFIG_TPL_BLOBLISTis not set
If yes, then I can do that when apply the patches.
Yes, thanks!
Signature · 1 line
Tom