The AM62x family (TI EVMs, phytec phycore, toradex verdin) ships two or three mutually-exclusive tifsstub variants per tispl.bin FIT image (tifsstub-hs, tifsstub-fs, tifsstub-gp), all assigned the same load address 0x9dc00000. The current platform code loads every variant and discards the wrong ones at runtime by zeroing *p_size in board_fit_image_post_process() (arch/arm/mach-k3/r5/common.c).
This runtime-filter approach has become a friction point. An earlier attempt to add FIT-image load-address overlap detection to mkimage flagged the shared 0x9dc00000 as an apparent conflict, and the workaround in that series was to shift each tifsstub by 64KB increments. Bryan Brattlof reviewed that change at the time [1] and pointed out that the real semantics are "load one of three at runtime", and that moving the binaries was not necessarily safe given downstream IPC assumptions about the fixed load address. The series was ultimately reverted upstream, which leaves the underlying question open: any future static FIT validator needs a way to understand that these three images do not actually collide. The same point is being discussed at the spec level in flat-image-tree issue #32 [2], where a "mutually-exclusive-group" property has been floated to express runtime-resolved overlaps to static tooling. This series fixes the problem structurally without moving any binaries and without a spec extension. Each board's binman dtsi is updated so the tispl.bin FIT carries one configuration per security state (conf-hs-se, conf-hs-fs, conf-gp), each containing only the matching tifsstub. board_fit_config_name_match() in each affected board reads the SoC security state via get_device_type() and selects the correct configuration up front, via a shared helper k3_fit_config_match_security_state() added in arch/arm/mach-k3/ common.c. Each FIT configuration ends up with exactly one tifsstub at 0x9dc00000, so the overlap goes away from any static validator's perspective and no platform-specific runtime knowledge is needed to pick the right firmware. Series ordering is intentional and bisectable. Patch 1 introduces the helper, migrates the TI EVMs, and leaves the runtime filter in place. Phytec phycore and toradex verdin boards still use their old single-config dtsi at this point, and the runtime filter continues to do the right thing for them in the meantime. Patch 2 migrates the phytec phycore-am62 SoMs. Patch 3 migrates the toradex Verdin AM62 modules; their previous board_fit_config_name_match() returned 0 unconditionally, which after the dtsi split would have selected the first listed configuration regardless of silicon and broken HS-SE parts, so this patch is also a latent-bug fix on top of the migration. Patch 4 drops the now-dead runtime filter. Boot tested on AM625 SK GP silicon end-to-end through TFA, OP-TEE, A53 SPL, U-Boot proper, and Linux 6.5. The two "Skipping authentication on GP device" messages in the SPL banner confirm only the GP tifsstub variant is present in the selected FIT configuration; loading any HS variant on GP silicon would fail TIFS authentication before reaching that point. Building (R5 SPL + A53 SPL + U-Boot proper) was verified clean against this restructured series on am62x_evm, phycore_am62x, and verdin-am62 defconfigs. Testing on HS-FS and HS-SE silicon would be very welcome; I do not have either part. [1] https://lore.kernel.org/u-boot/[email protected]/ [2] https://github.com/open-source-firmware/flat-image-tree/issues/32 Aristo Chen (4): arm: k3: select tifsstub via board_fit_config_name_match board: phytec: phycore-am62: select tifsstub via FIT config board: toradex: verdin-am62: select tifsstub via FIT config arm: k3: drop redundant tifsstub runtime filter arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 42 ++++++++++--- arch/arm/dts/k3-am625-sk-binman.dtsi | 61 ++++++++++++++----- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 42 ++++++++++--- arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 15 +++-- arch/arm/dts/k3-am62a-sk-binman.dtsi | 28 ++++++--- arch/arm/dts/k3-am62p-sk-binman.dtsi | 28 ++++++--- .../dts/k3-am62p5-verdin-wifi-dev-binman.dtsi | 15 +++-- arch/arm/mach-k3/common.c | 27 ++++++++ arch/arm/mach-k3/common.h | 10 --- arch/arm/mach-k3/include/mach/hardware.h | 11 ++++ arch/arm/mach-k3/r5/common.c | 14 +---- board/phytec/phycore_am62ax/phycore-am62ax.c | 8 +++ board/phytec/phycore_am62x/phycore-am62x.c | 8 +++ board/ti/am62ax/evm.c | 8 +++ board/ti/am62px/evm.c | 8 +++ board/ti/am62x/evm.c | 8 +++ board/toradex/verdin-am62/verdin-am62.c | 3 +- board/toradex/verdin-am62p/verdin-am62p.c | 3 +- 18 files changed, 251 insertions(+), 88 deletions(-) -- 2.43.0

