|
@@ -183,7 +183,13 @@ static int sun8i_hdmi_phy_config_h3(struct dw_hdmi *hdmi,
|
|
|
regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_ANA_CFG1_REG,
|
|
|
SUN8I_HDMI_PHY_ANA_CFG1_TXEN_MASK, 0);
|
|
|
|
|
|
- regmap_write(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, pll_cfg1_init);
|
|
|
+ /*
|
|
|
+ * NOTE: We have to be careful not to overwrite PHY parent
|
|
|
+ * clock selection bit and clock divider.
|
|
|
+ */
|
|
|
+ regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG,
|
|
|
+ (u32)~SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK,
|
|
|
+ pll_cfg1_init);
|
|
|
regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG2_REG,
|
|
|
(u32)~SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK,
|
|
|
pll_cfg2_init);
|
|
@@ -352,6 +358,10 @@ static void sun8i_hdmi_phy_init_h3(struct sun8i_hdmi_phy *phy)
|
|
|
SUN8I_HDMI_PHY_ANA_CFG3_SCLEN |
|
|
|
SUN8I_HDMI_PHY_ANA_CFG3_SDAEN);
|
|
|
|
|
|
+ /* reset PHY PLL clock parent */
|
|
|
+ regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG,
|
|
|
+ SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, 0);
|
|
|
+
|
|
|
/* set HW control of CEC pins */
|
|
|
regmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG, 0);
|
|
|
|