[PATCH 05/12] arm: dts: iot2050: Use the auto generator nodes for fdt

Jan Kiszka jan.kiszka at siemens.com
Sat May 28 15:02:54 CEST 2022


From: Su Baocheng <baocheng.su at siemens.com>

Refactor according to the entry `fit: Entry containing a FIT` of
document tools/binman/README.entries.

As the generator uses the device tree name for the config description,
board_fit_config_name_match requires a small adjustment as well.

Signed-off-by: Su Baocheng <baocheng.su at siemens.com>
[Jan: re-add now required CONFIG_OF_LIST, update config matching]
Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
---
 arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 44 ++++----------------
 board/siemens/iot2050/board.c                |  3 ++
 configs/iot2050_pg1_defconfig                |  1 +
 configs/iot2050_pg2_defconfig                |  1 +
 4 files changed, 12 insertions(+), 37 deletions(-)

diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
index 3135ad04715..46669576864 100644
--- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
@@ -32,6 +32,7 @@
 
 		fit at 0x280000 {
 			description = "U-Boot for IOT2050";
+			fit,fdt-list = "of-list";
 			offset = <0x280000>;
 			images {
 				u-boot {
@@ -46,32 +47,11 @@
 					};
 				};
 
-				fdt-iot2050-basic {
-					description = "k3-am6528-iot2050-basic*.dtb";
+				@fdt-SEQ {
+					description = "fdt-NAME";
 					type = "flat_dt";
 					arch = "arm64";
 					compression = "none";
-					blob {
-#ifdef CONFIG_TARGET_IOT2050_A53_PG1
-						filename = "arch/arm/dts/k3-am6528-iot2050-basic.dtb";
-#else
-						filename = "arch/arm/dts/k3-am6528-iot2050-basic-pg2.dtb";
-#endif
-					};
-				};
-
-				fdt-iot2050-advanced {
-					description = "k3-am6548-iot2050-advanced*.dtb";
-					type = "flat_dt";
-					arch = "arm64";
-					compression = "none";
-					blob {
-#ifdef CONFIG_TARGET_IOT2050_A53_PG1
-						filename = "arch/arm/dts/k3-am6548-iot2050-advanced.dtb";
-#else
-						filename = "arch/arm/dts/k3-am6548-iot2050-advanced-pg2.dtb";
-#endif
-					};
 				};
 
 #ifdef CONFIG_WDT_K3_RTI_FW_FILE
@@ -89,21 +69,11 @@
 			};
 
 			configurations {
-				default = "conf-iot2050-basic";
-
-				conf-iot2050-basic {
-					description = "iot2050-basic";
-					firmware = "u-boot";
-					fdt = "fdt-iot2050-basic";
-#ifdef CONFIG_WDT_K3_RTI_FW_FILE
-					loadables = "k3-rti-wdt-firmware";
-#endif
-				};
-
-				conf-iot2050-advanced {
-					description = "iot2050-advanced";
+				default = "@config-DEFAULT-SEQ";
+				@config-SEQ {
+					description = "NAME";
 					firmware = "u-boot";
-					fdt = "fdt-iot2050-advanced";
+					fdt = "fdt-SEQ";
 #ifdef CONFIG_WDT_K3_RTI_FW_FILE
 					loadables = "k3-rti-wdt-firmware";
 #endif
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
index 050ddb5899b..2be5d1eefc3 100644
--- a/board/siemens/iot2050/board.c
+++ b/board/siemens/iot2050/board.c
@@ -154,6 +154,9 @@ int board_fit_config_name_match(const char *name)
 	struct iot2050_info *info = IOT2050_INFO_DATA;
 	char upper_name[32];
 
+	/* skip the prefix "k3-am65x8-" */
+	name += 10;
+
 	if (info->magic != IOT2050_INFO_MAGIC ||
 	    strlen(name) >= sizeof(upper_name))
 		return -1;
diff --git a/configs/iot2050_pg1_defconfig b/configs/iot2050_pg1_defconfig
index 0e6f1257a94..2373bab5306 100644
--- a/configs/iot2050_pg1_defconfig
+++ b/configs/iot2050_pg1_defconfig
@@ -59,6 +59,7 @@ CONFIG_CMD_TIME=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIST="k3-am6528-iot2050-basic k3-am6548-iot2050-advanced"
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_OF_LIST="k3-am65-iot2050-spl"
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
diff --git a/configs/iot2050_pg2_defconfig b/configs/iot2050_pg2_defconfig
index 1bee7c46175..c8c21f71e25 100644
--- a/configs/iot2050_pg2_defconfig
+++ b/configs/iot2050_pg2_defconfig
@@ -60,6 +60,7 @@ CONFIG_CMD_TIME=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_LIST="k3-am6528-iot2050-basic-pg2 k3-am6548-iot2050-advanced-pg2"
 CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_OF_LIST="k3-am65-iot2050-spl"
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
-- 
2.35.3



More information about the U-Boot mailing list