phy/rockchip: inno-dsidphy: Supports RK3506 to shut down 1.2v ldo when suspend

Change-Id: I951a40e2f7e1c19f6bc86ed9f12d1c25c52395a8
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
This commit is contained in:
Hongming Zou
2024-11-20 15:02:52 +08:00
committed by Tao Huang
parent b74d20e428
commit c6bcd826d3

View File

@@ -846,6 +846,12 @@ static int inno_dsidphy_power_on(struct phy *phy)
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x00,
POWER_WORK_MASK, POWER_WORK_ENABLE);
if (inno->pdata->soc_type == RK3506) {
/* The internal 1.2V LDO power on */
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x17, BIT(7), 0);
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x1d, BIT(7), 0);
}
switch (mode) {
case PHY_MODE_MIPI_DPHY:
inno_dsidphy_mipi_mode_enable(inno);
@@ -881,6 +887,12 @@ static int inno_dsidphy_power_off(struct phy *phy)
LVDS_PLL_POWER_MASK | LVDS_BANDGAP_POWER_MASK,
LVDS_PLL_POWER_OFF | LVDS_BANDGAP_POWER_DOWN);
if (inno->pdata->soc_type == RK3506) {
/* The internal 1.2V LDO power off */
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x17, BIT(7), BIT(7));
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x1d, BIT(7), BIT(7));
}
pm_runtime_put(inno->dev);
clk_disable_unprepare(inno->ref_clk);
clk_disable_unprepare(inno->pclk_phy);