Custom MIPI DSI device tree for Colibri IMX8X

Technical Support queries

Hello Toradex experts,

We are developing a new mipi display panel that connect straight to the colibri imx8x mipi dsi output. We obtained the proper device tree file from the LCD screen manufactures. I have attached the sample dts file here:

CustomMipi.txt (6.2 KB)

The device tree is based on the panel-simple.c which should be included in the linux driver.

The hardware and the linux kernel we are using are:

  1. Colibri IMX8QXP 2GB WB IT
  2. Carrier Board: Colibri evaluation board v3

TDX Wayland with XWayland 5.6.0+build.18 (dunfell) \n \l
Colibri-iMX8X_Reference-Multimedia-Image

I am new to linux driver and kernel. I followed the official articles on building DTO and Linux kernel from Toradex. When try to build this, it give me error on those lines with message Unable to Parse Input Trees

	dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM |
					MIPI_DSI_MODE_EOT_PACKET | MIPI_DSI_MODE_VIDEO_BURST)>;
	dsi,format = <MIPI_DSI_FMT_RGB888>;

I commented out those lines, the dts built (couple of the warnings happen though) but the device tree doesn’t seem to work anyway.

Could some one give me some hints on what the proper steps to apply this device tree on the setup we are using

Any help is much appreciated
Warren

Hi @warrenlee,

Please add the following line to the beggining of your file:

#include <drm/drm_mipi_dsi.h>

The errors you’re seeing are probably because you didn’t include where these variables were defined. Could you check that, please?

Also, for device tree overlays. don’t forget to add these lines to the begging of the file as well:

/dts-v1/;
/plugin/;

#include <drm/drm_mipi_dsi.h>

/ {
	compatible = "toradex,colibri-imx8x";
};

//Put the rest of your code below
...

After successfully compiling your device tree overlay, copy the dtbo file to your module and place it inside the /boot/overlays/ folder. Next, edit the file /boot/overlays.txt and append the name of the file to this text file, something like below

fdt_overlays=myCustomFile.dtbo

Save it and run the followings commands:

# sync
# reboot

When the module power up again, it will apply your overlays. Please note that for some displays you need to add more overlays. Please, check which overlays you need to add to this table: Device Tree Overlays (Linux) | Toradex Developer Center

Let me know if this solved your issue and feel free to ask any questions you might have.

Best Regards,
Hiago.

Hi thanks for the quick reply. I added the include on top of the dts file and it gives me an complier error:

fatal error: drm/drm_mipi_dsi.h: No such file or directory
#include <drm/drm_mipi_dsi.h>

I have attached full dts file here. Any idea on how to solve this?

costum_display.dts (6.4 KB)

Hi @warrenlee,

In fact, the device tree overlay will look inside the dt-bindings folder, sorry about that. Therefore I moved all the definitions needed to your overlay file:

// Enable the dsi to hdmi adapter orderable at Toradex for Colibri iMX8X

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

#define MIPI_DSI_MODE_VIDEO             BIT(0)
#define MIPI_DSI_MODE_VIDEO_BURST       BIT(1)
#define MIPI_DSI_MODE_EOT_PACKET        BIT(9)
#define MIPI_DSI_MODE_LPM               BIT(11)
#define MIPI_DSI_FMT_RGB888             0

/ {
	compatible = "toradex,colibri-imx8x";
};

&dsi {
	status = "okay";
	panel@0 {

Also, I’ve searched for the &dsi node and it doesn’t exist in our device tree for Colibri iMX8X. Actually, I could see these two definitions:

  • &mipi0_dsi_host
  • &mipi1_dsi_host

Could you try to replace the &dsi node with &mipi0_dsi_host and check if that works?

In general this device tree overlay that you shared looks strange. There are definitions being used that are not inside the file, also some nodes that doesn’t exist. The company shared this device tree with you? Can you also share the name and model of your display?

Best Regards,
Hiago.

Hi Hiago,

Thanks for the message. I am continuing work on this now.

In regard the information, please see the attached documents for model number and specs:

SPEC-HL070T55-01 v4 2000nits (002).pdf (1.1 MB)

We made a custom adapter to map the mipi pins.

Changda

Hi @warrenlee,

Thank you for sharing this datasheet.

There is not too much information from this datasheet to add to the device tree.

This company shared this device tree with you and should it work with the Linux kernel out of the box? Do you have more information about that? Like which kernel they tested it or if it’s working or not…

Best Regards,
Hiago.