summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-06-18 14:51:57 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-06-19 15:20:31 +0200
commiteb660075db011c87a364d884a015657b4ba3195a (patch)
treea2abce455230bb5ec603ee1df8018c46e7d1e5a5
parent24db10ece3e28dfcb1c45b3951e418303f841a19 (diff)
colibri-imx6ull: set module variant depending on config block
Using CPU temperature grading as a discriminator if the Wi-Fi / Bluetooth chip is populated is no longer possible due to upcoming SKUs. Set variant to -wifi only if a valid config block is present and the product id mentions a SKU with Wi-Fi / Bluetooth. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--board/toradex/colibri-imx6ull/colibri_imx6ull.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/board/toradex/colibri-imx6ull/colibri_imx6ull.c b/board/toradex/colibri-imx6ull/colibri_imx6ull.c
index 30190f84d7..b1558f0b72 100644
--- a/board/toradex/colibri-imx6ull/colibri_imx6ull.c
+++ b/board/toradex/colibri-imx6ull/colibri_imx6ull.c
@@ -31,6 +31,7 @@
#include <usb.h>
#include <usb/ehci-ci.h>
#include "../common/tdx-common.h"
+#include "../common/tdx-cfg-block.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -353,9 +354,15 @@ static const struct boot_mode board_boot_modes[] = {
int board_late_init(void)
{
- int minc, maxc;
- if (get_cpu_temp_grade(&minc, &maxc) != TEMP_COMMERCIAL)
+#ifdef 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.
+ */
+ if (tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT_IT ||
+ tdx_hw_tag.prodid == COLIBRI_IMX6ULL_WIFI_BT)
setenv("variant", "-wifi");
+#endif
#ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);