/* HDMI phy registers read through internal I2C bus.  */
static uint16_t hdmi_phy_i2c_read(uint8_t addr)
/* HDMI phy registers read through internal I2C bus.  */
static uint16_t hdmi_phy_i2c_read(uint8_t addr)
{
    uint16_t data;
    uint8_t msb = 0, lsb = 0;
    HW_HDMI_IH_I2CMPHY_STAT0.U = 0xFF;
    HW_HDMI_PHY_I2CM_ADDRESS_ADDR.U = addr;
    HW_HDMI_PHY_I2CM_OPERATION_ADDR.B.READ = 1;
    hdmi_phy_wait_i2c_done(1000);
    msb = HW_HDMI_PHY_I2CM_DATAI_1_ADDR.U;
    lsb = HW_HDMI_PHY_I2CM_DATAI_0_ADDR.U;
    data = (msb << 8) | lsb;
    return data;
}