TCC8935 HDMI output

This post describes how to send HDMI signal out on tcc8935.


The LCDC's output can be configured to route to different target modules, like LCD panel (RGB I/F), HDMI, TV Encoder (NTSC/PAL), Analog (LVDS), via OUTPUT MUX.



The route is setup by writing appropriate bits of registers CFG_MISC1 and MISC within VIOC block.

The comments of above register is not clear. But in source code (lk/platform/tcc893x/tcc_lcd_interface.c), we know that writing 'b00 to bit 24-25 can route lcdc output to lcd panel, whereas writing 'b01 to 26-27 routes lcdc output to HDMI module.

int tca_fb_output_path_init(void)
{
    int CFG_MISC_DISP_OUTPUT = (unsigned int)(CFG_MISC);

    BITCSET(CFG_MISC_DISP_OUTPUT, LCD0_SEL, 0 << 24 );    // DISP 0 - LCD,
    BITCSET(CFG_MISC_DISP_OUTPUT, LCD1_SEL, 1 << 26);    // DISP 1 - HDMI
}


Related code: lk/platform/tcc893x/vioc_power.c

void VIOC_OUTCFG_SetOutConfig (unsigned nType, unsigned nDisp)
{
    static VIOC_OUTCFG *gpOutConfig = (VIOC_OUTCFG *)HwVIOC_OUTCFG;

    switch (nType)
    {
        case VIOC_OUTCFG_HDMI :
            gpOutConfig->uMISCCFG.bREG.HDMISEL   = nDisp;
            break;
        case VIOC_OUTCFG_SDVENC :
            gpOutConfig->uMISCCFG.bREG.SDVESEL   = nDisp;
            break;
        case VIOC_OUTCFG_HDVENC :
            gpOutConfig->uMISCCFG.bREG.HDVESEL   = nDisp;
            break;
        case VIOC_OUTCFG_M80 :
            gpOutConfig->uMISCCFG.bREG.M80SEL    = nDisp;
            break;
        case VIOC_OUTCFG_MRGB :
            gpOutConfig->uMISCCFG.bREG.MRGBSEL   = nDisp;
            break;
        default :
            printf ("Not supported type ...");
            break;
    }
}

Regarding TCC8935,  the LCDC 0 is used as LCD panel video source; the LCDC 1 is used as HDMI video source.



HDMI module is comprised of a Tx Controller (LINK) with I2S/SPDIF input interface, a PHY (controlled by I2C), as well as HPD, CES.


HDMI initialization flow in bootloader:

        --- SYSTEM POWER ON ---

        --- platform/tcc893x/platform.c, void platform_init(void) ---

#if defined(DISPLAY_SPLASH_SCREEN) || defined(DISPLAY_SPLASH_SCREEN_DIRECT)
    #ifndef DEFAULT_DISPLAY_OUTPUT_DUAL
        display_init();
        dprintf(INFO, "Display initialized\n");
    #endif


        ---  platform/tcc893x/platform.c,

void display_init(void)
{
#if defined(TCC_LCD_USE)
    fb_config = lcdc_init();
    ASSERT(fb_config);
    fbcon_setup(fb_config);    
#endif
}

        --- platform/tcc893x/lcdc.c

             Note that there are two definitions of function lcdc_init(), one for DEFAULT_DISPLAY_LCD (defined in rules.mk), the other one for other cases.

             The first definition mainly setup parameters related to LCD panel, such as GPIOs (BL, POWER), clock source (according to panel's pixel clock and image sizes.

             Given the fact that HDMI signal always output to TV or computer display but not a panel, such parameters are ignored by second definition. Instead, it calls

             lcdc_io_init_hdmi/component/composite() respectively according to system's configuration. We focus on the later definition in this post.

            

             In case of HDMI output, telechips created a driver for HDMI display,  platform/tcc893x/HDMI_1280x720.c. The driver calls,

             platform/tcc893x/tcc_lcd_interface.c ---> lcdc_initialize() to setup timing registers;

             platform/tcc893x/tcc_lcd_interface.c ---> LCDC_IO_Set() to setup data port (GPIOs)


 In SparkPos project, use LCDC 0 as HDMI source, and change DEFAULT_DISPLAY_LCD to DEFAULT_DISPLAY_HDMI in rules.mk to enable HDMI output in bootloader.

The other modifications include:

1. define panel to HDMI_1280x720 in rules.mk

2. call LCDC_IO_Set() to configure LCDC data pins, in lcdc.c ---> lcdc_init()

3. change HDMI_VIDEO_MODE_TYPE to 4 (1280x720@60Hz) in HDMI_TCC.h


HDMI initialization flow in Kernel:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值