Interfacing a LCD TFT display to i.MX6 Sabre SD board.

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

Interfacing a LCD TFT display to i.MX6 Sabre SD board.

13,691 Views
carlobarbaro
Contributor III

Hello, I'm attempting to interface a dumb LCD TFT color display (240x320, 16 bit lcddata in format RGB=565) to the Sabre SD board (not using the LVDS interface).

Actually I'm working using the LTIB environment, but compiling the Linux kernel taked from Android BSP.

Where can I find resources (sample code, Application Notes, etc..) that can help me to speed up my task?

I found very useful Freescale app notes (AN3974, AN4182) entitled "Different display configurations on the iMX31 or iMX35 Linux PDK" but nothing similar for i.MX6.

I'm not sure if I have to develop a device driver specific to my panel (for example cloning the source of mxcfb_claa_wvga.c module) or if it is sufficient compile the mxc_lcdif.c

module adding an entry with my panel data in the lcdif_modedb array containing all supported videomodes.

Thank you, any suggestion will be greatly appreciated.

Carlo Barbaro

Labels (3)
9 Replies

2,205 Views
vahidnoori
Contributor II

hi.

i have a imx5 and imx6 board . i decided to run tft lcd by its. but i dont know what tft is suitable (lvds interface and driver for linux) for this boards?

tancks.

vahid

0 Kudos

2,205 Views
varsmolta
Contributor V

Add your lcd params like shown in this patch: https://github.com/boundarydevices/linux-imx6/commit/a19b497bbd549509528f2766b88d35b67a996d9d#L8R53

and change your kernel command-line to include the name.

So if you add a display named mypanel into the lcdif_modedb array, you can use it by setting this value into bootargs under U-Boot:

            video=mxcfb0:dev=lcd,mypanel,if=RGB565 

Also the 16- and 18-bit lcd pin mappings are shown here:

Re: sabrelite imx6 lcd not displaying correct colors

2,205 Views
anandrajendran
Contributor II

Can anyone post the details on how to add initialization sequence sent through SPI interface?

Thanks,

Anand

0 Kudos

2,205 Views
carlobarbaro
Contributor III

Give a look at the module drivers/video/mxc/mxcfb_epson_vga.c

This module registers two drivers: lcd_plat_driver and lcd_spi_dev_driver

Both drivers have the name "lcd_spi".

In my case I removed the lcd_plat_driver and changed the spi initialization sequences, to fit the ones required by my panel.

As suggested by varsmolta, in platform initialization I had to add a spi platform device with the same name, "lcd_spi", otherwise the driver probe function is not called.

Regards,

Carlo

0 Kudos

2,205 Views
vahidnoori
Contributor II

hi.

i have a imx5 and imx6 board . i decided to run tft lcd by its. but i dont know what tft is suitable (lvds interface and driver for linux) for this boards?

tancks.

vahid

0 Kudos

2,205 Views
carlobarbaro
Contributor III

Hi,

in effect my U-Boot string looks like:

video=mxcfb0:dev=lcd,NEC-QVGA,if=RGB565 video=mxcfb1:off

and I added the following entry in fb_videomode structure of module mxc_lcdif.c:

{

    /* 240x320 @ 60 Hz , pixel clk @ 5MHz */

    "NEC-QVGA",    // name
    60,    // refresh
    240,    // xres
    320,    // yres
    200000,   // pixclock (period in picoseconds)
    4,    // left_margin
    4,    // right_margin
    1,    // upper_margin
    1,    // lower_marging
    8,    // hsync_len
    2,   // vsync_len

    FB_SYNC_CLK_LAT_FALL,    // sync

    FB_VMODE_NONINTERLACED,    // vmode

    0,},   // flag

I'm cloning the entire boundarydevices/linux-imx6 project to have a full view of files, but I need some time to get it.

Carlo

2,205 Views
varsmolta
Contributor V

Does your device name match the name of the device driver: http://stackoverflow.com/questions/9168885/when-does-the-probe-function-for-a-linux-kernel-driver-ge...

And are you registering the platform device?

Also, I used the "fbset -t" command to figure out the timings on a trial and error basis for my lcd since the initial ones that I coded in the fb_videomode weren't right. This may be of help to you

http://linux.die.net/man/8/fbset

0 Kudos

2,205 Views
SergioSolis
NXP Employee
NXP Employee

Hello Carlo,

The app notes you mentioned are the only ones available for what you need to do.

You pretty much got it, you need to modify the driver to the specs of your TFT, but, you need to compile everything all over again, not just the module. It won't work if you don't compile.

2,205 Views
carlobarbaro
Contributor III

Hi SerchMX,

thank you for the information, at least I don't waste time to search for further documentation.

Regarding my attempts, I badly explained: whenever I change the mxc_lcdif.c (or any other module) I compile all kernel getting a new image.

I cloned the mxcfb_claa_wvga.c module to a mxcfb_nec_qvga.c adding it to the makefile.

I'm at the point that my customized module init's function is called but the probe function is not.

I checked with the scope the display interface and is putting the pixel clock frequency that I specified.

But this is not sufficient since my display needs an initialization sequence sent through SPI interface.

Thank you,

Carlo

0 Kudos