Hello yuan,
You can refer to the follow steps, hope it can help you.
Let me assume you use one of the following ports:
(1)DISP0
----adding your LCD timing to "linux_top/drivers/video/mxc/mxc_lcdif.c" (static struct fb_videomode lcdif_modedb[] =)
If I add a LCD with 1440x900, I should add the timing :
static struct fb_videomode lcdif_modedb[] = {
{
/* 800x480 @ 57 Hz , pixel clk @ 27MHz */
"CLAA-WVGA", 57, 800, 480, 37037, 40, 60, 10, 10, 20, 10,
FB_SYNC_CLK_LAT_FALL,
FB_VMODE_NONINTERLACED,
0,},
{
/* 800x480 @ 60 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,},
{/* According to the datasheet of your LCD, collect it's timing and fill it here */
/* VGA 1440x900 106.5M pixel clk output */
"1440x900", 60, 1440, 900, 9389,
232, 80,
25, 3,
152, 6,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
}
(2)Using LVDS port
Open "linux_top/drivers/video/mxc/ldb.c", and replace original one with yours :
static struct fb_videomode ldb_modedb[] = {
{/* No.1 member is added by me and validated. */
"LDB-WXGA", 60, 1280, 800, 13812,
60, 60,
20, 15,
40, 3,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
{
"LDB-XGA", 60, 1024, 768, 15385,
220, 40,
21, 7,
60, 10,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
{
"LDB-1080P60", 60, 1920, 1080, 7692,
100, 40,
30, 3,
10, 2,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
};
(3) Adjust BSP File
static struct ipuv3_fb_platform_data qcorein_fb_data[] = {
{/*fb0*/
.disp_dev = "ldb",
.interface_pix_fmt = IPU_PIX_FMT_RGB666,
.mode_str = "LDB-WXGA",
.default_bpp = 16,
.int_clk = false,
.late_init = false,
},
{
.disp_dev = "hdmi",
.interface_pix_fmt = IPU_PIX_FMT_RGB24,
.mode_str = "1920x1080M@60",
.default_bpp = 32,
.int_clk = false,
.late_init = false,
},
{
.disp_dev = "lcd",
.interface_pix_fmt = IPU_PIX_FMT_RGB24,
.mode_str = "1440x900",
.default_bpp = 32,
.int_clk = false,
},
};
(4)Distrabuting IPU display source
static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = {
.ipu_id = 1,
.disp_id = 0,
};
static struct fsl_mxc_lcd_platform_data lcdif_data = {
.ipu_id = 0,
.disp_id = 0,
.default_ifmt = IPU_PIX_FMT_RGB24,
};
static struct fsl_mxc_ldb_platform_data ldb_data = {
.ipu_id = 0,
.disp_id = 1,
.ext_ref = 1,
.mode = LDB_SEP1, /*Using LVDS1 Port*/
.sec_ipu_id = 0,
.sec_disp_id = 0,
};
(5)Setting u-boot environment (starting from NFS)
Have a great day,
Dan
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------