When CONFIG_AHAB_BOOT is enabled, wrap the SPL and U-Boot binman nodes in
a CST node so that binman signs them automatically.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Jérémie Dautheribes (Schneider Electric) 
<[email protected]>
---
 arch/arm/dts/imx93-u-boot.dtsi | 54 +++++++++++++++++++++++++++---------------
 1 file changed, 35 insertions(+), 19 deletions(-)

diff --git a/arch/arm/dts/imx93-u-boot.dtsi b/arch/arm/dts/imx93-u-boot.dtsi
index bd970c955cf..569b3ef5d9c 100644
--- a/arch/arm/dts/imx93-u-boot.dtsi
+++ b/arch/arm/dts/imx93-u-boot.dtsi
@@ -47,32 +47,48 @@
                        filename = "flash.bin";
                        pad-byte = <0x00>;
 
-                       spl {
-                               type = "nxp-imx9image";
-                               cfg-path = "spl/u-boot-spl.cfgout";
+#ifdef CONFIG_AHAB_BOOT
+                       nxp-imx93cst@0 {
+                               filename = "spl.signed.bin";
                                args;
-
-                               boot-from = "sd";
-                               soc-type = "IMX9";
-                               append = "mx93a1-ahab-container.img";
-                               container;
-                               image = "a55", "u-boot-spl-ddr.bin", 
"0x2049A000";
+#endif
+                               spl {
+                                       type = "nxp-imx9image";
+                                       cfg-path = "spl/u-boot-spl.cfgout";
+                                       args;
+
+                                       boot-from = "sd";
+                                       soc-type = "IMX9";
+                                       append = "mx93a1-ahab-container.img";
+                                       container;
+                                       image = "a55", "u-boot-spl-ddr.bin", 
"0x2049A000";
+                               };
+#ifdef CONFIG_AHAB_BOOT
                        };
+#endif
 
-                       u-boot {
-                               type = "nxp-imx9image";
-                               cfg-path = "u-boot-container.cfgout";
+#ifdef CONFIG_AHAB_BOOT
+                       nxp-imx93cst@1 {
+                               filename = "u-boot-container.signed.bin";
                                args;
-
-                               boot-from = "sd";
-                               soc-type = "IMX9";
-                               container;
-                               image0 = "a55", "bl31.bin", "0x204E0000";
-                               image1 = "a55", "u-boot.bin", "0x80200000";
+#endif
+                               u-boot {
+                                       type = "nxp-imx9image";
+                                       cfg-path = "u-boot-container.cfgout";
+                                       args;
+
+                                       boot-from = "sd";
+                                       soc-type = "IMX9";
+                                       container;
+                                       image0 = "a55", "bl31.bin", 
"0x204E0000";
+                                       image1 = "a55", "u-boot.bin", 
"0x80200000";
 #if defined(CONFIG_OPTEE)
-                               image2 = "a55", "tee.bin", "0x96000000";
+                                       image2 = "a55", "tee.bin", "0x96000000";
 #endif
+                               };
+#ifdef CONFIG_AHAB_BOOT
                        };
+#endif
                };
        };
 };

-- 
2.55.0

Reply via email to