Strange behaviour when using torizon-builder and adding overlays

Hello Toradex Team,

I’m using imx8mm with dahlia board, DSI display with DSI-DSI adaptor and 5.15.148-6.6.0-devel+git.23a8e831749d

The problem was, when I was creating an image with torizon builder, I was adding an LVDS overlayer, the display shows nothing, but then editing the file overlays.txt and changing the layer to verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts and then a reboot it worked ok.

  device-tree:
    include-dirs:
      - linux-toradex/include/
    overlays:
      add:
        - device-trees/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts

Later I changed the layer on the horizon builder to the DSI layer, but the DSI display does not show anything on boot. If I check the overlays.txt is updated with the correct overlay, and after reboot nothing happens. Probably some step is missing here.

  device-tree:
    include-dirs:
      - linux-toradex/include/
    overlays:
      add:
        - device-trees/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts

Hello @peterz,

I was able to reproduce the issue here. If you simply add the verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts, the overlays which are enabled by default will also be applied.
Most importantly, the overlay verdin-imx8mm_dsi-to-hdmi_overlay.dtbo will be enabled by default. This is likely what is causing the DSI display not to work for you.

There are two ways to deal with this:


  1. Clear all overlays when adding a new one:
  device-tree:
    include-dirs:
      - linux/include/
    overlays:
      clear: true
      add:
        - device-trees/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts

This will make sure that only the overlays under add are enabled.


  1. Remove the overlay which inferes with the added overlay:
  device-tree:
    include-dirs:
      - linux/include/
    overlays:
      remove:
        - verdin-imx8mm_dsi-to-hdmi_overlay.dtbo
      add:
        - device-trees/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts

This way you can keep the default overlays without having to add them back, and just remove the one which interferes with the new overlay.


By choosing one of these approaches you should be able to create your custom image as expected.

Best Regards,
Bruno

Hello @bruno.tx,

I think I did these approaches in the past with the same results.
In the first approach, I get the following sudo tdx-info -dt, as you can see no HDMI overlay there, with the same results, no DSI image and the POWER_DOWN LED is ON.
If I try to add anything on the device-tree: section the DSI display does not work, even with the correct layer as you can see below.
If I remove the section device-tree: and then later change the overlay.txt file to DSI, after the reboot I get the image OK.

----torizon-builder config----

input:
  easy-installer:
    #local: torizonOS_images/torizon-core-docker-verdin-imx8mm-Tezi_6.5.0+build.8.tar
    local: torizonOS_images/torizon-core-docker-verdin-imx8mm-Tezi_6.6.0-devel-202403+build.22.tar
customization:
  splash-screen: logo.png
  filesystem:
      - changes/
  device-tree:
    include-dirs:
      - linux-toradex/include/
    #custom: linux-toradex/arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dts
    overlays:
      clear: true
  #    remove:
  #        - verdin-imx8mm_dsi-to-hdmi_overlay.dtbo
      add:
          - device-trees/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts
output:
  easy-installer:
    local: output_directory
    accept-licence: true
    autoinstall: true
    autoreboot: true

----torizonOS device-trees----

Device tree
------------------------------------------------------------
Device tree enabled:      imx8mm-verdin-wifi-dev.dtb
Compatible string:        toradex,verdin-imx8mm-wifi-devtoradex,verdin-imx8mm-wifitoradex,verdin-imx8mmfsl,imx8mm
Device trees available:
                          imx8mm-verdin-nonwifi-dahlia.dtb
                          imx8mm-verdin-nonwifi-dev.dtb
                          imx8mm-verdin-nonwifi-mallow.dtb
                          imx8mm-verdin-nonwifi-yavia.dtb
                          imx8mm-verdin-wifi-dahlia.dtb
                          imx8mm-verdin-wifi-dev.dtb
                          imx8mm-verdin-wifi-mallow.dtb
                          imx8mm-verdin-wifi-yavia.dtb
------------------------------------------------------------

Device tree overlays
------------------------------------------------------------
Overlays enabled:         fdt_overlays=verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dtbo
Overlays available:
                          verdin-imx8mm_20mhz_can1.dtbo
                          verdin-imx8mm_disable_can1.dtbo
                          verdin-imx8mm_dsi-to-hdmi_overlay.dtbo
                          verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo
                          verdin-imx8mm_hmp_overlay.dtbo
                          verdin-imx8mm_nau8822-btl_overlay.dtbo
                          verdin-imx8mm_ov5640_overlay.dtbo
                          verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dtbo
                          verdin-imx8mm_spidev_overlay.dtbo
------------------------------------------------------------

Hello @peterz,

I could not reproduce this problem here. With the same configuration for overlays on TCB, the display works as expected.

Are you using the Capacitive Touch Display 10.1" DSI/RVT101HVDNWC00-B?
If yes, is the device tree overlay modified in any way?

Best Regards,
Bruno

Hello @bruno.tx ,

No changes on the device tree for now.
Just loading the base torizoncore image 6.60-devel but I’ve tried the 6.5.0 with the same results.
Just using the tcbuild.yaml on previous post does not work.
I’m using that exact display.

What version of toradex-linux git are you using when using torizoncore-builder?
I’m using this one, can it be because of this problem?
image
commit hash: 016e5108e8f8d726d8d115e084c8214f5a087f73

From uboot log you can see the overlay DSI is applied correctly

Found U-Boot script /boot.scr
973 bytes read in 1 ms (950.2 KiB/s)
## Executing script at 50280000
6671 bytes read in 2 ms (3.2 MiB/s)
66160 bytes read in 2 ms (31.5 MiB/s)
68 bytes read in 2 ms (33.2 KiB/s)
Applying Overlay: verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dtbo
3592 bytes read in 2 ms (1.7 MiB/s)
13437999 bytes read in 81 ms (158.2 MiB/s)
6131174 bytes read in 37 ms (158 MiB/s)

Hello @peterz,

I have tested both with the 6.6.1 Quarterly release and the same monthly release of 6.6.0 that you are using. For both of them, the display worked as expected.


For linux-toradex, I have:

  • Branch: toradex_5.15-2.2.x-imx
  • Commit Hash: 016e5108e8f8d726d8d115e084c8214f5a087f73

For the device-tree-overlays repository, I have:

  • Branch: toradex_5.15-2.2.x-imx
  • Commit Hash: 69f40a121e3f901be100f54c19d1721b70c63aa2

I cloned both today for this test, at least the Linux appears to be the same as yours.
Is the device tree overlays also the same for you? A possible cause for the problem would be the use of the master branch for the device tree overlays repository.

Best Regards,
Bruno

Hello @bruno.tx ,

The branch was the problem, I was in master by some reason instead of toradex_5.15-2.2.x-imx
After change the branch the image was OK.
Thanks

Hello @peterz,

Thanks for the update.

Best Regards,
Bruno