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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2020-04-27 16:45:22 +02:00
parent 18ac2f63c1
commit 973af88c12
2 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,7 @@ UBOOT_DTB_NAME = "ccimx8mn-dvk.dtb"
KERNEL_DEVICETREE ?= " \ KERNEL_DEVICETREE ?= " \
digi/ccimx8mn_ov_bt.dtbo \ digi/ccimx8mn_ov_bt.dtbo \
digi/ccimx8mn_ov_v1.dtbo \
digi/ccimx8mn_ov_wifi.dtbo \ digi/ccimx8mn_ov_wifi.dtbo \
digi/ccimx8mn-dvk.dtb \ digi/ccimx8mn-dvk.dtb \
" "

View File

@ -17,6 +17,9 @@ else
# Set device tree filename depending on the hardware capabilities # Set device tree filename depending on the hardware capabilities
# #
if test -n "${module_ram}"; then 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 ${hwid_2} \& 10000
setexpr module_has_wifi ${module_has_wifi} / 10000 setexpr module_has_wifi ${module_has_wifi} / 10000
setexpr module_has_bt ${hwid_2} \& 20000 setexpr module_has_bt ${hwid_2} \& 20000
@ -31,6 +34,9 @@ else
if test "${module_has_wifi}" = "1"; then if test "${module_has_wifi}" = "1"; then
setenv overlays cc${soc_type}_ov_wifi.dtbo,${overlays} setenv overlays cc${soc_type}_ov_wifi.dtbo,${overlays}
fi fi
if test "${som_hv}" = "1"; then
setenv overlays cc${soc_type}_ov_v1.dtbo,${overlays}
fi fi
fi fi