分享

imx增加显示接口lcd hdmi port

 灬木木的花灬 2014-11-29

Hello, Jiaoka,

   I don't have your schematic, So  I don't know which port your LCD is connected to , 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)

#setenv ipaddr 192.168.1.103

#setenv serverip 192.168.1.102

#setenv gateway 192.168.1.1

#setenv ethaddr 00:04:9f:00:ea:d3

#setenv nfsroot /opt/nfsroot

#setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'

#setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 androidboot.hardware=freescale'

#setenv bootargs_nfs 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gateway}:${netmask}::eth0 off root=/dev/nfs nfsroot=${serverip}:${nfsroot}'

#setenv bootargs_disp 'setenv bootargs ${bootargs} video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb2:dev=lcd,1440x900,bpp=32 fbmem=32M vmalloc=400M'

#setenv bootcmd_net 'run bootargs_base bootargs_android bootargs_nfs bootargs_disp;tftpboot ${loadaddr} uImage;bootm'

#run bootcmd_net

 

    I tested this porting on a customized board, It is OK ! Please try above steps !

 

Regards,

Weidong

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多