@henrique.tx,
Thank you for your response. I eventually was able to identify a configuration that allowed me to build images for the Verdin Mini and Verdin Plus modules with video support.
I am going a little more into the details just in case others run into the same problems.
To enable video the following device tree overlays are necessary:
- Verdin Mini:
- verdin-imx8mm_lt8912_overlay.dtbo (Verdin Mini has MIPI DSI output. The overlay enables the Lontium MIPI DSI-to-HDMI video bridge on the Toradex Verdin DSI to HDMI adapter.)
- Verdin Plus:
- verdin-imx8mp_native-hdmi_overlay.dtbo (enables the built-in HDMI on the i.MX8M Plus SoC)
- verdin-imx8mp_lt8912_overlay.dtbo (enables the Lontium MIPI DSI-to-HDMI video bridge on the Toradex Verdin DSI to HDMI adapter.)
The overlay are applied by u-boot after it loads the base device tree e.g. imx8mm-verdin-wifi-dev.dtb. For that to work the base device tree needs to have the nodes that the overlay extends/modifies already defined, for instance, overlay defines &hdmi_lontium_lt8912 { … }; and hence the base device tree needs to contain hdmi_lontium_lt8912.
The Toradex kernel tree repos contain the base device tree but the overlays are in a different repo and are built by the YP recipe linux-device-tree-overlays from a different repo. Consequently, the kernel tree repo and the overlay repo have to match.
Furthermore, the Bitbake variable TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
defines what device tree overlays are going to be applied by u-boot. The content of the variable is placed into the file overlays.txt
in the boot partition as a u-boot environment variable assignment e.g. fdt_overlays=verdin-imx8mm_lt8912_overlay.dtbo verdin-imx8mm_spidev_overlay.dtbo
. The Bitbake variable TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
is set in the machine file.
Hence, three things have to match otherwise it won’t work:
- Linux kernel tree repo
- Overlay repo
- TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
There are two versions of kernel tree repos being used:
- Derived from the NXP kernel: linux-toradex
- Derived from the kernel.org kernel: linux-toradx mainline
The variable IMX_DEFAULT_BSP
chooses the kernel tree:
-
nxp
→ linux-toradex
-
mainline
→ linux-toradex-mainline
The catch is that the mainline kernel does not support the video overlays. The base device tree does not contain the necessary nodes. The Toradex distro configurations set the IMX_DEFAULT_BSP
variable. The default is mainline
.
Using the master branch on meta-toradex-nxp (together with the master branch of meta-toradex-bsp-common and meta-toradex-distro) with IMX_DEFAULT_BSP = "nxp"
will lead to a successful build, however, there seems to be an issue with the imx_sec_dsim_drv driver as it fails to attach the bridge and ends up in an endless loop.
Using this configuration
Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-tswp-linux"
MACHINE = "verdin-imx8mm"
DISTRO = "tsweighpoint"
DISTRO_VERSION = "1.0"
TUNE_FEATURES = "aarch64 armv8a crc cortexa53"
TARGET_FPU = ""
meta
meta-poky = "kirkstone:2e79b199114b25d81bfaa029ccfb17676946d20d"
meta-oe
meta-multimedia
meta-networking
meta-python = "kirkstone:744a4b6eda88b9a9ca1cf0df6e18be384d9054e3"
meta-qt6 = "dev:e950cff143165c5dacbf7bb400c03c53a1fc0c44"
meta-freescale = "master:66d738d4ab1270c2e87f5afabc085bdff205e5ac"
meta-freescale-3rd-party = "master:070f5cc7b5a29ee98899be134f24f338b59770ff"
meta-toradex-bsp-common = "kirkstone-6.x.y:ca5ce278e2baa20b50ab5ce7b6a0f5a2d8898e4d"
meta-toradex-nxp = "kirkstone-6.x.y:9e006dccef9e22a430ab56b765420b13f532c56a"
meta-toradex-distro = "kirkstone-6.x.y:d80a3f9992c87f61228498286db89dd33f5be592"
works if the TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
is explicitly overridden:
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:verdin-imx8mp = "verdin-imx8mp_native-hdmi_overlay.dtbo verdin-imx8mp_lt8912_overlay.dtbo verdin-imx8mp_spidev_overlay.dtbo"
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:verdin-imx8mm = "verdin-imx8mm_lt8912_overlay.dtbo verdin-imx8mm_spidev_overlay.dtbo"
The reason is that the git version of linux-device-tree-overlays has been bumped and the newer commit changes the names of the overlay files, however the variable TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT
has not been changed accordingly.
I was only able to track this down because of the git hash of linux-toradex: 5.15.40-6.1.0-devel+git.f4b7e56f237c. That version is the one used by the reference image that is loaded onto the eMMC of the recent modules. However, the master branch of meta-toradex-nxp does not contain a commit that sets the SRCREV of the kernel recipe to that version. I found it only in the kirkstone-6.x.y branch.
Toradex engineers clearly have some cleanup work to do here. This has been rather frustrating and cost me three days of work.