Overlay for LVDS HITACHI display

Hi,

I’m stuggulling to make my apalis imx6 (torizon 5.3.0) working with a HITACHI TX18D37VM0APA screen.

I already applied this overlay : device-trees/apalis-imx6_lvds_overlay.dts at toradex_5.4-2.1.x-imx · toradex/device-trees · GitHub
to enable the interface.
The first issue I met came from here. The last node of the overlay didn’t worked properly (I was able to compile it but not to apply it : “error: overlay ‘device-trees/overlays/apalis-imx6_lvds_overlay.dts’ is not applicable.” )

So I removed the last node :

&mxcfb1 {
status = “okay”;
};

I also removed the second channel because I only use the first one. It gave me the following overlay:

// Enable the LVDS interface on the Apalis iMX6Q. Make sure to also select a valid display configuration.

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,apalis_imx6q";
};

&backlight {
	status = "okay";
};

&ldb {
	status = "okay";

	lvds-channel@0 {
		status = "okay";
	};

};

After that I tried to extract data from my display datasheet (you can find it here: https://datasheetspdf.com/pdf-file/707594/Hitachi/TX18D37VM0APA/1)

But I didn’t found some properties: data-mapping, vfront-porch, hsync-len, vsync-len, hsync-active, vsync-active, pixelclk-active.

So I reused an overlay example : device-tree-overlays/display-lt170410-overlay.dts at toradex_5.4.y · toradex/device-tree-overlays · GitHub

I obtained the following overlay:

// LT170410 display (10inch) with a resolution of 1280x800 pixel. This display can be ordered at Toradex.

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,apalis_imx6q";

	fragment@0 {
		target-path="/panel-lvds";
		__overlay__ {
			status = "okay";

			data-mapping = "vesa-24";
			width-mm = <152>;
			height-mm = <91>;

			panel-timing {
				clock-frequency = <33230769>;
				hactive = <800>;
				vactive = <480>;
				hback-porch = <216>;
				hfront-porch = <40>;
				vback-porch = <34>;
				vfront-porch = <11>;
				hsync-len = <2>;
				vsync-len = <2>;
				hsync-active = <0>;
				vsync-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
};

I deployed it successfully but my screen is still not working.

do you have any idea what i can do to make my screen work?

Best regards,

rfonck

Apalis imx6q
Torizon 5.3.0
hitachi TX18D37VM0APA

Hi @rfonck,

Have you followed our instructions for setting up displays with Torizon?

Drew

Hi @drew.tx ,

Yes I followed it but there are only a few lines that carry on configuring other displays with Torizon.

If you have any idea that can help me I will be very grateful.

Best regards,
rfonck

Hi @rfonck

Can you clarify how you calculated the timing parameters listed in your DTS above? I’m not terribly familiar with LVDS timing stuff so I’m syncing with others internally who know more but it will be helpful if you clarify how you came up with these parameters.

We also have this document which may be helpful.

Drew

Hi, of course.

At first I got the model available on the toradex github: device-tree-overlays/display-lt170410-overlay.dts at toradex_5.4.y · toradex/device-tree-overlays · GitHub

The property I had to replace were:

  • data-mapping
  • width-mm
  • height-mm
  • clock-frequency
  • hactive
  • vactive
  • hback-porch
  • hfront-porch
  • vback-porch
  • vfront-porch
  • hsync-len
  • vsync-len
  • hsync-active
  • vsync-active
  • pixelclk-active

I found this : image
on this article: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiimt3d4pTyAhXM_7sIHbbuAxQQFnoECCQQAw&url=https%3A%2F%2Fcommunity.nxp.com%2Fpwmxy87654%2Fattachments%2Fpwmxy87654%2Fimx-processors%40tkb%2F905%2F8%2FDual%20LVDS%20for%20High%20Resolution%20Display.pdf&usg=AOvVaw01GlVbJlLLnzilzSa7FSlZ

Then I used my display documentation that I found here: https://datasheetspdf.com/pdf-file/707594/Hitachi/TX18D37VM0APA/1

I found this figure:

That refers to these values (I think):

  • clock-frequency: 33000000
  • hactive : 1056
  • vactive : 525
  • hback-porch: 216
  • hfront-porch: 40
  • vback-porch : 34
  • vfront-porch : 11

I also found:

That made me think that:

  • width-mm: 152 (I don’t understant why these properties are importants)
  • height-mm: 91

And this figure:

that indicated me that:

  • hsync-len: 60
  • vsync-len: 31.5
    (maybe a conversion must be done but I don’t know in which unit !)

Does it seems right to you ?

The value I still didn’t found now are :

  • data-mapping
  • hsync-active
  • vsync-active
  • pixelclk-active

I continue to inquire about device tree and lvds to find these values.

Best regards,
rfonck

Hi @rfonck

I cannot understand the numbers for hsync-len and vsync-len: 31.5, maybe you can ask this to the manufacturer.
In general, connecting a custom display about rgb or lvds interface is a tricky task.

Did you already try to change the pixel clock polarity? Is the backlight on?
Could you share your final devicetree and overlay, so I can have a look?
Are you using Toradex Boards or do you have a custom carrier board?

Best regards,
Jaski

Hi @rfonck

Is this issue solved? If yes, could you share your solution?

Thanks and best regards,
Jaski

Hi,

after several tries I made it works with the following overlay:

/dts-v1/;
/plugin/;

/ {
        compatible = "toradex,apalis_imx6q";
        fragment@0 {
                target-path = "/ldb";
                __overlay__ {
                        status = "okay";
                };
        };

        fragment@1 {
                target-path = "/backlight";
                __overlay__ {
                        status = "okay";
                };
        };
                fragment@2 {
                        target-path="/panel-lvds";
                        __overlay__ {
                                status = "okay";

                                data-mapping = "vesa-24";


                                panel-timing {
                                        clock-frequency = <33000000>;
                                        hactive = <800>;
                                        vactive = <480>;
                                        hback-porch = <216>;
                                        hfront-porch = <38>;
                                        vback-porch = <36>;
                                        vfront-porch = <11>;
                                        hsync-len = <2>;
                                        vsync-len = <2>;
                                        hsync-active = <0>;
                                        vsync-active = <0>;
                                        pixelclk-active = <0>;
                                };
                        };
                };


};

But the colors are not respected.

I think there is an issue because the constraint: hback_porch + hactive + hfront_porch + hsync-len is not respected.

best regards,
rfonck

Hi @rfonck

These are good news. Could you share a picture showing which colour are not respected? Best would be to use a picture with colour stripes as this one.

Best regards,
Jaski

Hi @jaski.tx,

sorry to answer so late but I wasn’t working on this project for a long time.

I still didn’t found where the error was comming from.

You will find bellow some pictures of the screen issue.





Best regards,
rfonck

hi @jaski.tx,

I am continuing to look on lvds specifications to see what can happend. Have you any idea ?

Best regards,
rfonck

Hi @rfonck

Sorry for my late reply. The issue is data-mapping = “vesa-24” in your overlay. You display is only 18-bit, so you need to adapt this in your overlay.

Best regards,
Jaski

1 Like