[PATCH] toradex: tdx-cfg-block: add 0068 i.mx 8m mini sku

Philippe Schenker dev at pschenker.ch
Tue Jun 21 13:49:53 CEST 2022


From: Philippe Schenker <philippe.schenker at toradex.com>

Add new i.MX 8M Mini SKU to ConfigBlock handling.

0068: Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT (No CAN)

This SKU is identical to 0055 but without CAN. Mention this in brackets
so those modules can be distinguished.

Signed-off-by: Philippe Schenker <philippe.schenker at toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini at toradex.com>

---

 board/toradex/common/tdx-cfg-block.c | 13 ++++++++++++-
 board/toradex/common/tdx-cfg-block.h |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 6c8cf4592d..fa54208ce9 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -145,6 +145,7 @@ const char * const toradex_modules[] = {
 	[65] = "Verdin iMX8M Plus QuadLite 1GB IT",
 	[66] = "Verdin iMX8M Plus Quad 8GB Wi-Fi / BT",
 	[67] = "Apalis iMX8 QuadMax 8GB Wi-Fi / BT IT",
+	[68] = "Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT (No CAN)",
 };
 
 const char * const toradex_carrier_boards[] = {
@@ -361,6 +362,7 @@ static int get_cfgblock_interactive(void)
 	char it = 'n';
 	char wb = 'n';
 	char mem8g = 'n';
+	char can = 'y';
 	int len = 0;
 
 	/* Unknown module by default */
@@ -387,6 +389,13 @@ static int get_cfgblock_interactive(void)
 		mem8g = console_buffer[0];
 	}
 #endif
+#if defined(CONFIG_TARGET_VERDIN_IMX8MM)
+	if (is_cpu_type(MXC_CPU_IMX8MM) && (wb == 'y' || wb == 'Y')) {
+		sprintf(message, "Does your module have CAN? [y/N] ");
+		len = cli_readline(message);
+		can = console_buffer[0];
+	}
+#endif
 #endif
 
 	soc = env_get("soc");
@@ -474,7 +483,9 @@ static int get_cfgblock_interactive(void)
 		else
 			tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
 	} else if (is_cpu_type(MXC_CPU_IMX8MM)) {
-		if (wb == 'y' || wb == 'Y')
+		if (can == 'n' || can == 'N')
+			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN;
+		else if (wb == 'y' || wb == 'Y')
 			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
 		else
 			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
diff --git a/board/toradex/common/tdx-cfg-block.h b/board/toradex/common/tdx-cfg-block.h
index 43e662e41d..9697447158 100644
--- a/board/toradex/common/tdx-cfg-block.h
+++ b/board/toradex/common/tdx-cfg-block.h
@@ -88,6 +88,7 @@ enum {
 	VERDIN_IMX8MPQL_IT, /* 65 */
 	VERDIN_IMX8MPQ_8GB_WIFI_BT,
 	APALIS_IMX8QM_8GB_WIFI_BT_IT,
+	VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN,
 };
 
 enum {
-- 
2.36.1



More information about the U-Boot mailing list