IMX6SLEVK: Custom display - 320x240@60Hz

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX6SLEVK: Custom display - 320x240@60Hz

2,601 Views
felipezimmerle
Contributor II

Dear,

I am trying to setup a custom display on a IMX6SLEVK and I am facing some problems. The main idea is to connect a RGB display and use the fb working in the correct resolution, refresh rate and data format, in my case:

320x240@60Hz RGB666. Usually these options can be set at the kernel boot line, however, it is not working with the imx6slevk. This evk have this fancy panel={lcd,hdmi,einsomething} option and looks like when i select lcd, it always goes to 800x480. I had a look at the code at arch/arm/mach-mx6/board-mx6sl_evk.c, and those values looks pretty fixed to me. Is that any way to get this mx6sl_evk working like the others IMXs? Using the mxcfb0?

Thanks,
F.

Labels (4)
9 Replies

213 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Felipe,

      From imx6sl EVK BSP file : board-mx6sl_evk.c, We can konw the board support "SEIKO-WVGA" LCD , See following code :

static struct fb_videomode wvga_video_modes[] = {
{
  /* 800x480 @ 57 Hz , pixel clk @ 32MHz */
  "SEIKO-WVGA", 60, 800, 480, 29850, 89, 164, 23, 10, 10, 10,
  FB_SYNC_CLK_LAT_FALL,
  FB_VMODE_NONINTERLACED,
  0,},
};

static struct mxc_fb_platform_data wvga_fb_data[] = {
{
  .interface_pix_fmt = V4L2_PIX_FMT_RGB24,
  .mode_str = "SEIKO-WVGA",
  .mode = wvga_video_modes,
  .num_modes = ARRAY_SIZE(wvga_video_modes),
  },
};

static struct platform_device lcd_wvga_device = {
.name = "lcd_seiko",
};

....

mxc_register_device(&lcd_wvga_device, NULL);

......

The LCD's driver is at path linux/drivers/video/mxc/mxc_seiko_wvga.c , you can find driver's name and device's name in bsp are the same:

/*!

* platform driver structure for SEIKO WVGA

*/

static struct platform_driver lcd_driver = {

.driver = {

    .name = "lcd_seiko"},

.probe = lcd_probe,

.remove = __devexit_p(lcd_remove),

.suspend = lcd_suspend,

.resume = lcd_resume,

};

--------------------------------------------------------------------------------------------------------------------------------------

OK, For your customized LCD :

(1)Calculate the LCD's time and fill the fb_videomode accroding to LCD datasheet.

static struct fb_videomode wvga_video_modes[] = {

{

  /* 800x480 @ 57 Hz , pixel clk @ 32MHz */

  "SEIKO-WVGA", 60, 800, 480, 29850, 89, 164, 23, 10, 10, 10,

  FB_SYNC_CLK_LAT_FALL,

  FB_VMODE_NONINTERLACED,

  0,},
{/*Add a new LCD*/
  /* 320x240 @ xx Hz , pixel clk @ xxMHz */
  "MY-LCD", 60, 320, 240, xxx, xxx, xxx, xxx, xxx, xxx, xxx,
  FB_SYNC_CLK_LAT_FALL,
  FB_VMODE_NONINTERLACED,
  0,},
};

(2)Update static struct mxc_fb_platform_data wvga_fb_data[]

static struct mxc_fb_platform_data wvga_fb_data[] = {
{
  .interface_pix_fmt = V4L2_PIX_FMT_RGB666,
  .mode_str = "MY-LCD",
  .mode = wvga_video_modes,
  .num_modes = ARRAY_SIZE(wvga_video_modes),
  },
};

(4)Create a new LCD device

static struct platform_device lcd_wvga_device = {
.name = "lcd_mine",
};

(5)Add a new driver for your LCD

It is not difficult to add a new driver for you LCD, you can refer to linux/drivers/video/mxc/mxc_seiko_wvga.c, create a new driver file at the same path. Notice that driver's name should be same as that of device:

static struct platform_driver lcd_driver = {

.driver = {

    .name = "lcd_mine"},

.probe = lcd_probe,

.remove = __devexit_p(lcd_remove),

.suspend = lcd_suspend,

.resume = lcd_resume,

};

(6)Register your LCD device(same as that of in bsp)

mxc_register_device(&lcd_wvga_device, NULL);

After the above steps are done, compile linux kernel. burn it into your board.

Your LCD should normally work at 320x240 resolution.

regards,

Weidong

213 Views
jaiprakash
Contributor I

Hello Weidong,

                        i have wandboard quad core and ortus tech lcd 240x320 of 3.5", but didn't found anything related to Calculate the LCD's time and fill the fb_videomode in LCD datasheet. I want to know on which of lcd to look for finding the lcd time. I want to how to set the value of  fb_videomode, from i can get value of these fields. So help me to complete my task

Regards

Jai Prakash

jaiprakash28790@gmail.com 

0 Kudos

213 Views
hieple
Contributor I

Dear Weidong,

Could you tell me the meaing of each of parameter in this phase?

"SEIKO-WVGA", 60, 800, 480, 29850, 89, 164, 23, 10, 10, 10,

I need to know this info to do custom for my LCD.

Looking forward to hearing from you soon.

Thanks and best regards.

0 Kudos

213 Views
felipezimmerle
Contributor II

I am patching the code right now, thank you for you help Weidong.

0 Kudos

213 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello, Felipe,

     If above steps is OK or helpful, Please help me press corresponding button "correct or helpful".

Thanks,

Regards,

Weidong

0 Kudos

213 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Felipe,

      Has your LCD poring been done ?

Regards,

Weidong

0 Kudos

213 Views
felipezimmerle
Contributor II

Hi Weidong, sorry, I am still waiting for the LCD module :smileysad:

0 Kudos

213 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,Felipe,

      you mean you bought a LCD module, but you didn't get it , right ?

Regards,

Weidong

0 Kudos

213 Views
felipezimmerle
Contributor II

Hi there,

I've bought it, and i am still waiting to receive.

--

F.

0 Kudos