aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-24 08:15:57 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-24 09:50:10 -0400
commit77ccbfbb07764841500addb570ad61b9868a964d (patch)
tree4804b50cc9e45739746311ea8cd2f8281ed37623
parent2ac80fbea1018404560294797da86d5e72a807f4 (diff)
OMAPDSS: DSI: Add code to disable PHY DCC
OMAP5 DSI PHY has DCC (Duty Cycle Corrector) block, and by default DCC is enabled and thus the PLL clock is divided by 2 to get the DSI DDR clk. This divider has been 4 for all previous OMAPs, and changing it needs some reorganization of the code. The DCC can be disabled, and in that case the divider is back to the old 4. This patch adds dss feature for the DCC, and adds code to always disable the DCC. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c7
-rw-r--r--drivers/video/omap2/dss/dss_features.c1
-rw-r--r--drivers/video/omap2/dss/dss_features.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 0dc24f2689c7..497b219e3706 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2292,6 +2292,13 @@ static void dsi_cio_timings(struct platform_device *dsidev)
2292 r = FLD_MOD(r, tlpx_half, 22, 16); 2292 r = FLD_MOD(r, tlpx_half, 22, 16);
2293 r = FLD_MOD(r, tclk_trail, 15, 8); 2293 r = FLD_MOD(r, tclk_trail, 15, 8);
2294 r = FLD_MOD(r, tclk_zero, 7, 0); 2294 r = FLD_MOD(r, tclk_zero, 7, 0);
2295
2296 if (dss_has_feature(FEAT_DSI_PHY_DCC)) {
2297 r = FLD_MOD(r, 0, 21, 21); /* DCCEN = disable */
2298 r = FLD_MOD(r, 1, 22, 22); /* CLKINP_DIVBY2EN = enable */
2299 r = FLD_MOD(r, 1, 23, 23); /* CLKINP_SEL = enable */
2300 }
2301
2295 dsi_write_reg(dsidev, DSI_DSIPHY_CFG1, r); 2302 dsi_write_reg(dsidev, DSI_DSIPHY_CFG1, r);
2296 2303
2297 r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG2); 2304 r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG2);
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 46855316d215..e650a4a6d004 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -521,6 +521,7 @@ static const enum dss_feat_id omap5_dss_feat_list[] = {
521 FEAT_BURST_2D, 521 FEAT_BURST_2D,
522 FEAT_DSI_PLL_SELFREQDCO, 522 FEAT_DSI_PLL_SELFREQDCO,
523 FEAT_DSI_PLL_REFSEL, 523 FEAT_DSI_PLL_REFSEL,
524 FEAT_DSI_PHY_DCC,
524}; 525};
525 526
526/* OMAP2 DSS Features */ 527/* OMAP2 DSS Features */
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index 0020bf66f3f5..aacad863fa22 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -67,6 +67,7 @@ enum dss_feat_id {
67 FEAT_BURST_2D, 67 FEAT_BURST_2D,
68 FEAT_DSI_PLL_SELFREQDCO, 68 FEAT_DSI_PLL_SELFREQDCO,
69 FEAT_DSI_PLL_REFSEL, 69 FEAT_DSI_PLL_REFSEL,
70 FEAT_DSI_PHY_DCC,
70}; 71};
71 72
72/* DSS register field id */ 73/* DSS register field id */