]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAPDSS: DSI: Add code to disable PHY DCC
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 24 Sep 2012 12:15:57 +0000 (15:15 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 24 Sep 2012 13:50:10 +0000 (16:50 +0300)
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>
drivers/video/omap2/dss/dsi.c
drivers/video/omap2/dss/dss_features.c
drivers/video/omap2/dss/dss_features.h

index 0dc24f2689c72038d0326c3c10df3917ab0aa51d..497b219e37064af19898248f436296b06a9fd31b 100644 (file)
@@ -2292,6 +2292,13 @@ static void dsi_cio_timings(struct platform_device *dsidev)
        r = FLD_MOD(r, tlpx_half, 22, 16);
        r = FLD_MOD(r, tclk_trail, 15, 8);
        r = FLD_MOD(r, tclk_zero, 7, 0);
+
+       if (dss_has_feature(FEAT_DSI_PHY_DCC)) {
+               r = FLD_MOD(r, 0, 21, 21);      /* DCCEN = disable */
+               r = FLD_MOD(r, 1, 22, 22);      /* CLKINP_DIVBY2EN = enable */
+               r = FLD_MOD(r, 1, 23, 23);      /* CLKINP_SEL = enable */
+       }
+
        dsi_write_reg(dsidev, DSI_DSIPHY_CFG1, r);
 
        r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG2);
index 46855316d215e5f114166b569a7f2208352e9284..e650a4a6d0046ea864c231f698ff8205b635fa12 100644 (file)
@@ -521,6 +521,7 @@ static const enum dss_feat_id omap5_dss_feat_list[] = {
        FEAT_BURST_2D,
        FEAT_DSI_PLL_SELFREQDCO,
        FEAT_DSI_PLL_REFSEL,
+       FEAT_DSI_PHY_DCC,
 };
 
 /* OMAP2 DSS Features */
index 0020bf66f3f5807d7ce0215c4a175a6eaace53d4..aacad863fa2208ef4d664f68d37222d76a79d4ee 100644 (file)
@@ -67,6 +67,7 @@ enum dss_feat_id {
        FEAT_BURST_2D,
        FEAT_DSI_PLL_SELFREQDCO,
        FEAT_DSI_PLL_REFSEL,
+       FEAT_DSI_PHY_DCC,
 };
 
 /* DSS register field id */