AnsweredAssumed Answered

MIPI DSI to Parallel chip bringup in iMX7d

Question asked by Koil Arul Raj on Jun 3, 2019
Latest reply on Jun 16, 2019 by ANKIT PATEL

Hi,

 

We are using MIPI DSI to Parallel converter chip(TC358762) with iMX7d and we are experiencing problems reading registers from the the chip using the "mipi_dsi_pkt_read" function.
The error message is,
[    3.655822] mxsfb 30730000.lcdif: registered mxc display driver mipi_dsi_samsung
[    4.469595] mxc_mipi_dsi_samsung 30760000.mipi-dsi: wait rx done timeout!
[    4.475087] mipid_tc358762_lcd_setup: MIPI DSI: mipi_dsi_pkt_read failed error = -110

 

However writing DSI regiters doesn't throw any error. But I want to read back the register values in TC358762 chip to ensure configurations written correctly. Because the chip is not responding to any register write.

 

My device tree entry for mipi_dsi is as follows,

 

&lcdif {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&pinctrl_lcdif>;
    pinctrl-1 = <&pinctrl_lcdif>;
    enable-gpio = <&gpio3 1 GPIO_ACTIVE_LOW>;
    display = <&display0>;
    disp-dev = "mipi_dsi_samsung";
    status = "okay";

 

    display0: display@0 {
        bits-per-pixel = <24>;
        bus-width = <24>;

 

        display-timings {
            native-mode = <&timing0>;

 

            timing0: timing0 {
                clock-frequency = <27168240>;
                hactive = <800>;
                vactive = <480>;
                hfront-porch = <50>;
                hback-porch = <50>;
                hsync-len = <2>;    /*2*/
                vback-porch = <10>;
                vfront-porch = <10>;
                vsync-len = <2>;    /*2*/
                hsync-active = <0>;
                vsync-active = <0>;
                de-active = <1>;
                pixelclk-active = <0>;
            };
        };
    };
};

 

&mipi_dsi {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&pinctrl_mipi_dsi_reset>;
    pinctrl-1 = <&pinctrl_mipi_dsi_reset>;
    lcd_panel = "TRULY-WVGA-TC358762";
    disp-power-on-supply = <&reg_mipi_dsi_pwr_on>;
    resets = <&mipi_dsi_reset>;
    status = "okay";                      /* User will change the status from U-Boot */
};

 

mipi_dsi_reset: mipi-dsi-reset {
    compatible = "gpio-reset";
    reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
    reset-delay-us = <50>;
    #reset-cells = <0>;
};

 

We have referred imx7d-sdb-mipi-dsi.dts and mxcfb_hx8363_wvga.c from linux-imx kernel for our driver development.

 

I hereby attached the DSI register read procedure from tc358762 data sheet.

 

We think that the DSI host not performing BTA (Bus Turn Around) properly to give TC358762 the right to transfer back the required data as mentioned in the datasheet? What do you think? Is there any other reason for this failure?

 

The sample read try of chip id from our driver

readdata[0] = 0xa0;    //0xa0;
readdata[1] = 0x04;    //0x04;    (0x4a0 is the chip ID register)
readdata[2] = 0x00;    //0x00;   

readdata[3] = 0x00;    //0x00;    
readdata[4] = 0x00;    //0x00;    
readdata[5] = 0x00;    //0x00;   

err = mipi_dsi->mipi_dsi_pkt_read (mipi_dsi, MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM, (u32 *)readdata, 4);
if (err < 0) {
        printk ("%s: MIPI DSI: mipi_dsi_pkt_read failed error = %d\n",__func__, err);
        return err;
}

 

Kindly help me to resolve this dsi read error.

 

Thanks,
Koil Arul Raj.S

Outcomes