]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: toradex: verdin-am62: select tifsstub via FIT config
authorAristo Chen <aristo.chen@canonical.com>
Tue, 23 Jun 2026 14:15:17 +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 Verdin AM62 and AM62P
SoMs at FIT config selection time.

The k3-am625-verdin-wifi-dev-binman.dtsi and
k3-am62p5-verdin-wifi-dev-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 verdin board file forwards to
the shared K3 helper. The previous implementation returned 0
unconditionally which matched the first listed configuration
regardless of the actual silicon, which after the dtsi split would
load the wrong tifsstub variant on HS-SE parts.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
arch/arm/dts/k3-am62p5-verdin-wifi-dev-binman.dtsi
board/toradex/verdin-am62/verdin-am62.c
board/toradex/verdin-am62p/verdin-am62p.c

index e72065209f28e78e74b63584b14190a3a6a0dfd7..35b7f8b256e9d072b13608306a0ffb0e74e8ea9c 100644 (file)
                        };
 
                        configurations {
-                               default = "conf-0";
+                               default = "conf-hs-fs";
 
-                               conf-0 {
-                                       description = "k3-am625-verdin-wifi-dev";
+                               conf-hs-fs {
+                                       description = "k3-am625-verdin-wifi-dev-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-fs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am625-verdin-wifi-dev-hs-se";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-hs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-gp {
+                                       description = "k3-am625-verdin-wifi-dev-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-verdin-wifi-dev";
+                               conf-hs-fs {
+                                       description = "k3-am625-verdin-wifi-dev-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-fs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am625-verdin-wifi-dev-hs-se";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-hs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-gp {
+                                       description = "k3-am625-verdin-wifi-dev-gp";
                                        firmware = "atf";
-                                       loadables = "tee", "tifsstub-hs", "tifsstub-fs",
-                                                   "tifsstub-gp", "dm", "spl";
+                                       loadables = "tee", "tifsstub-gp", "dm", "spl";
                                        fdt = "fdt-0";
                                };
                        };
index 2682ba13afb84e1c1bdc897be6db53deb240d67d..307cac5ebc7ede87b535507a16c27e1188d77eef 100644 (file)
                        };
 
                        configurations {
-                               default = "conf-0";
+                               default = "conf-hs-fs";
 
-                               conf-0 {
-                                       description = "k3-am62p5-verdin-wifi-dev";
+                               conf-hs-fs {
+                                       description = "k3-am62p5-verdin-wifi-dev-hs-fs";
+                                       firmware = "atf";
+                                       loadables = "tee", "tifsstub-fs", "dm", "spl";
+                                       fdt = "fdt-0";
+                               };
+                               conf-hs-se {
+                                       description = "k3-am62p5-verdin-wifi-dev-hs-se";
                                        firmware = "atf";
-                                       loadables = "tee", "tifsstub-hs", "tifsstub-fs",
-                                                   "dm", "spl";
+                                       loadables = "tee", "tifsstub-hs", "dm", "spl";
                                        fdt = "fdt-0";
                                };
                        };
index 26af1af2069fac278a8d03f6a779160113d280ff..a174cc43adeac344ff7fd3bb4cb76003014e14fa 100644 (file)
@@ -12,6 +12,7 @@
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <k3-ddrss.h>
 #include <spl.h>
@@ -57,12 +58,10 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
        return 0x9C000000;
 }
 
-#if defined(CONFIG_SPL_LOAD_FIT)
 int board_fit_config_name_match(const char *name)
 {
-       return 0;
+       return k3_fit_config_match_security_state(name);
 }
-#endif
 
 #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
index ec7775e06a7e4211fc3424e13418c64755029164..1e7fcc9fd9dabee71a75f873f700ed40c78dbc85 100644 (file)
@@ -14,6 +14,7 @@
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdt_support.h>
+#include <image.h>
 #include <init.h>
 #include <k3-ddrss.h>
 #include <spl.h>
@@ -83,12 +84,10 @@ int dram_init_banksize(void)
        return ret;
 }
 
-#if IS_ENABLED(CONFIG_SPL_LOAD_FIT)
 int board_fit_config_name_match(const char *name)
 {
-       return 0;
+       return k3_fit_config_match_security_state(name);
 }
-#endif
 
 #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)