mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
phy: rockchip: inno-hdmi: set sync detection counter length
The RK3328 HDMI PHY adds a method to detect the TMDS Data sync enable status. The counter length is defined as: Fref * 495 * 4 / Ftmdsclk If sync enable counter match the counter length, the sync status defined in reg0xdd will be set to true. Change-Id: Ib6a58cb50127e84399011cb398e7fa36f72b3a45 Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
@@ -732,6 +732,7 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno,
|
||||
const struct phy_config *phy_cfg)
|
||||
{
|
||||
u32 val;
|
||||
u64 temp;
|
||||
|
||||
/* set pdata_en to 0 */
|
||||
inno_update_bits(inno, 0x02, 1, 0);
|
||||
@@ -785,6 +786,12 @@ inno_hdmi_phy_rk3328_power_on(struct inno_hdmi_phy *inno,
|
||||
inno_write(inno, 0xcb, 0x10);
|
||||
}
|
||||
|
||||
/* set TMDS sync detection counter length */
|
||||
temp = 47520000000;
|
||||
do_div(temp, inno->tmdsclock);
|
||||
inno_write(inno, 0xd8, (temp >> 8) & 0xff);
|
||||
inno_write(inno, 0xd9, temp & 0xff);
|
||||
|
||||
/* Power up post PLL */
|
||||
inno_update_bits(inno, 0xaa, 1, 0);
|
||||
/* Power up tmds driver */
|
||||
|
||||
Reference in New Issue
Block a user