From: Franz Schnyder <[email protected]> Currently, the Verdin AM62P 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. Since there is only one Verdin AM62P PID, completely remove the PID based late selection. Signed-off-by: Franz Schnyder <[email protected]> --- board/toradex/verdin-am62p/verdin-am62p.c | 32 ------------------------------- configs/verdin-am62p_a53_defconfig | 3 +-- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/board/toradex/verdin-am62p/verdin-am62p.c b/board/toradex/verdin-am62p/verdin-am62p.c index 1e7fcc9fd9d..7c680b46c92 100644 --- a/board/toradex/verdin-am62p/verdin-am62p.c +++ b/board/toradex/verdin-am62p/verdin-am62p.c @@ -103,38 +103,6 @@ void ft_board_setup_ex(void *blob, struct bd_info *bd) } #endif -static void select_dt_from_module_version(void) -{ - char variant[32]; - char *env_variant = env_get("variant"); - int is_wifi = 0; - - if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) { - /* - * If we have a valid config block and it says we are a module with - * Wi-Fi/Bluetooth make sure we use the -wifi device tree. - */ - is_wifi = (tdx_hw_tag.prodid == VERDIN_AM62PQ_2G_WIFI_BT_IT); - } - - if (is_wifi) - strlcpy(&variant[0], "wifi", sizeof(variant)); - else - strlcpy(&variant[0], "nonwifi", sizeof(variant)); - - if (!env_variant || strcmp(variant, env_variant)) { - printf("Setting variant to %s\n", variant); - env_set("variant", variant); - } -} - -int board_late_init(void) -{ - select_dt_from_module_version(); - - return 0; -} - #if IS_ENABLED(CONFIG_XPL_BUILD) void spl_perform_board_fixups(struct spl_image_info *spl_image) { diff --git a/configs/verdin-am62p_a53_defconfig b/configs/verdin-am62p_a53_defconfig index a397684dbd8..70a9f2389f4 100644 --- a/configs/verdin-am62p_a53_defconfig +++ b/configs/verdin-am62p_a53_defconfig @@ -35,12 +35,11 @@ CONFIG_BOOTDELAY=1 CONFIG_OF_BOARD_SETUP_EXTENDED=y CONFIG_BOOTCOMMAND="bootflow scan -b" CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="test -n \"${fdtfile}\" || setenv fdtfile k3-am62p5-verdin-${variant}-${fdt_board}.dtb" +CONFIG_PREBOOT="test -n \"${fdtfile}\" || setenv fdtfile k3-am62p5-verdin-wifi-${fdt_board}.dtb" CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_BOARD_INIT is not set -CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x80000 CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_BOARD_INIT=y -- 2.43.0
