Skip to contentSkip to conversation

arm: dts: k3: binman: Fix DM firmware selection

PATCH In review Andrew Davis 4 participants 5 messages Apr 25, 2025 – May 3, 2025 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: k3: binman: Fix DM firmware selection

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".

---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi  | 11 ++-----
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 15 +++-------
 arch/arm/dts/k3-am625-sk-binman.dtsi          | 14 +++------
 .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  | 11 ++-----
 arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 14 +++------
 arch/arm/dts/k3-am62a-sk-binman.dtsi          | 14 +++------
 arch/arm/dts/k3-am62p-sk-binman.dtsi          | 11 ++-----
 arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi  | 12 ++------
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           | 29 +++++++++++++------
 arch/arm/dts/k3-j7200-binman.dtsi             | 13 +++------
 .../dts/k3-j721e-beagleboneai64-u-boot.dtsi   | 11 ++-----
 arch/arm/dts/k3-j721e-binman.dtsi             | 13 +++------
 arch/arm/dts/k3-j721s2-binman.dtsi            | 13 +++------
 arch/arm/dts/k3-j722s-binman.dtsi             | 12 ++------
 arch/arm/dts/k3-j742s2-evm-u-boot.dtsi        | 29 +++++++++++++------
 arch/arm/dts/k3-j784s4-binman.dtsi            |  8 ++---
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        | 29 +++++++++++++------
 17 files changed, 104 insertions(+), 155 deletions(-)
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi +2 -9
index a067b0ba354..01b6a8e417c 100644
@@ -71,13 +71,6 @@
 #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 {
@@ -153,8 +146,8 @@
 					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";
 					};
 				};
 
arch/arm/dts/k3-am625-phycore-som-binman.dtsi +4 -11
index 4a65427e877..9b536d679af 100644
@@ -158,13 +158,6 @@
 #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 {
@@ -270,8 +263,8 @@
 						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";
 					};
 				};
 
@@ -418,8 +411,8 @@
 		fit {
 			images {
 				dm {
-					blob-ext {
-						filename = "ti-dm.bin";
+					ti-dm {
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
 					};
 				};
 
arch/arm/dts/k3-am625-sk-binman.dtsi +4 -10
index 534eb14795b..cc619f5920e 100644
@@ -156,14 +156,6 @@
 #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 {
@@ -270,7 +262,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -397,7 +390,8 @@
 
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +2 -9
index 0e6188907e4..5a8788b227b 100644
@@ -144,13 +144,6 @@
 #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 {
@@ -257,7 +250,7 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
 					};
 				};
 
@@ -380,7 +373,7 @@
 
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
 					};
 				};
 
arch/arm/dts/k3-am62a-phycore-som-binman.dtsi +4 -10
index 325702ed6e0..1871926c207 100644
@@ -164,14 +164,6 @@
 #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 {
@@ -276,7 +268,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -462,7 +455,8 @@
 				};
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-am62a-sk-binman.dtsi +4 -10
index 2a8c260387b..ed973541fff 100644
@@ -148,14 +148,6 @@
 #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 {
@@ -260,7 +252,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -385,7 +378,8 @@
 				};
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-am62p-sk-binman.dtsi +2 -9
index 797644a7e0d..8216add3498 100644
@@ -127,14 +127,6 @@
 #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 {
@@ -210,7 +202,8 @@
 					};
 
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62pxx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi +2 -10
index 6c52038cdca..f1666f1ef76 100644
@@ -164,15 +164,6 @@
 #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>;
 
@@ -185,7 +176,8 @@
 					};
 
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-am69-sk-u-boot.dtsi +20 -9
index 2f119508e18..fc686087023 100644
@@ -58,17 +58,18 @@
 #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 {
@@ -77,6 +78,16 @@
 
 	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 {
arch/arm/dts/k3-j7200-binman.dtsi +4 -9
index 423badd7cb5..47a4cde6b85 100644
@@ -237,13 +237,6 @@
 #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>;
 
@@ -345,7 +338,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -430,7 +424,8 @@
 			images {
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi +2 -9
index 8cefa39290d..6a773c1b3d1 100644
@@ -212,13 +212,6 @@
 #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>;
@@ -263,8 +256,8 @@
 					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";
 					};
 				};
 
arch/arm/dts/k3-j721e-binman.dtsi +4 -9
index 0d607296f0e..6adfab164ee 100644
@@ -333,13 +333,6 @@
 #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>;
 
@@ -467,7 +460,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -551,7 +545,8 @@
 			images {
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-j721s2-binman.dtsi +4 -9
index d121d8c0c54..73af184d27e 100644
@@ -145,13 +145,6 @@
 #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>;
 
@@ -286,7 +279,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
@@ -371,7 +365,8 @@
 			images {
 				dm {
 					ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-j722s-binman.dtsi +2 -10
index 6b521166575..8f1471371e5 100644
@@ -116,15 +116,6 @@
 #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>;
 
@@ -137,7 +128,8 @@
 					};
 
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};
 				};
 
arch/arm/dts/k3-j742s2-evm-u-boot.dtsi +20 -9
index ede5d6e58f5..b1d79a3f64a 100644
@@ -43,17 +43,18 @@
 #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 {
@@ -62,6 +63,16 @@
 
 	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 {
arch/arm/dts/k3-j784s4-binman.dtsi +4 -4
index 0553825b383..cb1fbc65923 100644
@@ -165,8 +165,8 @@
 						keyfile = "custMpk.pem";
 					};
 
-					dm: blob-ext {
-						filename = "ti-dm.bin";
+					dm: ti-dm {
+						optional;
 					};
 				};
 
@@ -254,8 +254,8 @@
 		fit {
 			images {
 				dm {
-					blob-ext {
-						filename = "ti-dm.bin";
+					ti-dm {
+						optional;
 					};
 				};
 
arch/arm/dts/k3-j784s4-evm-u-boot.dtsi +20 -9
index 8a60d7c6107..cc0b562d27e 100644
@@ -52,17 +52,18 @@
 #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 {
@@ -71,6 +72,16 @@
 
 	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 {
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw

On April 25, 2025 thus sayeth Andrew Davis:

Quoted 13 lines

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.

Quoted 4 lines

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".

For the few sitars boards this works :)

Quoted 20 lines
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi  | 11 ++-----
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 15 +++-------
 arch/arm/dts/k3-am625-sk-binman.dtsi          | 14 +++------
 .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  | 11 ++-----
 arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 14 +++------
 arch/arm/dts/k3-am62a-sk-binman.dtsi          | 14 +++------
 arch/arm/dts/k3-am62p-sk-binman.dtsi          | 11 ++-----
 arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi  | 12 ++------
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           | 29 +++++++++++++------
 arch/arm/dts/k3-j7200-binman.dtsi             | 13 +++------
 .../dts/k3-j721e-beagleboneai64-u-boot.dtsi   | 11 ++-----
 arch/arm/dts/k3-j721e-binman.dtsi             | 13 +++------
 arch/arm/dts/k3-j721s2-binman.dtsi            | 13 +++------
 arch/arm/dts/k3-j722s-binman.dtsi             | 12 ++------
 arch/arm/dts/k3-j742s2-evm-u-boot.dtsi        | 29 +++++++++++++------
 arch/arm/dts/k3-j784s4-binman.dtsi            |  8 ++---
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        | 29 +++++++++++++------
 17 files changed, 104 insertions(+), 155 deletions(-)

...

Quoted 21 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +0 -8
index 534eb14795b..cc619f5920e 100644
@@ -156,14 +156,6 @@
 #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 {

arch/arm/dts/k3-am625-sk-binman.dtsi line 267

Quoted 7 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +2 -1
@@ -270,7 +262,8 @@
 						keyfile = "custMpk.pem";
 					};
 					dm: ti-dm {
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
 					};

So I was curious of this optional flag. Is the issue here that we only check for mandatory binaries via BINMAN_INDIRS and not through all the custom arguments like TI_DM?

~Bryan

#2 lore raw
Quoted 70 lines · Bryan Brattlof

On April 25, 2025 thus sayeth Andrew Davis:

Quoted 13 lines

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.

Quoted 4 lines

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".

For the few sitars boards this works :)

Quoted 20 lines
---
  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi  | 11 ++-----
  arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 15 +++-------
  arch/arm/dts/k3-am625-sk-binman.dtsi          | 14 +++------
  .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  | 11 ++-----
  arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 14 +++------
  arch/arm/dts/k3-am62a-sk-binman.dtsi          | 14 +++------
  arch/arm/dts/k3-am62p-sk-binman.dtsi          | 11 ++-----
  arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi  | 12 ++------
  arch/arm/dts/k3-am69-sk-u-boot.dtsi           | 29 +++++++++++++------
  arch/arm/dts/k3-j7200-binman.dtsi             | 13 +++------
  .../dts/k3-j721e-beagleboneai64-u-boot.dtsi   | 11 ++-----
  arch/arm/dts/k3-j721e-binman.dtsi             | 13 +++------
  arch/arm/dts/k3-j721s2-binman.dtsi            | 13 +++------
  arch/arm/dts/k3-j722s-binman.dtsi             | 12 ++------
  arch/arm/dts/k3-j742s2-evm-u-boot.dtsi        | 29 +++++++++++++------
  arch/arm/dts/k3-j784s4-binman.dtsi            |  8 ++---
  arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        | 29 +++++++++++++------
  17 files changed, 104 insertions(+), 155 deletions(-)

...

Quoted 24 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +0 -8
index 534eb14795b..cc619f5920e 100644
@@ -156,14 +156,6 @@
  #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 {
@@ -270,7 +262,8 @@
  						keyfile = "custMpk.pem";
  					};
  					dm: ti-dm {
Quoted 9 lines

arch/arm/dts/k3-am625-sk-binman.dtsi line 267

Quoted 4 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +2 -1
-						filename = "ti-dm.bin";
+						filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+						optional;
  					};

So I was curious of this optional flag. Is the issue here that we only check for mandatory binaries via BINMAN_INDIRS and not through all the custom arguments like TI_DM?

I would like to remove all these optional flags for DM here at some point. DM is not optional for these platforms, without it you will not have a functional U-Boot.

Looking at the history on the list, seems these were added to make automatic testing with buildman happy. Marking these optional made the build pass for test builds without needing to download our firmware repo. BINMAN_ALLOW_MISSING=1 is the solution but it was broken at one point. It seems to be working now and these optional flags can go away.

I didn't do it as part of this series to keep things simple and as they were before, but feel free to start removing them. Some platforms already have this non-optional (AM62x Verdin, BeaglePlay).

Andrew

Reviewed-by on v1 1/1
#3 lore raw
In reply to Andrew Davis

Hi Andrew

Quoted 28 lines · Andrew Davis

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".

---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi  | 11 ++-----
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 15 +++-------
 arch/arm/dts/k3-am625-sk-binman.dtsi          | 14 +++------
 .../dts/k3-am625-verdin-wifi-dev-binman.dtsi  | 11 ++-----
 arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 14 +++------
 arch/arm/dts/k3-am62a-sk-binman.dtsi          | 14 +++------
 arch/arm/dts/k3-am62p-sk-binman.dtsi          | 11 ++-----
 arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi  | 12 ++------
 arch/arm/dts/k3-am69-sk-u-boot.dtsi           | 29 +++++++++++++------
 arch/arm/dts/k3-j7200-binman.dtsi             | 13 +++------
Quoted 9 lines
 .../dts/k3-j721e-beagleboneai64-u-boot.dtsi   | 11 ++-----
 arch/arm/dts/k3-j721e-binman.dtsi             | 13 +++------
 arch/arm/dts/k3-j721s2-binman.dtsi            | 13 +++------
 arch/arm/dts/k3-j722s-binman.dtsi             | 12 ++------
 arch/arm/dts/k3-j742s2-evm-u-boot.dtsi        | 29 +++++++++++++------
 arch/arm/dts/k3-j784s4-binman.dtsi            |  8 ++---
 arch/arm/dts/k3-j784s4-evm-u-boot.dtsi        | 29 +++++++++++++------
 17 files changed, 104 insertions(+), 155 deletions(-)

Tested on few J7 boards.

Signature · 2 lines
Thanking You
Neha Malcom Francis
#4 lore raw
In reply to Andrew Davis
Quoted 8 lines · Andrew Davis

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.

[...]

Applied to u-boot/master, thanks!

[1/1] arm: dts: k3: binman: Fix DM firmware selection

      commit: c492a55fe40cb9d86b0e99c160e21e5f8f4edcdc
Signature · 1 line
Tom