From 973af88c12cbef6452f4b5ead569f505f92ab622 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 27 Apr 2020 16:45:22 +0200 Subject: [PATCH] ccimx8mn-dvk: add support to load the v1 SOM overlay in the bootscript Parse the hardware version from the HWID and load the overlay if and only if the revision is "1". Also, update the board's device tree list accordingly. https://jira.digi.com/browse/DEL-7070 Signed-off-by: Gabriel Valcazar --- meta-digi-arm/conf/machine/ccimx8mn-dvk.conf | 1 + .../recipes-bsp/u-boot/u-boot-dey/ccimx8mn-dvk/boot.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf index c3af8f2a0..afa0ce053 100644 --- a/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf +++ b/meta-digi-arm/conf/machine/ccimx8mn-dvk.conf @@ -16,6 +16,7 @@ UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb" KERNEL_DEVICETREE ?= " \ digi/ccimx8mn_ov_bt.dtbo \ + digi/ccimx8mn_ov_v1.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 cb4f908ba..ea67b7943 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 @@ -17,6 +17,9 @@ else # Set device tree filename depending on the hardware capabilities # if test -n "${module_ram}"; then + setexpr som_hv ${hwid_2} \& 38 + setexpr som_hv ${som_hv} / 8 + setexpr module_has_wifi ${hwid_2} \& 10000 setexpr module_has_wifi ${module_has_wifi} / 10000 setexpr module_has_bt ${hwid_2} \& 20000 @@ -31,6 +34,9 @@ else if test "${module_has_wifi}" = "1"; then setenv overlays cc${soc_type}_ov_wifi.dtbo,${overlays} fi + + if test "${som_hv}" = "1"; then + setenv overlays cc${soc_type}_ov_v1.dtbo,${overlays} fi fi