From: Franz Schnyder <[email protected]>

Currently, the Verdin iMX8MM uses the Toradex product ID table
to determine whether the module is a WiFi or a non-WiFi one and sets the
DTB accordingly.

In the progress of decoupling from the Toradex product PID table, use
the WiFi DTB as the default for new PIDs.
This change is safe, as on non-WiFi modules this leaves the WiFi and BT
devices unprobed. Further, the SDIO/UART signals are exposed to the edge
connector on non-WiFi modules and can be used on the carrier. However,
no Toradex carrier board makes use of these interfaces on the carrier
and it can only be achieved with a customized board. For customized
boards, it's expected to override the default selection by setting the
'fdtfile' env variable.

Signed-off-by: Franz Schnyder <[email protected]>
---
 board/toradex/verdin-imx8mm/verdin-imx8mm.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c 
b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
index 4e308084968..93c26476081 100644
--- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c
+++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c
@@ -71,7 +71,7 @@ static void select_dt_from_module_version(void)
 {
        char variant[32];
        char *env_variant = env_get("variant");
-       int is_wifi = 0;
+       bool is_wifi = true;
 
        if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) {
                /*
@@ -79,12 +79,10 @@ static void select_dt_from_module_version(void)
                 * module with 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_IMX8MMQ_WIFI_BT_IT_NO_CAN) ||
-                         (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_4G_WIFI_BT_ET) ||
-                         (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WB_IT_64G) ||
-                         (tdx_hw_tag.prodid == 
VERDIN_IMX8MMQ_2G_WIFI_BT_IT_64G);
+               is_wifi = !((tdx_hw_tag.prodid == VERDIN_IMX8MMDL) ||
+                           (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_IT) ||
+                           (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_2G_IT) ||
+                           (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_2G_IT_NO_CAN));
        }
 
        switch (get_pcb_revision()) {

-- 
2.43.0

Reply via email to