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