Hi Johan,
On 12/17/25 8:59 AM, Johan Jonker wrote:
On 12/16/25 12:26, Quentin Schulz wrote:
From: Quentin Schulz <[email protected]>
I believe (hope) that the new SoCs should now have this fixed and not
require the "hack" implemented in rkspi format which almost doubles the
size of TPL+SPL (idbloader.img).
It's known to be fixed on RK3566/RK3568, RK3576 and RK3588(S) (according
to the DTS setting the mkimage format for the SPI's idbloader.img to
rksd explicitly).
Since I do not have any board with a bootable SPI flash except on RK3399
where this work-around is required, I simply invert the logic by having
rkspi explicitly set for all SoCs that didn't and remove rksd from SoCs
that did. It doesn't mean that the SoC actually requires rkspi format,
just that it's been the case until now (maybe because nobody tested).
Signed-off-by: Quentin Schulz <[email protected]>
---
arch/arm/dts/px30-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3036-u-boot.dtsi | 13 +++++++++++++
arch/arm/dts/rk3066a-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3128-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3188-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk322x-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3288-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3308-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3326-u-boot.dtsi | 1 -
arch/arm/dts/rk3328-u-boot.dtsi | 1 -
arch/arm/dts/rk3368-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3399-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk3528-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rk356x-u-boot.dtsi | 1 -
arch/arm/dts/rk3576-u-boot.dtsi | 1 -
arch/arm/dts/rk3588s-u-boot.dtsi | 1 -
arch/arm/dts/rockchip-u-boot.dtsi | 1 -
arch/arm/dts/rv1108-u-boot.dtsi | 12 ++++++++++++
arch/arm/dts/rv1126-u-boot.dtsi | 12 ++++++++++++
19 files changed, 157 insertions(+), 6 deletions(-)
diff --git a/arch/arm/dts/px30-u-boot.dtsi b/arch/arm/dts/px30-u-boot.dtsi
index 2f726b0aaba..7385de7d6ae 100644
--- a/arch/arm/dts/px30-u-boot.dtsi
+++ b/arch/arm/dts/px30-u-boot.dtsi
@@ -27,6 +27,18 @@
};
};
+#ifdef CONFIG_SPL
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ simple-bin-spi {
+ mkimage {
+ args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
+ };
+ };
+};
+#endif
+#endif
+
&otp {
bootph-some-ram;
};
diff --git a/arch/arm/dts/rk3036-u-boot.dtsi b/arch/arm/dts/rk3036-u-boot.dtsi
index 41ac054b81e..988287e2f12 100644
--- a/arch/arm/dts/rk3036-u-boot.dtsi
+++ b/arch/arm/dts/rk3036-u-boot.dtsi
@@ -4,3 +4,16 @@
*/
#include "rockchip-u-boot.dtsi"
+
+#ifdef CONFIG_SPL
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ simple-bin-spi {
+ mkimage {
+ args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
+ };
+ };
+};
+#endif
+#endif
+
diff --git a/arch/arm/dts/rk3066a-u-boot.dtsi b/arch/arm/dts/rk3066a-u-boot.dtsi
index d99db7853b5..4272bf4a8e2 100644
--- a/arch/arm/dts/rk3066a-u-boot.dtsi
+++ b/arch/arm/dts/rk3066a-u-boot.dtsi
@@ -3,6 +3,18 @@
#include "rockchip-u-boot.dtsi"
#include "rk3xxx-u-boot.dtsi"
+#ifdef CONFIG_SPL
+#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
+&binman {
+ simple-bin-spi {
+ mkimage {
+ args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
+ };
+ };
+};
I think that we shouldn't add extra functionality to old SOCs that nobody is
able to verify on real boards anymore.
Just skip this for rk30xx/rk31xx except maybe for rk3288 if someone still has
hardware.
I'm not adding extra functionality to old SoCs, it's already there and
I'm just moving stuff around. See the discussion in the other thread
with Jonas and the last paragraph in the commit log. This is a zero-sum
patch.
Cheers,
Quentin