Dual Display Based on i.MX6Q via HDMI & VGA(Analog RGB )

Document created by Wigros Sun Employee on Sep 20, 2016
Version 1Show Document
  • View in full screen mode

Two IPUs are supported in i.MX6Q SoC, each IPU supports 1920x1080 resolution, and 4 kinds of interfaces on i.MX6Q PADs can be used to connect display devices: HDMI, Digital RGB24, LVDS1+LVDS2, MIPI DSI.

In the documents, we will discuss how to expand VGA port with digital RGB and realize dual-display via HDMI & VGA, The solution has been validated on Android4.2.2 and Android4.4.2 BSP released by NXP.

1.  Expanding VGA port based on digital RGB24 interface with ADV7125

Schematic is in attachments.

2. Configurations of envionment variables in u-boot

The following settings are for booting via NFS, users can adjust them to boot via Flash on board.

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 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=hdmi,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb1:dev=lcd,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb2:off fbmem=32M vmalloc=400M'
setenv bootcmd_net 'run bootargs_base bootargs_android bootargs_nfs bootargs_disp;tftpboot ${loadaddr} uImage;bootm'

3. Configurations in BSP file

(1)IOMUX of DISP0 port (in header file)

    MX6Q_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
    MX6Q_PAD_DI0_PIN15__IPU1_DI0_PIN15,        /* DE */
    MX6Q_PAD_DI0_PIN2__IPU1_DI0_PIN2,        /* HSync */
    MX6Q_PAD_DI0_PIN3__IPU1_DI0_PIN3,        /* VSync */
    MX6Q_PAD_DISP0_DAT0__IPU1_DISP0_DAT_0,
    MX6Q_PAD_DISP0_DAT1__IPU1_DISP0_DAT_1,
    MX6Q_PAD_DISP0_DAT2__IPU1_DISP0_DAT_2,
    MX6Q_PAD_DISP0_DAT3__IPU1_DISP0_DAT_3,
    MX6Q_PAD_DISP0_DAT4__IPU1_DISP0_DAT_4,
    MX6Q_PAD_DISP0_DAT5__IPU1_DISP0_DAT_5,
    MX6Q_PAD_DISP0_DAT6__IPU1_DISP0_DAT_6,
    MX6Q_PAD_DISP0_DAT7__IPU1_DISP0_DAT_7,
    MX6Q_PAD_DISP0_DAT8__IPU1_DISP0_DAT_8,
    MX6Q_PAD_DISP0_DAT9__IPU1_DISP0_DAT_9,
    MX6Q_PAD_DISP0_DAT10__IPU1_DISP0_DAT_10,
    MX6Q_PAD_DISP0_DAT11__IPU1_DISP0_DAT_11,
    MX6Q_PAD_DISP0_DAT12__IPU1_DISP0_DAT_12,
    MX6Q_PAD_DISP0_DAT13__IPU1_DISP0_DAT_13,
    MX6Q_PAD_DISP0_DAT14__IPU1_DISP0_DAT_14,
    MX6Q_PAD_DISP0_DAT15__IPU1_DISP0_DAT_15,
    MX6Q_PAD_DISP0_DAT16__IPU1_DISP0_DAT_16,
    MX6Q_PAD_DISP0_DAT17__IPU1_DISP0_DAT_17,
    MX6Q_PAD_DISP0_DAT18__IPU1_DISP0_DAT_18,
    MX6Q_PAD_DISP0_DAT19__IPU1_DISP0_DAT_19,
    MX6Q_PAD_DISP0_DAT20__IPU1_DISP0_DAT_20,
    MX6Q_PAD_DISP0_DAT21__IPU1_DISP0_DAT_21,
    MX6Q_PAD_DISP0_DAT22__IPU1_DISP0_DAT_22,
    MX6Q_PAD_DISP0_DAT23__IPU1_DISP0_DAT_23,
    MX6Q_PAD_NANDF_D4__GPIO_2_4,        /* ADV7125 Power on / off

(2) Frame buffer

static struct ipuv3_fb_platform_data qcorein_fb_data[] = {
/*    {
    .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 = "1920x1080",
    .default_bpp = 32,
    .int_clk = false,
    },
};

(3) Settings about IPUs

/* HDMI -- IPU1_DI0 */
static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = {
    .ipu_id = 1,
    .disp_id = 1,
};

 

/* RGB24 DISP0 LCD(Here is RGB24-->VGA via ADV7125 -- IPU0_DI0 */
static struct fsl_mxc_lcd_platform_data lcdif_data = {
    .ipu_id = 0,
    .disp_id = 0,
    .default_ifmt = IPU_PIX_FMT_RGB24,
};

(4) Adding LCD data in board_init() funtion

static void __init mx6_qcorein_board_init(void)

{

....

imx6q_add_lcdif(&lcdif_data);

...

}

(5) Adding mxc_lcd.c driver to linux kernel

When using make menuconfig to configure kernel, don't forget to add LCD driver to kernel.

 

 Note: If users are using other version of android BSP, she can do porting according to above thinking.

 

Weidong Sun

NXP TIC team

1 person found this helpful

Attachments

Outcomes