MIPI DSI bring up for a Truly display with HX8363 driving controller on i.MX7D

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIPI DSI bring up for a Truly display with HX8363 driving controller on i.MX7D

5,353 Views
gaun
Contributor II

Hi,

I am currently using the i.MX7D Sabre development board and I am trying to interface a Truly display with HX8363 mipi driving controller. For this I am porting the HX8369_wvga driver to the HX8363 as the registers are similar.

The problem is that I keep getting the following error:

mxc_mipi_dsi_samsung 30760000.mipi-dsi: MIPI DSI dispdrv inited!
mxsfb 30730000.lcdif: registered mxc display driver mipi_dsi_samsung
mxc_mipi_dsi_samsung 30760000.mipi-dsi: wait rx done timeout!
mxc_mipi_dsi_samsung 30760000.mipi-dsi: mipi_dsi_pkt_read err:-110, data:0xf4.

The data of 0xF4 is for the basic GETTHXID command.

My lcdif node in the dtsi is as follows:

&lcdif {
     /* No need for pinctrl as the mipi pinctrl is dedicated */
     display = <&display0>;
     disp-dev = "mipi_dsi_samsung";

     status = "okay";

     display0: display {
          bits-per-pixel = <24>;
          bus-width = <24>;
          display-timings {
               native-mode = <&timing0>;
               timing0: timing0 {
               clock-frequency = <34300000>;
               hactive = <480>;
               vactive = <854>;
               hfront-porch = <5>;
               hback-porch = <5>;
               hsync-len = <5>;
               vback-porch = <2>;
               vfront-porch = <2>;
               vsync-len = <2>;

               hsync-active = <0>;
               vsync-active = <0>;
               de-active = <1>;
               pixelclk-active = <0>;
               };
          };
     };
          
};

My mipi_dsi node is as follows:

&mipi_dsi {
     dev_id = <0>;
     disp_id = <0>;
     lcd_panel = "TRULY-TFT3P5581";
     resets = <&mipi_dsi_reset>;
     status= "okay";
};

/* Setting the reset to dummy to keep the mipi_dsi_samsung silent */
mipi_dsi_reset: mipi-dsi-reset {
     compatible = "gpio-reset";
     /* GPIO1_2 selected because of unused MKBUS_PWM2 */
     reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
     reset-delay-us = <50>;
     #reset-cells = <0>;
};

In the i.mx7 sabresd board there is no reset pin for the MIPI display. Hence I put a dummy gpio pin so that the mipi_dsi_samsung driver does not complain.

In the mxcfb_hx8363 (ported from hx8369) I have the following for fb_videomode:

static struct fb_videomode truly_lcd_modedb[] = {
     {
      "TRULY-TFT3P5581", 60, 480, 854, 29154 /* pixclock in pico seconds */,
      5, 5,
      2, 2,
      5, 2,
      FB_SYNC_OE_LOW_ACT,
      FB_VMODE_NONINTERLACED,
      0,
     },
};

I am not able to understand what I am doing wrong. Please help me in configuring this.

Labels (4)
7 Replies

2,686 Views
igorpadykov
NXP Employee
NXP Employee

Hi Gautam

seems there is already exists HX8363 driver as mxcfb_hx8363_wvga.c

linux-imx.git - i.MX Linux Kernel 

one can add its record to mipi_dsi.c struct struct mipi_dsi_match_lcd mipi_dsi_lcd_db

linux-imx.git - i.MX Linux Kernel 

use imx7d-sdb-mipi-dsi.dts

linux-imx.git - i.MX Linux Kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,686 Views
gaun
Contributor II

Igor,

I am trying to write the driver for the HX8363-B. In the link that you provided the "Set Power" in the link http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/drivers/video/fbdev/mxc/mxcfb_hx8363_wv...

shows 19 parameters but the H8363-B has only 15 parameters and the H8363-A has only 12 parameters. So I am not sure whether the driver fits my requirements.

0 Kudos

2,686 Views
igorpadykov
NXP Employee
NXP Employee

Hi Gautam

please apply to HX8363-B vendor for clarifications of its product usage.

Best regards
igor

0 Kudos

2,686 Views
gaun
Contributor II

Thank you Igor. I will try and see if I can use it as I am using android with the kernel mentioned in the user guide.

I have attached spreadsheet to calculate the MIPI DSI pixel clock frequency and the input to be added in Linux pixclock parameter. Could you please verify if my calculations are correct in the attached spreadsheet? I have seen other people on this forum struggle with the calculations and they could use my spreadsheet.

0 Kudos

2,686 Views
michaelbrudevo1
Contributor III

Based on my experience just now, the Linux Pixel clock setting is not quite correct in the spreadsheet.  The pixel clock needs to utilize C22 not C24, as multiple lanes speed up the transfer of data, but you still need the underlying clock to be based on the total transfer.  In my case, I was getting a 30 Hz output rather than the intended 60 Hz on a 2 lane bus.

2,686 Views
LinhNguyen
Contributor III

Hi Michael,

Can you please share a correct calculation sheet for iMX8M? I use the file from Gautam above, but the display still have horizontal flicker lines :smileysad:.

Thank you.

0 Kudos

2,686 Views
michaelbrudevo1
Contributor III

Linh,

I can't really say for the iMX8M, you'd have to confirm with NXP on how similar they are.  In terms of the spreadsheet, it really was just changing the formulas in C26 and C27 to point to C22 rather than C24.  The main missing point for me was understanding that the LCDIF drove the frame rate, and the MIPI bus is configured separately but just needs enough bandwidth to transfer at the rate the LCDIF would create the typical parallel signals.