* [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER
@ 2026-12-01 19:18 Massimo Pegorer
2026-12-01 19:18 ` [PATCH 1/7] mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option Massimo Pegorer
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
This series stems from the observation that the ROCKCHIP_BROM_HELPER
config option lacks xPL phase context. There are 58 Rockchip board
configurations that have all three options: CONFIG_TPL CONFIG_SPL and
CONFIG_ROCKCHIP_BROM_HELPER. In this case, the ROCKCHIP_BROM_HELPER
code is built into both TPL and SPL too, even if it is really needed
in only one of them. The series splits ROCKCHIP_BROM_HELPER into
TPL_ROCKCHIP_BROM_HELPER and SPL_ROCKCHIP_BROM_HELPER, allowing
the back to BootROM code to be included just where needed.
The first five patches add some guards and forced selections to avoid
inconsistent configurations, and drop the SPL_BOOTROM_SUPPORT option
from defconfigs when unneeded. They do not introduce any functional
or binary change.
The sixth patch drops SPL_BOOTROM_SUPPORT dead code for the evb-px5 and
all PX30-based boards' SPL. The seventh patch drops ROCKCHIP_BROM_HELPER
dead code from SPL for some configurations related to the following SoCs:
PX30 (7/7) RK322X (1/1) RK3288 (7/14) RK3328(11/12) RK3368 (1/3) and
RK3399 (29/30).
The SPL size decreases by up to 522 bytes (PX30 SPL).
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
Massimo Pegorer (7):
mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option
mach-rockchip: rk3036: SPL_ROCKCHIP_COMMON_BOARD is not an option
mach-rockchip: px30: force TPL_ROCKCHIP_BACK_TO_BROM option selection
mach-rockchip: rk3036: force SPL_ROCKCHIP_BACK_TO_BROM option selection
mach-rockchip: Kconfig: Select xPL_BOOTROM_SUPPORT only if needed
configs: rockchip: Drop unneeded SPL_BOOTROM_SUPPORT option
mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option
arch/arm/mach-rockchip/Kconfig | 20 ++++++++++++--------
arch/arm/mach-rockchip/Makefile | 4 ++--
configs/evb-px30_defconfig | 1 -
configs/evb-px5_defconfig | 1 -
configs/firefly-px30_defconfig | 1 -
configs/odroid-go2_defconfig | 1 -
configs/px30-core-ctouch2-of10-px30_defconfig | 1 -
configs/px30-core-ctouch2-px30_defconfig | 1 -
configs/px30-core-edimm2.2-px30_defconfig | 1 -
configs/ringneck-px30_defconfig | 1 -
10 files changed, 14 insertions(+), 18 deletions(-)
---
base-commit: 42680af8d15bb49201b298ab5f62058051c13083
change-id: 20261130-brom-4a0cdbce0463
Best regards,
--
Massimo Pegorer <massimo.pegorer+oss@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 2/7] mach-rockchip: rk3036: SPL_ROCKCHIP_COMMON_BOARD " Massimo Pegorer
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
PX30 has its own TPL specific code: due to maximum size constraints,
it is not possible to build TPL using the TPL_ROCKCHIP_COMMON_BOARD
infrastructure. Moreover, selecting TPL_ROCKCHIP_COMMON_BOARD causes
multiple definition errors to arise at build time. Make this option
unavailable when the Rockchip SoC is PX30.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index c1dbcce1e27..a27fd2b9bc0 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -638,7 +638,7 @@ config SPL_ROCKCHIP_COMMON_BOARD
config TPL_ROCKCHIP_COMMON_BOARD
bool "Rockchip TPL common board file"
- depends on TPL
+ depends on TPL && !ROCKCHIP_PX30
help
Rockchip SoCs have similar boot process, prefer to use TPL for DRAM
init and back to bootrom, and SPL as Trust ATF/U-Boot loader. TPL
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] mach-rockchip: rk3036: SPL_ROCKCHIP_COMMON_BOARD is not an option
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
2026-12-01 19:18 ` [PATCH 1/7] mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 3/7] mach-rockchip: px30: force TPL_ROCKCHIP_BACK_TO_BROM option selection Massimo Pegorer
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
RK3036 has its own SPL specific code: it is not possible to build SPL
using the SPL_ROCKCHIP_COMMON_BOARD infrastructure. Moreover, selecting
SPL_ROCKCHIP_COMMON_BOARD causes multiple definition errors to arise at
build time. Make this option unavailable when the Rockchip SoC is RK3036.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index a27fd2b9bc0..ca514f67cff 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -630,7 +630,7 @@ config ROCKCHIP_COMMON_BOARD
config SPL_ROCKCHIP_COMMON_BOARD
bool "Rockchip SPL common board file"
- depends on SPL
+ depends on SPL && !ROCKCHIP_RK3036
help
Rockchip SoCs have similar boot process, SPL is mainly in charge of
load and boot Trust ATF/U-Boot firmware, and DRAM init if there is
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] mach-rockchip: px30: force TPL_ROCKCHIP_BACK_TO_BROM option selection
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
2026-12-01 19:18 ` [PATCH 1/7] mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option Massimo Pegorer
2026-12-01 19:18 ` [PATCH 2/7] mach-rockchip: rk3036: SPL_ROCKCHIP_COMMON_BOARD " Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 4/7] mach-rockchip: rk3036: force SPL_ROCKCHIP_BACK_TO_BROM " Massimo Pegorer
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
Deselecting TPL_ROCKCHIP_BACK_TO_BROM causes TPL compile-time failure
for any build related to PX30 SoC. Indeed, TPL config option is selected
by the ROCKCHIP_PX30 one, and back to BootROM code is mandatory for the
PX30-specific TPL implementation. Thus, force ROCKCHIP_PX30 to select
TPL_ROCKCHIP_BACK_TO_BROM as well, preventing this option from being
deselected.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index ca514f67cff..caa119e79c8 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -9,6 +9,7 @@ config ROCKCHIP_PX30
select SPL
select TPL
select TPL_HAVE_INIT_STACK if TPL
+ select TPL_ROCKCHIP_BACK_TO_BROM
imply SPL_SEPARATE_BSS
imply SPL_SERIAL
imply TPL_SERIAL
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] mach-rockchip: rk3036: force SPL_ROCKCHIP_BACK_TO_BROM option selection
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
` (2 preceding siblings ...)
2026-12-01 19:18 ` [PATCH 3/7] mach-rockchip: px30: force TPL_ROCKCHIP_BACK_TO_BROM option selection Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 5/7] mach-rockchip: Kconfig: Select xPL_BOOTROM_SUPPORT only if needed Massimo Pegorer
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
Deselecting SPL_ROCKCHIP_BACK_TO_BROM causes SPL compile-time failure for
any build related to RK3036 SoC. Indeed, SPL config option is selected by
the ROCKCHIP_RK3036 one, and back to BootROM code is mandatory for the
RK3036-specific SPL implementation. Therefore, force ROCKCHIP_RK3036 to
select SPL_ROCKCHIP_BACK_TO_BROM as well, preventing this option from
being deselected.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index caa119e79c8..0f8a88dbb8d 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -30,6 +30,7 @@ config ROCKCHIP_RK3036
select CPU_V7A
select SUPPORT_SPL
select SPL
+ select SPL_ROCKCHIP_BACK_TO_BROM
imply OF_UPSTREAM
imply USB_FUNCTION_ROCKUSB
imply CMD_ROCKUSB
@@ -602,7 +603,6 @@ config ROCKCHIP_USB_UART
config SPL_ROCKCHIP_BACK_TO_BROM
bool "SPL returns to boot ROM"
- default y if ROCKCHIP_RK3036
select ROCKCHIP_BROM_HELPER
select SPL_BOOTROM_SUPPORT
depends on SPL
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] mach-rockchip: Kconfig: Select xPL_BOOTROM_SUPPORT only if needed
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
` (3 preceding siblings ...)
2026-12-01 19:18 ` [PATCH 4/7] mach-rockchip: rk3036: force SPL_ROCKCHIP_BACK_TO_BROM " Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 6/7] configs: rockchip: Drop unneeded SPL_BOOTROM_SUPPORT option Massimo Pegorer
2026-12-01 19:18 ` [PATCH 7/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option Massimo Pegorer
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
If xPL_FRAMEWORK is not selected, the selection of xPL_BOOTROM_SUPPORT
has no effect on the xPL build process. However, in the Kconfig layout,
the xPL_BOOTROM_SUPPORT config option does not depend on xPL_FRAMEWORK
one, therefore it ends up in the .config file, causing the qconfig.py
tool to report it as used even if it is really not.
The PX30 TPL does not use the TPL_FRAMEWORK infrastructure and returns
to BootROM without relying on the TPL_BOOTROM_SUPPORT code: avoid the
TPL_ROCKCHIP_BACK_TO_BROM config option to select TPL_BOOTROM_SUPPORT
if TPL_FRAMEWORK is not selected.
The RK3036 does not use the SPL_FRAMEWORK infrastructure and returns
to BootROM without relying on the SPL_BOOTROM_SUPPORT code: avoid the
SPL_ROCKCHIP_BACK_TO_BROM config option to select SPL_BOOTROM_SUPPORT
if SPL_FRAMEWORK is not selected.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 0f8a88dbb8d..18ab21ad38e 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -604,7 +604,7 @@ config ROCKCHIP_USB_UART
config SPL_ROCKCHIP_BACK_TO_BROM
bool "SPL returns to boot ROM"
select ROCKCHIP_BROM_HELPER
- select SPL_BOOTROM_SUPPORT
+ select SPL_BOOTROM_SUPPORT if SPL_FRAMEWORK
depends on SPL
help
Rockchip SoCs have the ability to load a second loader binary
@@ -615,7 +615,7 @@ config TPL_ROCKCHIP_BACK_TO_BROM
bool "TPL returns to boot ROM"
default y
select ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066
- select TPL_BOOTROM_SUPPORT
+ select TPL_BOOTROM_SUPPORT if TPL_FRAMEWORK
depends on TPL
help
Rockchip SoCs have the ability to load a second loader binary
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] configs: rockchip: Drop unneeded SPL_BOOTROM_SUPPORT option
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
` (4 preceding siblings ...)
2026-12-01 19:18 ` [PATCH 5/7] mach-rockchip: Kconfig: Select xPL_BOOTROM_SUPPORT only if needed Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
2026-12-01 19:18 ` [PATCH 7/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option Massimo Pegorer
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
Configurations that do not have SPL_ROCKCHIP_BACK_TO_BROM do not need
SPL_BOOTROM_SUPPORT code: in this case, the spl_boot_device() does not
return BOOT_DEVICE_BOOTROM, and the board_boot_order() does not allow
BOOT_DEVICE_BOOTROM to be put in the spl_boot_list in any other way.
This means SPL_BOOTROM_SUPPORT code is dead code.
Drop the SPL_BOOTROM_SUPPORT option from evb-px5 and from all PX30-based
boards defconfigs. Commit 259afb16922e ("rockchip: px5: update defconfig
for TPL/SPL") added it to the evb-px5 defconfig. The evb-px30 one has
included it since its first version, which followed previous commit.
Subsequently, all other PX30-based boards defconfigs probably inherited
it blindly.
On the other hand, if the SPL_BOOTROM_SUPPORT code is built in, it causes
the SPL_ROCKCHIP_BROM_HELPER code to be needed too, or build-time errors
will arise. That is, further dead code if SPL_ROCKCHIP_BACK_TO_BROM is
not selected.
The SPL size decreases by 142 bytes.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
configs/evb-px30_defconfig | 1 -
configs/evb-px5_defconfig | 1 -
configs/firefly-px30_defconfig | 1 -
configs/odroid-go2_defconfig | 1 -
configs/px30-core-ctouch2-of10-px30_defconfig | 1 -
configs/px30-core-ctouch2-px30_defconfig | 1 -
configs/px30-core-edimm2.2-px30_defconfig | 1 -
configs/ringneck-px30_defconfig | 1 -
8 files changed, 8 deletions(-)
diff --git a/configs/evb-px30_defconfig b/configs/evb-px30_defconfig
index afc45308bee..ae37e1f8f5f 100644
--- a/configs/evb-px30_defconfig
+++ b/configs/evb-px30_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-evb.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
# CONFIG_TPL_FRAMEWORK is not set
diff --git a/configs/evb-px5_defconfig b/configs/evb-px5_defconfig
index af00e986b64..b2c98a9e28b 100644
--- a/configs/evb-px5_defconfig
+++ b/configs/evb-px5_defconfig
@@ -42,7 +42,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-px5-evb.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_MAX_SIZE=0x40000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
diff --git a/configs/firefly-px30_defconfig b/configs/firefly-px30_defconfig
index 316f960d32e..456e28548a9 100644
--- a/configs/firefly-px30_defconfig
+++ b/configs/firefly-px30_defconfig
@@ -24,7 +24,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-firefly.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
# CONFIG_TPL_FRAMEWORK is not set
diff --git a/configs/odroid-go2_defconfig b/configs/odroid-go2_defconfig
index dfdea66cd70..c189dc74cf4 100644
--- a/configs/odroid-go2_defconfig
+++ b/configs/odroid-go2_defconfig
@@ -33,7 +33,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3326-odroid-go2.dtb"
CONFIG_BOARD_LATE_INIT=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x40000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_I2C=y
CONFIG_SPL_POWER=y
diff --git a/configs/px30-core-ctouch2-of10-px30_defconfig b/configs/px30-core-ctouch2-of10-px30_defconfig
index 06b60483841..eb20d1f0b7b 100644
--- a/configs/px30-core-ctouch2-of10-px30_defconfig
+++ b/configs/px30-core-ctouch2-of10-px30_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-engicam-px30-core-ctouch2-of10.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
# CONFIG_TPL_FRAMEWORK is not set
diff --git a/configs/px30-core-ctouch2-px30_defconfig b/configs/px30-core-ctouch2-px30_defconfig
index aa6e44f5348..18cd31479fb 100644
--- a/configs/px30-core-ctouch2-px30_defconfig
+++ b/configs/px30-core-ctouch2-px30_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-engicam-px30-core-ctouch2.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
# CONFIG_TPL_FRAMEWORK is not set
diff --git a/configs/px30-core-edimm2.2-px30_defconfig b/configs/px30-core-edimm2.2-px30_defconfig
index fcc27ce8761..f9c35bc3144 100644
--- a/configs/px30-core-edimm2.2-px30_defconfig
+++ b/configs/px30-core-edimm2.2-px30_defconfig
@@ -23,7 +23,6 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-engicam-px30-core-edimm2.2.dtb"
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_ATF=y
# CONFIG_TPL_FRAMEWORK is not set
diff --git a/configs/ringneck-px30_defconfig b/configs/ringneck-px30_defconfig
index 9979b60a9ba..34e2ff06f5a 100644
--- a/configs/ringneck-px30_defconfig
+++ b/configs/ringneck-px30_defconfig
@@ -28,7 +28,6 @@ CONFIG_MISC_INIT_R=y
CONFIG_SPL_MAX_SIZE=0x20000
CONFIG_SPL_PAD_TO=0x38000
CONFIG_SPL_BOARD_INIT=y
-CONFIG_SPL_BOOTROM_SUPPORT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_SPL_SYS_MALLOC=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
` (5 preceding siblings ...)
2026-12-01 19:18 ` [PATCH 6/7] configs: rockchip: Drop unneeded SPL_BOOTROM_SUPPORT option Massimo Pegorer
@ 2026-12-01 19:18 ` Massimo Pegorer
6 siblings, 0 replies; 8+ messages in thread
From: Massimo Pegorer @ 2026-12-01 19:18 UTC (permalink / raw)
To: u-boot, Quentin Schulz, Jonas Karlman
Cc: Tom Rini, Ilias Apalodimas, Johan Jonker, Massimo Pegorer
There are 58 Rockchip board configurations that have all three options:
CONFIG_TPL CONFIG_SPL and CONFIG_ROCKCHIP_BROM_HELPER. In this case, the
ROCKCHIP_BROM_HELPER code is built into both TPL and SPL too, even if it
is really needed in only one of them. In all of these configurations only
the TPL needs to return to BootROM: TPL_ROCKCHIP_BACK_TO_BROM is selected
while SPL_ROCKCHIP_BACK_TO_BROM is not.
Split the current ROCKCHIP_BROM_HELPER option into TPL and SPL specific
ones, and rely on the appropriate one based on the built phase context.
There were 64 configurations with ROCKCHIP_BROM_HELPER. Now there are 58
with TPL_ROCKCHIP_BROM_HELPER only, and 6 with SPL_ROCKCHIP_BROM_HELPER
only.
For the 58 configurations with TPL_ROCKCHIP_BROM_HELPER only, the SPL
size decreases by up to 380 bytes.
Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
arch/arm/mach-rockchip/Kconfig | 9 ++++++---
arch/arm/mach-rockchip/Makefile | 4 ++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 18ab21ad38e..92183db9cdd 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -603,7 +603,7 @@ config ROCKCHIP_USB_UART
config SPL_ROCKCHIP_BACK_TO_BROM
bool "SPL returns to boot ROM"
- select ROCKCHIP_BROM_HELPER
+ select SPL_ROCKCHIP_BROM_HELPER
select SPL_BOOTROM_SUPPORT if SPL_FRAMEWORK
depends on SPL
help
@@ -614,7 +614,7 @@ config SPL_ROCKCHIP_BACK_TO_BROM
config TPL_ROCKCHIP_BACK_TO_BROM
bool "TPL returns to boot ROM"
default y
- select ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066
+ select TPL_ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066
select TPL_BOOTROM_SUPPORT if TPL_FRAMEWORK
depends on TPL
help
@@ -686,7 +686,10 @@ config ROCKCHIP_SPL_RESERVE_IRAM
address is in IRAM and may overlay with SPL text area if not
reserved.
-config ROCKCHIP_BROM_HELPER
+config SPL_ROCKCHIP_BROM_HELPER
+ bool
+
+config TPL_ROCKCHIP_BROM_HELPER
bool
config SPL_ROCKCHIP_EARLYRETURN_TO_BROM
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index d3bc0689f89..e5149858eb7 100644
--- a/arch/arm/mach-rockchip/Makefile
+++ b/arch/arm/mach-rockchip/Makefile
@@ -7,9 +7,9 @@
# this may have entered from ATF with the stack-pointer pointing to
# inaccessible/protected memory (and the bootrom-helper assumes that
# the stack-pointer is valid before switching to the U-Boot stack).
-obj-spl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o
+obj-spl-$(CONFIG_SPL_ROCKCHIP_BROM_HELPER) += bootrom.o
obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o spl_common.o
-obj-tpl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o
+obj-tpl-$(CONFIG_TPL_ROCKCHIP_BROM_HELPER) += bootrom.o
obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o spl_common.o
obj-tpl-$(CONFIG_ROCKCHIP_PX30) += px30-board-tpl.o spl_common.o
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-12-01 19:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 19:18 [PATCH 0/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER Massimo Pegorer
2026-12-01 19:18 ` [PATCH 1/7] mach-rockchip: px30: TPL_ROCKCHIP_COMMON_BOARD is not an option Massimo Pegorer
2026-12-01 19:18 ` [PATCH 2/7] mach-rockchip: rk3036: SPL_ROCKCHIP_COMMON_BOARD " Massimo Pegorer
2026-12-01 19:18 ` [PATCH 3/7] mach-rockchip: px30: force TPL_ROCKCHIP_BACK_TO_BROM option selection Massimo Pegorer
2026-12-01 19:18 ` [PATCH 4/7] mach-rockchip: rk3036: force SPL_ROCKCHIP_BACK_TO_BROM " Massimo Pegorer
2026-12-01 19:18 ` [PATCH 5/7] mach-rockchip: Kconfig: Select xPL_BOOTROM_SUPPORT only if needed Massimo Pegorer
2026-12-01 19:18 ` [PATCH 6/7] configs: rockchip: Drop unneeded SPL_BOOTROM_SUPPORT option Massimo Pegorer
2026-12-01 19:18 ` [PATCH 7/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option Massimo Pegorer
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.