summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2022-07-06 14:15:05 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2022-07-06 14:21:53 +0200
commit33bb8e968332b235034fcd2c3e846579d3c1d2a2 (patch)
tree5cd29a3971feeda3fd90080e5d558907ee3ed56d
parent91a1b19e7384c0eca4ed96a0cae16d2f7d95fbb7 (diff)
toradex: tdx-cfg-block: add 0068 i.mx 8m mini skutoradex_imx_v2020.04_5.4.70_2.3.0
[ backported from https://lore.kernel.org/u-boot/20220706121505.448579-1-dev@pschenker.ch/T/#u ] Add new i.MX 8M Mini SKU to ConfigBlock handling. 0068: Verdin iMX8M Mini Quad 2GB WB IT No CAN This SKU is identical to 0055 but without CAN. Mention this in the name so those modules can be distinguished. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
-rw-r--r--board/toradex/common/tdx-cfg-block.c13
-rw-r--r--board/toradex/common/tdx-cfg-block.h1
-rw-r--r--board/toradex/verdin-imx8mm/verdin-imx8mm.c3
3 files changed, 15 insertions, 2 deletions
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 1db4745a27..5d942b9db9 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -149,6 +149,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 WB IT No CAN",
};
const char * const toradex_carrier_boards[] = {
@@ -412,6 +413,7 @@ static int get_cfgblock_interactive(void)
char it = 'n';
char wb = 'n';
char mem8g = 'n';
+ char can = 'y';
int len = 0;
int ret = 0;
@@ -442,6 +444,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");
@@ -529,7 +538,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 1790698486..79cd09c78d 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 {
diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 649b6bff4d..cb9b0eec65 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -392,7 +392,8 @@ static void select_dt_from_module_version(void)
* Wi-Fi/Bluetooth make sure we use the -wifi device tree.
*/
is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) ||
- (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT);
+ (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT) ||
+ (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN);
#endif
switch(get_pcb_revision()) {