Forráskód Böngészése

disp: msm: dsi: add API for handling PHY programming during 0p9 collapse

Add HW recommended programming sequence for when PHY is allowed to turn
off during idle.

Change-Id: Iaeafa17d9821913b42ae669dbd21f244783f4cdd
Signed-off-by: Shashank Babu Chinta Venkata <[email protected]>
Shashank Babu Chinta Venkata 3 éve
szülő
commit
1b53cc574b
3 módosított fájl, 12 hozzáadás és 0 törlés
  1. 3 0
      msm/dsi/dsi_catalog.c
  2. 1 0
      msm/dsi/dsi_catalog.h
  3. 8 0
      msm/dsi/dsi_phy_hw_v5_0.c

+ 3 - 0
msm/dsi/dsi_catalog.c

@@ -190,6 +190,7 @@ static void dsi_catalog_phy_3_0_init(struct dsi_phy_hw *phy)
 	phy->ops.dyn_refresh_ops.dyn_refresh_trigger_sel = NULL;
 	phy->ops.dyn_refresh_ops.cache_phy_timings =
 		dsi_phy_hw_v3_0_cache_phy_timings;
+	phy->ops.phy_idle_off = NULL;
 }
 
 /**
@@ -230,6 +231,7 @@ static void dsi_catalog_phy_4_0_init(struct dsi_phy_hw *phy)
 		dsi_phy_hw_v4_0_cache_phy_timings;
 	phy->ops.set_continuous_clk = dsi_phy_hw_v4_0_set_continuous_clk;
 	phy->ops.commit_phy_timing = dsi_phy_hw_v4_0_commit_phy_timing;
+	phy->ops.phy_idle_off = NULL;
 }
 
 /**
@@ -259,6 +261,7 @@ static void dsi_catalog_phy_5_0_init(struct dsi_phy_hw *phy)
 	phy->ops.dyn_refresh_ops.cache_phy_timings = dsi_phy_hw_v5_0_cache_phy_timings;
 	phy->ops.set_continuous_clk = dsi_phy_hw_v5_0_set_continuous_clk;
 	phy->ops.commit_phy_timing = dsi_phy_hw_v5_0_commit_phy_timing;
+	phy->ops.phy_idle_off = dsi_phy_hw_v5_0_phy_idle_off;
 }
 
 /**

+ 1 - 0
msm/dsi/dsi_catalog.h

@@ -308,6 +308,7 @@ 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_ctrl_hw_22_configure_cmddma_window(struct dsi_ctrl_hw *ctrl,
 		struct dsi_ctrl_cmd_dma_info *cmd,
 		u32 line_no, u32 window);

+ 8 - 0
msm/dsi/dsi_phy_hw_v5_0.c

@@ -879,3 +879,11 @@ 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)
+{
+	/* enable clamping of PADS */
+	DSI_W32(phy, DSIPHY_CMN_CTRL_4, 0x1);
+	DSI_W32(phy, DSIPHY_CMN_CTRL_3, 0x0);
+	wmb();
+}