arm: dts: k3: binman: Fix DM firmware selection
authorAndrew Davis <afd@ti.com>
Fri, 25 Apr 2025 22:54:03 +0000 (17:54 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 2 May 2025 21:32:45 +0000 (15:32 -0600)
Just like TF-A and OP-TEE, the documentation states a custom path for DM
can be provided at build time by setting TI_DM. This should then set
ti-dm-path which updates ti-dm node filenames in binman.

Two issues prevent this from functioning for most K3 boards. One is when
then DM firmware name is inside a blob-ext node instead of a ti-dm node.

The second is when the filename in the ti-dm node is a pointer to a
blob-ext node. In this case even though the filename is updated, the
filename in the blob-ext is not, so build can fail if the default
file in the blob-ext cannot be found, even if the updated ti-dm file
does exist.

Fix both of these for all K3 by removing any indirect ti-dm nodes and
making sure all DM nodes are labeled with "ti-dm".

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
17 files changed:
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
arch/arm/dts/k3-am625-phycore-som-binman.dtsi
arch/arm/dts/k3-am625-sk-binman.dtsi
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
arch/arm/dts/k3-am62a-sk-binman.dtsi
arch/arm/dts/k3-am62p-sk-binman.dtsi
arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
arch/arm/dts/k3-am69-sk-u-boot.dtsi
arch/arm/dts/k3-j7200-binman.dtsi
arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
arch/arm/dts/k3-j721e-binman.dtsi
arch/arm/dts/k3-j721s2-binman.dtsi
arch/arm/dts/k3-j722s-binman.dtsi
arch/arm/dts/k3-j742s2-evm-u-boot.dtsi
arch/arm/dts/k3-j784s4-binman.dtsi
arch/arm/dts/k3-j784s4-evm-u-boot.dtsi

index a067b0b..01b6a8e 100644 (file)
 #define AM625_BEAGLEPLAY_DTB "dts/upstream/src/arm64/ti/k3-am625-beagleplay.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-               };
-       };
-
        tifsstub-gp {
                filename = "tifsstub.bin_gp";
                ti-secure-rom {
                                        os = "DM";
                                        load = <0x89000000>;
                                        entry = <0x89000000>;
-                                       blob-ext {
-                                               filename = "ti-dm.bin";
+                                       ti-dm {
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
index 4a65427..9b536d6 100644 (file)
 #define AM625_PHYBOARD_LYRA_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-               };
-       };
-
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                                content = <&dm>;
                                                keyfile = "custMpk.pem";
                                        };
-                                       dm: blob-ext {
-                                               filename = "ti-dm.bin";
+                                       dm: ti-dm {
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
                fit {
                        images {
                                dm {
-                                       blob-ext {
-                                               filename = "ti-dm.bin";
+                                       ti-dm {
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
index 534eb14..cc619f5 100644 (file)
 #define AM625_SK_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
 
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 0e61889..5a8788b 100644 (file)
 #define VERDIN_AM62_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-               };
-       };
-
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
 
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
index 325702e..1871926 100644 (file)
 #define AM62A7_PHYBOARD_LYRA_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
                                };
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 2a8c260..ed97354 100644 (file)
 #define AM62A7_SK_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
                                };
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 797644a..8216add 100644 (file)
 #define AM62PX_SK_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/am62pxx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
        tifsstub-hs {
                filename = "tifsstub.bin_hs";
                ti-secure-rom {
                                        };
 
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/am62pxx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 6c52038..f1666f1 100644 (file)
 #define BEAGLEY_AI_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        ti-spl {
                insert-template = <&ti_spl_template>;
 
                                        };
 
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 2f11950..fc68608 100644 (file)
 #else // CONFIG_ARM64
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tispl {
                insert-template = <&ti_spl>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot {
 
        tispl-unsigned {
                insert-template = <&ti_spl_unsigned>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot-unsigned {
index 423badd..47a4cde 100644 (file)
 #define J7200_EVM_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
        ti-spl {
                insert-template = <&ti_spl_template>;
 
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
                        images {
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 8cefa39..6a773c1 100644 (file)
 #define J721E_BBAI64_DTB "dts/upstream/src/arm64/ti/k3-j721e-beagleboneai64.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-               };
-       };
-
        ti-spl_unsigned {
                filename = "tispl.bin_unsigned";
                pad-byte = <0xff>;
                                        os = "DM";
                                        load = <0x89000000>;
                                        entry = <0x89000000>;
-                                       blob-ext {
-                                               filename = "ti-dm.bin";
+                                       ti-dm {
+                                               filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
                                        };
                                };
 
index 0d60729..6adfab1 100644 (file)
 #define J721E_EVM_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
        ti-spl {
                insert-template = <&ti_spl_template>;
 
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
                        images {
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index d121d8c..73af184 100644 (file)
 #define J721S2_EVM_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-               blob-ext {
-                       filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
        ti-spl {
                insert-template = <&ti_spl_template>;
 
                                                keyfile = "custMpk.pem";
                                        };
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
                        images {
                                dm {
                                        ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index 6b52116..8f14713 100644 (file)
 #define J722S_EVM_DTB "u-boot.dtb"
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        ti-spl {
                insert-template = <&ti_spl_template>;
 
                                        };
 
                                        dm: ti-dm {
-                                               filename = "ti-dm.bin";
+                                               filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                               optional;
                                        };
                                };
 
index ede5d6e..b1d79a3 100644 (file)
 #else // CONFIG_ARM64
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/j742s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tispl {
                insert-template = <&ti_spl>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j742s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot {
 
        tispl-unsigned {
                insert-template = <&ti_spl_unsigned>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j742s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot-unsigned {
index 0553825..cb1fbc6 100644 (file)
                                                keyfile = "custMpk.pem";
                                        };
 
-                                       dm: blob-ext {
-                                               filename = "ti-dm.bin";
+                                       dm: ti-dm {
+                                               optional;
                                        };
                                };
 
                fit {
                        images {
                                dm {
-                                       blob-ext {
-                                               filename = "ti-dm.bin";
+                                       ti-dm {
+                                               optional;
                                        };
                                };
 
index 8a60d7c..cc0b562 100644 (file)
 #else // CONFIG_ARM64
 
 &binman {
-       ti-dm {
-               filename = "ti-dm.bin";
-
-               blob-ext {
-                       filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
-                       optional;
-               };
-       };
-
        tispl {
                insert-template = <&ti_spl>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot {
 
        tispl-unsigned {
                insert-template = <&ti_spl_unsigned>;
+
+               fit {
+                       images {
+                               dm {
+                                       ti-dm {
+                                               filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+                                       };
+                               };
+                       };
+               };
        };
 
        u-boot-unsigned {