Colibri Eval Board Parallel-RGB interface

Colibri IMX8X
Colibri Eval Board v3.2B
Linux Yocto Dunfell
DeviceTree: imx8dx-colibri-eval-v3.dtb
Overlays: colibri-imx8x_parallel-rgb_overlay.dtbo, display-custom-renesas_overlay.dtbo

I’m having trouble getting a standard parallel-rgb TFT display to work using the X30 connector. My VGA output works so I can assume that the paralle-rgb is functional. I have a custom overlay that i have modified for my display. The overlay file contents are below:

// Custom for renesas display with a resolution of 640x480 pixel

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,apalis_imx6q",
		     "toradex,apalis-imx8x",
		     "toradex,colibri_imx6dl",
		     "toradex,colibri-imx6ull",
		     "toradex,colibri-imx7d",
		     "toradex,colibri-imx7s",
		     "toradex,colibri-imx8x";

fragment@0 {
		target-path = "/panel-dpi";

		__overlay__ {
			status = "okay";
			width-mm = <53>;
			height-mm = <71>;

			panel-timing {
				clock-frequency = <25542000>;
				hactive = <480>;
				vactive = <854>;
				hsync-len = <5>;
				hfront-porch = <5>;
				hback-porch = <5>;
				vsync-len = <2>;
				vfront-porch = <2>;
				vback-porch = <2>;
			};
		};
	};

};

Can you guys help point me into the right direction on how to get my display up and running?

Thanks,
Chris Parris

I am using

Hi @ctparris,

Can you share the datasheet of the display you’re trying to use?

Best Regards,
Hiago.

here is the display and controller.
display
controller

Hi @ctparris,

Thanks for the documents.

I found the datasheets very confusing, it appears that the vertical and horizontal tables are a little bit different between the controller and the display datasheets. So I tried to follow the controller datasheet.
The first thing that I’ve noticed is that the display is 640x480 pixels but the resolution on the timings tables says it’s 800x480. So I changed your hactive and vactive parameters.
Next, it appears that the parameters below were also wrong:

hback-porch = <78>;
vsync-len = <4>;
vfront-porch = <2>;
vback-porch = <4>;

Finally, I set the clock frequency to 49.2 ns, which is the max stated by the datasheet.

Here is the overlay that I think it’s correct now:

// Custom for renesas display with a resolution of 640x480 pixel

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,apalis_imx6q",
		     "toradex,apalis-imx8x",
		     "toradex,colibri_imx6dl",
		     "toradex,colibri-imx6ull",
		     "toradex,colibri-imx7d",
		     "toradex,colibri-imx7s",
		     "toradex,colibri-imx8x";

fragment@0 {
		target-path = "/panel-dpi";

		__overlay__ {
			status = "okay";
			width-mm = <53>;
			height-mm = <71>;

			panel-timing {
				clock-frequency = <20325203>;
				hactive = <480>;
				vactive = <800>;
				hsync-len = <5>;
				hfront-porch = <5>;
				hback-porch = <78>;
				vsync-len = <4>;
				vfront-porch = <2>;
				vback-porch = <4>;
			};
		};
	};

};

Can you please test this and tell us what happened? Please, be specific with the description, is the backlight working? The display is not working at all? What’s happening? Perhaps you can send us a picture as well.

As I said, the datasheet is very confusing.

Best Regards,
Hiago.

I made the changes but didn’t seem to affect anything (except for making the VGA output not work anymore - I have VGA connected for verification that there is actual video output).

The backlight is on as we have it powered via external power supply. The screen just stays black. Don’t see any kind of “flicker” or anything.

in parallel i have been working on “initialization” of the display via SPI bus (support from display says the display has to be initialized before it can communicate via RGB). so that’s what i have been trying.

but my problem here is that the SPI protocol is 9bit. I have been trying to do this via command line SPI via a command like this: printf ‘\xB9\x1FF\x183\x163’ | spi-pipe -d /dev/spidev0.0 | hexdump -C

but that doens’t seem to work

researching this leads me to think that my only way to do this is by bit-banging the SPI lines for this 9 bit protocol.

you have any good suggestions regarding the SPI? my SPI is working and i can see data being sent to display via oscilloscope - just think i have an issue with 9bit…

thanks for looking into this but i finally got it working…once i created my own bitbanging routine to send 9bit SPI data to display and send it “initialization” data, it started working.

Hi @ctparris,

That’s strange. Do you know why the datasheet says the resolution is 640x480 but the timings tables say it is 854x480? If you could explain this part, perhaps we can write a new overlay that will work for your display.

As far as I know, our hardware SPI does not support 9bit data, only 8 bits. I’ll investigate better whether it’s possible or not, but I would recommend you to try bit-banging it first to check if your display is working. As you mentioned, if it needs to be initialized first, maybe it’s only a problem related to the 9 bit data length.
I know that you can find some C codes that will simulate the SPI easily on the internet.

Could you try that first and send us the results?

Best Regards,
Hiago.

thanks for looking into this but i finally got it working…once i created my own bitbanging routine to send 9bit SPI data to display and send it “initialization” data, it started working.

1 Like

and just in case you were wondering…the settings you provided for the display in the overlay file doesn’t work. My original settings do work. Just thought I’d let you know in case you may see something that may work better.

Hi @ctparris,

I found the datasheet very confusing, so in the end the resolution was indeed 480x854.
I’m glad that this worked for you!

Let me know if you need anything else.

Best Regards,
Hiago.

nevermind…your settings worked too…i had something messed up

thanks again for your help!!

1 Like