This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EG-17: TDA2EG-17 IPU HDMI output

Part Number: TDA2EG-17

HI master:

     sdk: processor_sdk_vision_03_05_00_00  

     my board boot as linux target,

    now

/* PHY_PWR_CMD */
static Int32 halHdmiWpSetPhyPwr(vpsHal_hdmiPhyPwr status)
{
    Int32  retVal = BSP_SOK;
    UInt32 cnt;
    UInt32 regVal;
	GT_0trace(VpsHalTrace, GT_INFO, "YGJ halHdmiWpSetPhyPwr-------------\r\n");

    /* Command for power control of HDMI PHY */
    HW_WR_FIELD32(
        SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,
        HDMI_WP_PWR_CTRL_PHY_CMD,
        status);

    /* Status of the power control of HDMI PHY */
    regVal = HW_RD_FIELD32(SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,
                           HDMI_WP_PWR_CTRL_PHY_STATUS);
    cnt = 0;
    while ((regVal != status) && (cnt < 1000U))
    {
        BspOsal_sleep((UInt32) 1U);
        regVal = HW_RD_FIELD32(SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,
                            HDMI_WP_PWR_CTRL_PHY_STATUS);
        cnt++;
		
		GT_1trace(VpsHalTrace, GT_INFO, "YGJ halHdmiWpSetPhyPwr------------cnt=%d\r\n",cnt);
    }
    if (cnt >= 1000U)
    {
        if (VPSHAL_HDMI_PHYPWRCMD_TXON == status)
        {
            /* In case HDMI cable is not connected PHYPWR status wont change to
             * TxOn till cable is connected. Donot return error here */
        }
        else
        {
            retVal = BSP_ETIMEOUT;
        }
		
		GT_0trace(VpsHalTrace, GT_INFO, "YGJ halHdmiWpSetPhyPwr------------2-\r\n");
    }

    return (retVal);
}


Int32 vpshal_HdmiPhyPowerOn(const VpsHal_DssHdmiTimingParam *timing)
{
    Int32  retVal  = BSP_SOK;
    UInt16 freqout = 1U;
	GT_0trace(VpsHalTrace, GT_INFO, "YGJ vpshal_HdmiPhyPowerOn-------------\r\n");

    /* enable divby2 */
    HW_WR_FIELD32(
        SOC_HDMI_PHY_BASE + HDMI_BIST_CONTROL,
        HDMI_BIST_CONTROL_DIV2EN_HFBITCLK,
        0x01U);

    retVal = halHdmiWpSetPhyPwr(VPSHAL_HDMI_PHYPWRCMD_LDOON);
	GT_1trace(VpsHalTrace, GT_INFO, "YGJ vpshal_HdmiPhyPowerOn-----------2--retVal=%d\r\n",retVal);

    /*
     *  HDMI_WP_PWR_CTRL doesn't seem to reflect the change in power states,
     *  ignore the error for now - It should be on HPD else might burn out
     */

    /*
     * Read address 0 in order to get the SCP reset done completed
     * Dummy access performed to make sure reset is done
     */
    HW_RD_REG32(SOC_HDMI_PHY_BASE + HDMI_TX_CONTROL);

    /*
     * Write to phy address 0 to configure the clock
     * use HFBITCLK write HDMI_TXPHY_TX_CONTROL_FREQOUT field
     */
    if (timing->pixel_clock < 62500)
    {
        freqout = 0U;
    }
    else if ((timing->pixel_clock >= 62500) && (timing->pixel_clock < 185000))
    {
        freqout = 1U;
    }
    else
    {
        /* clock frequency > 185MHz */
        freqout = 2U;
    }

    HW_WR_FIELD32(
        SOC_HDMI_PHY_BASE + HDMI_TX_CONTROL,
        HDMI_TX_CONTROL_FREQOUT,
        freqout);

    /* Write to phy address 1 to start HDMI line (TXVALID and TMDSCLKEN) */
    HW_WR_REG32(SOC_HDMI_PHY_BASE + HDMI_DIGITAL_CONTROL, 0xF0000000U);

    /* Write to phy address 3 to change the polarity control */
    HW_WR_FIELD32(
        SOC_HDMI_PHY_BASE + HDMI_PAD_CONFIG_CONTROL,
        HDMI_PAD_CONFIG_CONTROL_FLIP_P_N_ORDER_CLK,
        0x01U);

    retVal += halHdmiWpSetPhyPwr(VPSHAL_HDMI_PHYPWRCMD_TXON);
    GT_1trace(VpsHalTrace, GT_INFO, "vpshal_HdmiPhyPowerOn-------------retVal=%d\r\n",retVal);
    return (retVal);
}

Because I did not connect to the HDMI receiver, resulting in

Int32 vpshal_HdmiPhyPowerOn (const VpsHal_DssHdmiTiming Param*timing)

Called

HalHdmiWpSetPhyPwr (VPSHAL_HDMI_PHYPWRCMD_TXON);

RegVal = HW_RD_FIELD32 (SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,

HDMI_WP_PWR_CTRL_PHY_STATUS;

The read state has never been VPSHAL_HDMI_PHYPWRCMD_TXON

RegVal!= VPSHAL_HDMI_PHYPWRCMD_TXON;

Static Int32 halHdmiWpSetPhyPwr (vpsHal_hdmiPhyPwr status)

{

...

RegVal = HW_RD_FIELD32 (SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,

HDMI_WP_PWR_CTRL_PHY_STATUS;

CNT = 0;

While ((regVal!= status) & (cnt < 1000U)

{

BspOsal_sleep ((UInt32) 1U);

RegVal = HW_RD_FIELD32 (SOC_HDMI_WP_BASE + HDMI_WP_PWR_CTRL,

HDMI_WP_PWR_CTRL_PHY_STATUS;

Cnt++;


}

If (cnt >= 1000U)

{

If (VPSHAL_HDMI_PHYPWRCMD_TXON== status)

{

/* In case HDMI cable is not connected PHYPWR status wont change to

* TxOn till cable is connected. Donot return error here*/

}

Else

{

RetVal = BSP_ETIMEOUT;

}


}

}

How can I keep the output when I don't connect to the HDMI receiver?