From 18ac2f63c1da3faa34d4dc965f4dc583333b9436 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Thu, 12 Mar 2020 13:53:13 +0100 Subject: [PATCH] ccimx8mn-dvk: add support to apply wifi/bluetooth overlays in the bootscript Instead of having two separate device trees for the non-wireless and wireless variants of the ccimx8mn, use the non-wireless .dtb as a base and apply the overlays in the bootscript depending on the variant's capabilities. Also, update the board's device tree list accordingly. https://jira.digi.com/browse/DEL-2609 Signed-off-by: Gabriel Valcazar --- meta-digi-arm/conf/machine/ccimx8mn-dvk.conf | 3 ++- .../u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index 838aeabeb..c3af8f2a0 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -15,7 +15,8 @@ SPL_BINARY = "spl/u-boot-spl.bin" UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb" KERNEL_DEVICETREE ?= " \ - digi/ccimx8mn-dvk-wb.dtb \ + digi/ccimx8mn_ov_bt.dtbo \ + digi/ccimx8mn_ov_wifi.dtbo \ digi/ccimx8mn-dvk.dtb \ " diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt index 469c583de..cb4f908ba 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt @@ -22,11 +22,14 @@ else setexpr module_has_bt ${hwid_2} \& 20000 setexpr module_has_bt ${module_has_bt} / 20000 - if test "${module_has_wifi}" = "1" && - test "${module_has_bt}" = "1"; then - setenv fdt_file cc${soc_type}-dvk-wb.dtb - else - setenv fdt_file cc${soc_type}-dvk.dtb + setenv fdt_file cc${soc_type}-dvk.dtb + + if test "${module_has_bt}" = "1"; then + setenv overlays cc${soc_type}_ov_bt.dtbo,${overlays} + fi + + if test "${module_has_wifi}" = "1"; then + setenv overlays cc${soc_type}_ov_wifi.dtbo,${overlays} fi fi fi