diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-08-22 09:00:31 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-24 09:50:09 -0400 |
commit | f8ef3d696651df01029d289f1e15c02d4f566610 (patch) | |
tree | a3de4661dccff8af131e13ad7f41dd90036702ad | |
parent | de09e4555592986219132b518c3f7834a28823cd (diff) |
OMAPDSS: DSI: Add FEAT_DSI_PLL_SELFREQDCO
Add FEAT_DSI_PLL_SELFREQDCO. OMAP5's DSI PLL has a new configuration
option that needs to be programmed depending on the PLL's output clock
frequency.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 12 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 8d47fb7c4b8f..0c3afc2b4696 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -1671,18 +1671,22 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev, | |||
1671 | 1671 | ||
1672 | BUG_ON(cinfo->fint < dsi->fint_min || cinfo->fint > dsi->fint_max); | 1672 | BUG_ON(cinfo->fint < dsi->fint_min || cinfo->fint > dsi->fint_max); |
1673 | 1673 | ||
1674 | l = dsi_read_reg(dsidev, DSI_PLL_CONFIGURATION2); | ||
1675 | |||
1674 | if (dss_has_feature(FEAT_DSI_PLL_FREQSEL)) { | 1676 | if (dss_has_feature(FEAT_DSI_PLL_FREQSEL)) { |
1675 | f = cinfo->fint < 1000000 ? 0x3 : | 1677 | f = cinfo->fint < 1000000 ? 0x3 : |
1676 | cinfo->fint < 1250000 ? 0x4 : | 1678 | cinfo->fint < 1250000 ? 0x4 : |
1677 | cinfo->fint < 1500000 ? 0x5 : | 1679 | cinfo->fint < 1500000 ? 0x5 : |
1678 | cinfo->fint < 1750000 ? 0x6 : | 1680 | cinfo->fint < 1750000 ? 0x6 : |
1679 | 0x7; | 1681 | 0x7; |
1680 | } | ||
1681 | |||
1682 | l = dsi_read_reg(dsidev, DSI_PLL_CONFIGURATION2); | ||
1683 | 1682 | ||
1684 | if (dss_has_feature(FEAT_DSI_PLL_FREQSEL)) | ||
1685 | l = FLD_MOD(l, f, 4, 1); /* DSI_PLL_FREQSEL */ | 1683 | l = FLD_MOD(l, f, 4, 1); /* DSI_PLL_FREQSEL */ |
1684 | } else if (dss_has_feature(FEAT_DSI_PLL_SELFREQDCO)) { | ||
1685 | f = cinfo->clkin4ddr < 1000000000 ? 0x2 : 0x4; | ||
1686 | |||
1687 | l = FLD_MOD(l, f, 4, 1); /* PLL_SELFREQDCO */ | ||
1688 | } | ||
1689 | |||
1686 | l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */ | 1690 | l = FLD_MOD(l, 1, 13, 13); /* DSI_PLL_REFEN */ |
1687 | l = FLD_MOD(l, 0, 14, 14); /* DSIPHY_CLKINEN */ | 1691 | l = FLD_MOD(l, 0, 14, 14); /* DSIPHY_CLKINEN */ |
1688 | l = FLD_MOD(l, 1, 20, 20); /* DSI_HSDIVBYPASS */ | 1692 | l = FLD_MOD(l, 1, 20, 20); /* DSI_HSDIVBYPASS */ |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index af4775a20708..177f6e8d2d7c 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -519,6 +519,7 @@ static const enum dss_feat_id omap5_dss_feat_list[] = { | |||
519 | FEAT_ALPHA_FREE_ZORDER, | 519 | FEAT_ALPHA_FREE_ZORDER, |
520 | FEAT_FIFO_MERGE, | 520 | FEAT_FIFO_MERGE, |
521 | FEAT_BURST_2D, | 521 | FEAT_BURST_2D, |
522 | FEAT_DSI_PLL_SELFREQDCO, | ||
522 | }; | 523 | }; |
523 | 524 | ||
524 | /* OMAP2 DSS Features */ | 525 | /* OMAP2 DSS Features */ |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index b81d603310a8..f9b9d28ed312 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -65,6 +65,7 @@ enum dss_feat_id { | |||
65 | /* An unknown HW bug causing the normal FIFO thresholds not to work */ | 65 | /* An unknown HW bug causing the normal FIFO thresholds not to work */ |
66 | FEAT_OMAP3_DSI_FIFO_BUG, | 66 | FEAT_OMAP3_DSI_FIFO_BUG, |
67 | FEAT_BURST_2D, | 67 | FEAT_BURST_2D, |
68 | FEAT_DSI_PLL_SELFREQDCO, | ||
68 | }; | 69 | }; |
69 | 70 | ||
70 | /* DSS register field id */ | 71 | /* DSS register field id */ |