]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: phytec: phycore-am62: select tifsstub via FIT config
authorAristo Chen <aristo.chen@canonical.com>
Tue, 23 Jun 2026 14:15:16 +0000 (14:15 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jul 2026 18:03:40 +0000 (12:03 -0600)
Use the k3_fit_config_match_security_state() helper introduced in the
earlier "arm: k3: select tifsstub via board_fit_config_name_match"
patch to pick the right tifsstub variant on phycore AM62x and AM62Ax
SoMs at FIT config selection time.

The k3-am625-phycore-som-binman.dtsi and
k3-am62a-phycore-som-binman.dtsi FIT images are split into
per-security-state configurations (conf-hs-se, conf-hs-fs), and
board_fit_config_name_match() in each phycore board file forwards to
the shared K3 helper.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
arch/arm/dts/k3-am625-phycore-som-binman.dtsi
arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
board/phytec/phycore_am62ax/phycore-am62ax.c
board/phytec/phycore_am62x/phycore-am62x.c

index 0499c719396735adc5d02cb749fb6c0944cc023c..6d57a5d9ffa845df6aaacd2276c714801fa7560a 100644 (file)
                        };
 
                        configurations {
-                               default = "conf-0";
+                               default = "conf-hs-fs";
 
-                               conf-0 {
-                                       description = "k3-am625-phyboard-lyra-rdk";
+                               conf-hs-fs {
+                                       description = "k3-am625-phyboard-lyra-rdk-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-fs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am625-phyboard-lyra-rdk-hs-se";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-hs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-gp {
+                                       description = "k3-am625-phyboard-lyra-rdk-gp";
                                        firmware = "atf";
-                                       loadables = "tee", "tifsstub-hs", "tifsstub-fs",
-                                                   "tifsstub-gp", "dm", "spl";
+                                       loadables = "tee", "tifsstub-gp", "dm", "spl";
                                        fdt = "fdt-0";
                                };
                        };
                        };
 
                        configurations {
-                               default = "conf-0";
+                               default = "conf-hs-fs";
 
-                               conf-0 {
-                                       description = "k3-am625-phyboard-lyra-rdk";
+                               conf-hs-fs {
+                                       description = "k3-am625-phyboard-lyra-rdk-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-fs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am625-phyboard-lyra-rdk-hs-se";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-hs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-gp {
+                                       description = "k3-am625-phyboard-lyra-rdk-gp";
                                        firmware = "atf";
-                                       loadables = "tee", "tifsstub-hs", "tifsstub-fs",
-                                                   "tifsstub-gp", "dm", "spl";
+                                       loadables = "tee", "tifsstub-gp", "dm", "spl";
                                        fdt = "fdt-0";
                                };
                        };
index 6f82a40908fe2d4bcc8ed46a9469e00eb4dc02ad..cdc9a100a04ea1b540c436197cc9716191e90aae 100644 (file)
                        };
 
                        configurations {
-                               default = "conf-0";
+                               default = "conf-hs-fs";
 
-                               conf-0 {
-                                       description = "k3-am62a7-phyboard-lyra-rdk";
+                               conf-hs-fs {
+                                       description = "k3-am62a7-phyboard-lyra-rdk-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "dm", "spl", "tifsstub-fs";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am62a7-phyboard-lyra-rdk-hs-se";
                                        firmware = "atf";
-                                       loadables = "tee", "dm", "spl",
-                                       "tifsstub-hs", "tifsstub-fs";
+                                       loadables = "tee", "dm", "spl", "tifsstub-hs";
                                        fdt = "fdt-0";
                                };
                        };
index 3e1c4102cc18988f86cffe4d87ec095fbc1333a2..b22ffe9072fa79b6e0d25bd75ce82666e5101311 100644 (file)
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <spl.h>
 #include <fdt_support.h>
+#include <image.h>
 
 #include "../common/am6_som_detection.h"
 
@@ -57,3 +58,8 @@ void spl_board_init(void)
        dram_init_banksize();
 }
 #endif
+
+int board_fit_config_name_match(const char *name)
+{
+       return k3_fit_config_match_security_state(name);
+}
index 6df521d789f5c59a3c6154f138e43b5d438574e7..376379767cfc4805d3821f23ce75aa0b05a14ebb 100644 (file)
@@ -9,6 +9,7 @@
 #include <spl.h>
 #include <asm/arch/k3-ddr.h>
 #include <fdt_support.h>
+#include <image.h>
 
 #include "phycore-ddr-data.h"
 #include "../common/k3/k3_ddrss_patch.h"
@@ -237,3 +238,8 @@ void spl_board_init(void)
               MCU_CTRL_DEVICE_CLKOUT_32K_CTRL);
 }
 #endif
+
+int board_fit_config_name_match(const char *name)
+{
+       return k3_fit_config_match_security_state(name);
+}