Kyrocera 3.5 LCD Display Driver for iMx6ul

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

Kyrocera 3.5 LCD Display Driver for iMx6ul

2,157 Views
davidzhou
Contributor V

Hi,

I currently have imx6ul development board, I need to use kyrocera 3.5 LCD display.

I made a frequency change in the imx6ul-evk.dtsi file
/* Parallel LCD FRC pinctrl_lcdif_dat18_23*/
&lcdif {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_lcdif_dat0_17
       &pinctrl_lcdif_clken
    &pinctrl_lcdif_dat0_17  
    &pinctrl_lcdif_clken
    &pinctrl_lcdif_hvsync
    &pinctrl_lcdif_reset>;
 display = <&f07a0102>;
 status = "okey";

 f07a0102: display@0
  bits-per-pixel = <16>;
  bus-width = <18>;
  /* FRC  */
  //lcd_reset_gpio = <&gpio3 14 0>;
  lcd_panel = "FRCKYROCERA";

  display-timings {
   native-mode = <&timing0>;
   timing0: timing0 {
    clock-frequency = <6500000>;
    hactive = <320>;
    hfront-porch = <10>;
    hsync-len = <20>;
    hback-porch = <58>;
    hsync-active = <0>;

    vactive = <240>;
    vfront-porch = <2>;
    vsync-len = <4>;
    vback-porch = <16>;
    vsync-active = <0>;

    de-active = <1>;
    pixelclk-active = <1>;
   };
  };
 };
};

But the frequency is not changed to 6.5 Mhz.
Can you help me and point the file which loads Display Timing0 parameters?


Do you have any driver code that can be used for Kyrocera LCD? 

Thank you ,
David Zhou

0 Kudos
8 Replies

1,376 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

one can debug it using Chapter 12 ELCDIF Frame Buffer Driver,

sect.12.5 Source Code Structure attached Linux Manual.

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

0 Kudos

1,376 Views
davidzhou
Contributor V

Hi Igor,

I have found and reviewed mxsfb.c as in section 12.5. But it seems to me that this is mipi-based driver.

Currently it fails at

mxc_dispdrv_gethandle

It seems that spi interface is not binded to the mxc_dispdrv. I don’t know it is wrong device tree configuration and I need to patch some .c file to bind the spi interface into mxc_dispdrv.

Do I have to call mxc_dispdrv_puthandle to bind spi interface?

Secondly, the mxc_dispdrv_gethandle is defined in the mxc_dispdrv, which only exports setup_ and

mipid_xxx_get_lcd_videomode for callbacks. So how can the write/read registers functions match with spi_read/write functions ?

Thank you,

David

0 Kudos

1,376 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

right, spi is not supported for lcd driver, one can look at such example on

https://community.nxp.com/thread/447204

Best regards
igor

0 Kudos

1,376 Views
davidzhou
Contributor V

Hi Igor,

Thank you for your response and pointing to me with the links of the useful materials.

I found there are two similar frame buffer based lcd device driver files:

Mxc_lcdif.c and mxsfb.c . mxc_lcdif.c is ipu-interface ? It is my first time to do linux/yocto. Very confusing to me at this point.

I just want to make sure that with mxsfb.c itself with a custom spi interface, it shall work, right? I don’t want to waste time if mxsfb.c can not interface with spi. Also If you have time, give me a few lines of instructions with the device-tree of lcdif / spi .

Thank you for your time and help.

David

0 Kudos

1,376 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

mxc_lcdif.c is not ipu-interface, it is used with pxp module. Had you looked at

Linux Manual, it shows drivers structure.

Best regards
igor

0 Kudos

1,376 Views
davidzhou
Contributor V

Hi Igor,

I moved away a few days for something else . I have reviewed the patch for SPI-based LCD in UBOOT branch of code. There are many questions. It seems to me that UBOOT branch is kind-of independent from driver-branch of code. If something is enabled / built in the UBOOT, may not available in driver-level, right? There is a msxfb.c in the UBOOT, which is quite different from msxfb.c in the driver side. Anything available in the driver branch that initializes LCD using SPI?

Thank you for your time.

David

0 Kudos

1,376 Views
igorpadykov
NXP Employee
NXP Employee

Hi David

LCDs using SPI are not supported in uboot/linux nxp bsps,

so one will have to add support for it.

Best regards
igor

0 Kudos

1,376 Views
davidzhou
Contributor V

Igor,

Thank you for help,

David

0 Kudos