phy: rockchip: inno-hdmi: fix 3328 phy status with uboot logo on

If hdmi phy had been set in uboot, it's need to set power_count
to 1 to match actutal phy status.

This patch use regc8 bit[7:6] to detect phy is set in uboot or not.
After phy power up, value will be zero which is different to its
default value(2'b11).

Change-Id: I6e5deea1d5a0973788c39a200d5c5a0f6a14bdd2
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
Zheng Yang
2018-02-08 15:40:22 +08:00
committed by Tao Huang
parent d86b2eeb56
commit 1ec3c33942

View File

@@ -734,6 +734,15 @@ static void inno_hdmi_phy_rk3328_init(struct inno_hdmi_phy *inno)
*/
inno_write(inno, 0x01, 0x07);
inno_write(inno, 0x02, 0x91);
/*
* reg0xc8 default value is 0xc0, if phy had been set in uboot,
* the value of bit[7:6] will be zero.
*/
if ((inno_read(inno, 0xc8) & 0xc0) == 0) {
dev_info(inno->dev, "phy had been powered up\n");
inno->phy->power_count = 1;
}
}
static int