diff --git a/msm/dsi/dsi_catalog.h b/msm/dsi/dsi_catalog.h index a364f36e1c..83f377de7b 100644 --- a/msm/dsi/dsi_catalog.h +++ b/msm/dsi/dsi_catalog.h @@ -312,7 +312,8 @@ void dsi_phy_hw_v5_0_dyn_refresh_pipe_delay(struct dsi_phy_hw *phy, int dsi_phy_hw_v5_0_cache_phy_timings(struct dsi_phy_per_lane_cfgs *timings, u32 *dst, u32 size); -void dsi_phy_hw_v5_0_phy_idle_off(struct dsi_phy_hw *phy); +void dsi_phy_hw_v5_0_phy_idle_off(struct dsi_phy_hw *phy, + struct dsi_phy_cfg *cfg); void dsi_ctrl_hw_22_configure_cmddma_window(struct dsi_ctrl_hw *ctrl, struct dsi_ctrl_cmd_dma_info *cmd, u32 line_no, u32 window); diff --git a/msm/dsi/dsi_phy.c b/msm/dsi/dsi_phy.c index 00448bd280..6f7e1d2fd6 100644 --- a/msm/dsi/dsi_phy.c +++ b/msm/dsi/dsi_phy.c @@ -1167,11 +1167,8 @@ int dsi_phy_idle_ctrl(struct msm_dsi_phy *phy, bool enable) } else { phy->dsi_phy_state = DSI_PHY_ENGINE_OFF; - if (phy->hw.ops.disable) - phy->hw.ops.disable(&phy->hw, &phy->cfg); - if (phy->hw.ops.phy_idle_off) - phy->hw.ops.phy_idle_off(&phy->hw); + phy->hw.ops.phy_idle_off(&phy->hw, &phy->cfg); } mutex_unlock(&phy->phy_lock); diff --git a/msm/dsi/dsi_phy_hw.h b/msm/dsi/dsi_phy_hw.h index c747b29472..d74e2ad7e9 100644 --- a/msm/dsi/dsi_phy_hw.h +++ b/msm/dsi/dsi_phy_hw.h @@ -291,8 +291,10 @@ struct dsi_phy_hw_ops { /** * phy_idle_off() - Disable PHY hardware when exiting idle screen * @phy: Pointer to DSI PHY hardware object. + * @cfg: Per lane configurations for timing, strength and lane + * configurations. */ - void (*phy_idle_off)(struct dsi_phy_hw *phy); + void (*phy_idle_off)(struct dsi_phy_hw *phy, struct dsi_phy_cfg *cfg); /** * calculate_timing_params() - calculates timing parameters. diff --git a/msm/dsi/dsi_phy_hw_v5_0.c b/msm/dsi/dsi_phy_hw_v5_0.c index 7562d7b4fc..698e82c1f5 100644 --- a/msm/dsi/dsi_phy_hw_v5_0.c +++ b/msm/dsi/dsi_phy_hw_v5_0.c @@ -880,10 +880,23 @@ void dsi_phy_hw_v5_0_set_continuous_clk(struct dsi_phy_hw *phy, bool enable) wmb(); /* make sure request is set */ } -void dsi_phy_hw_v5_0_phy_idle_off(struct dsi_phy_hw *phy) +void dsi_phy_hw_v5_0_phy_idle_off(struct dsi_phy_hw *phy, + struct dsi_phy_cfg *cfg) { + if (dsi_phy_hw_v5_0_is_pll_on(phy)) + DSI_PHY_WARN(phy, "Turning OFF PHY while PLL is on\n"); + /* enable clamping of PADS */ DSI_W32(phy, DSIPHY_CMN_CTRL_4, 0x1); DSI_W32(phy, DSIPHY_CMN_CTRL_3, 0x0); wmb(); + + dsi_phy_hw_v5_0_config_lpcdrx(phy, cfg, false); + + /* Turn off REFGEN Vote */ + DSI_W32(phy, DSIPHY_CMN_GLBL_DIGTOP_SPARE10, 0x0); + /* make sure request is set */ + wmb(); + /* Delay to ensure HW removes vote*/ + udelay(2); }