diff options
author | Taneja, Archit <archit@ti.com> | 2011-03-15 00:28:23 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-03-15 03:05:38 -0400 |
commit | 49641116392ad7522fa0efad53f7ed63f811bd88 (patch) | |
tree | 37dec1e9a08d22235e1c53e79387173b342ae860 /drivers/video/omap2 | |
parent | 31ef82377f1e0f1bc7d308ae4312e6cc5a431885 (diff) |
OMAP: DSS2: FEATURES: DSI PLL parameter cleanup
The DSI PLL parameters (regm, regn, regm_dispc, regm_dsi, fint) have different
fields and also different Max values on OMAP3 and OMAP4. Use dss features to
calculate the register fields and min/max values based on current OMAP revision.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 69 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 84 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 10 |
3 files changed, 113 insertions, 50 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 6e7f46828148..7a4b4404a976 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -185,14 +185,6 @@ struct dsi_reg { u16 idx; }; | |||
185 | #define DSI_DT_RX_SHORT_READ_1 0x21 | 185 | #define DSI_DT_RX_SHORT_READ_1 0x21 |
186 | #define DSI_DT_RX_SHORT_READ_2 0x22 | 186 | #define DSI_DT_RX_SHORT_READ_2 0x22 |
187 | 187 | ||
188 | #define FINT_MAX 2100000 | ||
189 | #define FINT_MIN 750000 | ||
190 | #define REGN_MAX (1 << 7) | ||
191 | #define REGM_MAX ((1 << 11) - 1) | ||
192 | #define REGM_DISPC_MAX (1 << 4) | ||
193 | #define REGM_DSI_MAX (1 << 4) | ||
194 | #define LP_DIV_MAX ((1 << 13) - 1) | ||
195 | |||
196 | enum fifo_size { | 188 | enum fifo_size { |
197 | DSI_FIFO_SIZE_0 = 0, | 189 | DSI_FIFO_SIZE_0 = 0, |
198 | DSI_FIFO_SIZE_32 = 1, | 190 | DSI_FIFO_SIZE_32 = 1, |
@@ -277,6 +269,11 @@ static struct | |||
277 | spinlock_t irq_stats_lock; | 269 | spinlock_t irq_stats_lock; |
278 | struct dsi_irq_stats irq_stats; | 270 | struct dsi_irq_stats irq_stats; |
279 | #endif | 271 | #endif |
272 | /* DSI PLL Parameter Ranges */ | ||
273 | unsigned long regm_max, regn_max; | ||
274 | unsigned long regm_dispc_max, regm_dsi_max; | ||
275 | unsigned long fint_min, fint_max; | ||
276 | unsigned long lpdiv_max; | ||
280 | } dsi; | 277 | } dsi; |
281 | 278 | ||
282 | #ifdef DEBUG | 279 | #ifdef DEBUG |
@@ -751,7 +748,7 @@ static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev) | |||
751 | 748 | ||
752 | lp_clk_div = dssdev->phy.dsi.div.lp_clk_div; | 749 | lp_clk_div = dssdev->phy.dsi.div.lp_clk_div; |
753 | 750 | ||
754 | if (lp_clk_div == 0 || lp_clk_div > LP_DIV_MAX) | 751 | if (lp_clk_div == 0 || lp_clk_div > dsi.lpdiv_max) |
755 | return -EINVAL; | 752 | return -EINVAL; |
756 | 753 | ||
757 | dsi_fclk = dsi_fclk_rate(); | 754 | dsi_fclk = dsi_fclk_rate(); |
@@ -801,16 +798,16 @@ static int dsi_pll_power(enum dsi_pll_power_state state) | |||
801 | static int dsi_calc_clock_rates(struct omap_dss_device *dssdev, | 798 | static int dsi_calc_clock_rates(struct omap_dss_device *dssdev, |
802 | struct dsi_clock_info *cinfo) | 799 | struct dsi_clock_info *cinfo) |
803 | { | 800 | { |
804 | if (cinfo->regn == 0 || cinfo->regn > REGN_MAX) | 801 | if (cinfo->regn == 0 || cinfo->regn > dsi.regn_max) |
805 | return -EINVAL; | 802 | return -EINVAL; |
806 | 803 | ||
807 | if (cinfo->regm == 0 || cinfo->regm > REGM_MAX) | 804 | if (cinfo->regm == 0 || cinfo->regm > dsi.regm_max) |
808 | return -EINVAL; | 805 | return -EINVAL; |
809 | 806 | ||
810 | if (cinfo->regm_dispc > REGM_DISPC_MAX) | 807 | if (cinfo->regm_dispc > dsi.regm_dispc_max) |
811 | return -EINVAL; | 808 | return -EINVAL; |
812 | 809 | ||
813 | if (cinfo->regm_dsi > REGM_DSI_MAX) | 810 | if (cinfo->regm_dsi > dsi.regm_dsi_max) |
814 | return -EINVAL; | 811 | return -EINVAL; |
815 | 812 | ||
816 | if (cinfo->use_sys_clk) { | 813 | if (cinfo->use_sys_clk) { |
@@ -829,7 +826,7 @@ static int dsi_calc_clock_rates(struct omap_dss_device *dssdev, | |||
829 | 826 | ||
830 | cinfo->fint = cinfo->clkin / (cinfo->regn * (cinfo->highfreq ? 2 : 1)); | 827 | cinfo->fint = cinfo->clkin / (cinfo->regn * (cinfo->highfreq ? 2 : 1)); |
831 | 828 | ||
832 | if (cinfo->fint > FINT_MAX || cinfo->fint < FINT_MIN) | 829 | if (cinfo->fint > dsi.fint_max || cinfo->fint < dsi.fint_min) |
833 | return -EINVAL; | 830 | return -EINVAL; |
834 | 831 | ||
835 | cinfo->clkin4ddr = 2 * cinfo->regm * cinfo->fint; | 832 | cinfo->clkin4ddr = 2 * cinfo->regm * cinfo->fint; |
@@ -899,17 +896,17 @@ retry: | |||
899 | /* no highfreq: 0.75MHz < Fint = clkin / regn < 2.1MHz */ | 896 | /* no highfreq: 0.75MHz < Fint = clkin / regn < 2.1MHz */ |
900 | /* highfreq: 0.75MHz < Fint = clkin / (2*regn) < 2.1MHz */ | 897 | /* highfreq: 0.75MHz < Fint = clkin / (2*regn) < 2.1MHz */ |
901 | /* To reduce PLL lock time, keep Fint high (around 2 MHz) */ | 898 | /* To reduce PLL lock time, keep Fint high (around 2 MHz) */ |
902 | for (cur.regn = 1; cur.regn < REGN_MAX; ++cur.regn) { | 899 | for (cur.regn = 1; cur.regn < dsi.regn_max; ++cur.regn) { |
903 | if (cur.highfreq == 0) | 900 | if (cur.highfreq == 0) |
904 | cur.fint = cur.clkin / cur.regn; | 901 | cur.fint = cur.clkin / cur.regn; |
905 | else | 902 | else |
906 | cur.fint = cur.clkin / (2 * cur.regn); | 903 | cur.fint = cur.clkin / (2 * cur.regn); |
907 | 904 | ||
908 | if (cur.fint > FINT_MAX || cur.fint < FINT_MIN) | 905 | if (cur.fint > dsi.fint_max || cur.fint < dsi.fint_min) |
909 | continue; | 906 | continue; |
910 | 907 | ||
911 | /* DSIPHY(MHz) = (2 * regm / regn) * (clkin / (highfreq + 1)) */ | 908 | /* DSIPHY(MHz) = (2 * regm / regn) * (clkin / (highfreq + 1)) */ |
912 | for (cur.regm = 1; cur.regm < REGM_MAX; ++cur.regm) { | 909 | for (cur.regm = 1; cur.regm < dsi.regm_max; ++cur.regm) { |
913 | unsigned long a, b; | 910 | unsigned long a, b; |
914 | 911 | ||
915 | a = 2 * cur.regm * (cur.clkin/1000); | 912 | a = 2 * cur.regm * (cur.clkin/1000); |
@@ -921,7 +918,7 @@ retry: | |||
921 | 918 | ||
922 | /* dsi_pll_hsdiv_dispc_clk(MHz) = | 919 | /* dsi_pll_hsdiv_dispc_clk(MHz) = |
923 | * DSIPHY(MHz) / regm_dispc < 173MHz/186Mhz */ | 920 | * DSIPHY(MHz) / regm_dispc < 173MHz/186Mhz */ |
924 | for (cur.regm_dispc = 1; cur.regm_dispc < REGM_DISPC_MAX; | 921 | for (cur.regm_dispc = 1; cur.regm_dispc < dsi.regm_dispc_max; |
925 | ++cur.regm_dispc) { | 922 | ++cur.regm_dispc) { |
926 | struct dispc_clock_info cur_dispc; | 923 | struct dispc_clock_info cur_dispc; |
927 | cur.dsi_pll_hsdiv_dispc_clk = | 924 | cur.dsi_pll_hsdiv_dispc_clk = |
@@ -994,6 +991,8 @@ int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo) | |||
994 | int r = 0; | 991 | int r = 0; |
995 | u32 l; | 992 | u32 l; |
996 | int f; | 993 | int f; |
994 | u8 regn_start, regn_end, regm_start, regm_end; | ||
995 | u8 regm_dispc_start, regm_dispc_end, regm_dsi_start, regm_dsi_end; | ||
997 | 996 | ||
998 | DSSDBGF(); | 997 | DSSDBGF(); |
999 | 998 | ||
@@ -1038,19 +1037,30 @@ int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo) | |||
1038 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), | 1037 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), |
1039 | cinfo->dsi_pll_hsdiv_dsi_clk); | 1038 | cinfo->dsi_pll_hsdiv_dsi_clk); |
1040 | 1039 | ||
1040 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGN, ®n_start, ®n_end); | ||
1041 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGM, ®m_start, ®m_end); | ||
1042 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGM_DISPC, ®m_dispc_start, | ||
1043 | ®m_dispc_end); | ||
1044 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGM_DSI, ®m_dsi_start, | ||
1045 | ®m_dsi_end); | ||
1046 | |||
1041 | REG_FLD_MOD(DSI_PLL_CONTROL, 0, 0, 0); /* DSI_PLL_AUTOMODE = manual */ | 1047 | REG_FLD_MOD(DSI_PLL_CONTROL, 0, 0, 0); /* DSI_PLL_AUTOMODE = manual */ |
1042 | 1048 | ||
1043 | l = dsi_read_reg(DSI_PLL_CONFIGURATION1); | 1049 | l = dsi_read_reg(DSI_PLL_CONFIGURATION1); |
1044 | l = FLD_MOD(l, 1, 0, 0); /* DSI_PLL_STOPMODE */ | 1050 | l = FLD_MOD(l, 1, 0, 0); /* DSI_PLL_STOPMODE */ |
1045 | l = FLD_MOD(l, cinfo->regn - 1, 7, 1); /* DSI_PLL_REGN */ | 1051 | /* DSI_PLL_REGN */ |
1046 | l = FLD_MOD(l, cinfo->regm, 18, 8); /* DSI_PLL_REGM */ | 1052 | l = FLD_MOD(l, cinfo->regn - 1, regn_start, regn_end); |
1053 | /* DSI_PLL_REGM */ | ||
1054 | l = FLD_MOD(l, cinfo->regm, regm_start, regm_end); | ||
1055 | /* DSI_CLOCK_DIV */ | ||
1047 | l = FLD_MOD(l, cinfo->regm_dispc > 0 ? cinfo->regm_dispc - 1 : 0, | 1056 | l = FLD_MOD(l, cinfo->regm_dispc > 0 ? cinfo->regm_dispc - 1 : 0, |
1048 | 22, 19); /* DSI_CLOCK_DIV */ | 1057 | regm_dispc_start, regm_dispc_end); |
1058 | /* DSIPROTO_CLOCK_DIV */ | ||
1049 | l = FLD_MOD(l, cinfo->regm_dsi > 0 ? cinfo->regm_dsi - 1 : 0, | 1059 | l = FLD_MOD(l, cinfo->regm_dsi > 0 ? cinfo->regm_dsi - 1 : 0, |
1050 | 26, 23); /* DSIPROTO_CLOCK_DIV */ | 1060 | regm_dsi_start, regm_dsi_end); |
1051 | dsi_write_reg(DSI_PLL_CONFIGURATION1, l); | 1061 | dsi_write_reg(DSI_PLL_CONFIGURATION1, l); |
1052 | 1062 | ||
1053 | BUG_ON(cinfo->fint < 750000 || cinfo->fint > 2100000); | 1063 | BUG_ON(cinfo->fint < dsi.fint_min || cinfo->fint > dsi.fint_max); |
1054 | if (cinfo->fint < 1000000) | 1064 | if (cinfo->fint < 1000000) |
1055 | f = 0x3; | 1065 | f = 0x3; |
1056 | else if (cinfo->fint < 1250000) | 1066 | else if (cinfo->fint < 1250000) |
@@ -3333,6 +3343,17 @@ void dsi_wait_pll_hsdiv_dsi_active(void) | |||
3333 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI)); | 3343 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI)); |
3334 | } | 3344 | } |
3335 | 3345 | ||
3346 | static void dsi_calc_clock_param_ranges(void) | ||
3347 | { | ||
3348 | dsi.regn_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_REGN); | ||
3349 | dsi.regm_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_REGM); | ||
3350 | dsi.regm_dispc_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_REGM_DISPC); | ||
3351 | dsi.regm_dsi_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_REGM_DSI); | ||
3352 | dsi.fint_min = dss_feat_get_param_min(FEAT_PARAM_DSIPLL_FINT); | ||
3353 | dsi.fint_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_FINT); | ||
3354 | dsi.lpdiv_max = dss_feat_get_param_max(FEAT_PARAM_DSIPLL_LPDIV); | ||
3355 | } | ||
3356 | |||
3336 | static int dsi_init(struct platform_device *pdev) | 3357 | static int dsi_init(struct platform_device *pdev) |
3337 | { | 3358 | { |
3338 | u32 rev; | 3359 | u32 rev; |
@@ -3397,6 +3418,8 @@ static int dsi_init(struct platform_device *pdev) | |||
3397 | dsi.vc[i].vc_id = 0; | 3418 | dsi.vc[i].vc_id = 0; |
3398 | } | 3419 | } |
3399 | 3420 | ||
3421 | dsi_calc_clock_param_ranges(); | ||
3422 | |||
3400 | enable_clocks(1); | 3423 | enable_clocks(1); |
3401 | 3424 | ||
3402 | rev = dsi_read_reg(DSI_REVISION); | 3425 | rev = dsi_read_reg(DSI_REVISION); |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 4c8b32af496c..06b18f73449b 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -55,36 +55,48 @@ struct omap_dss_features { | |||
55 | static struct omap_dss_features *omap_current_dss_features; | 55 | static struct omap_dss_features *omap_current_dss_features; |
56 | 56 | ||
57 | static const struct dss_reg_field omap2_dss_reg_fields[] = { | 57 | static const struct dss_reg_field omap2_dss_reg_fields[] = { |
58 | [FEAT_REG_FIRHINC] = { 11, 0 }, | 58 | [FEAT_REG_FIRHINC] = { 11, 0 }, |
59 | [FEAT_REG_FIRVINC] = { 27, 16 }, | 59 | [FEAT_REG_FIRVINC] = { 27, 16 }, |
60 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 8, 0 }, | 60 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 8, 0 }, |
61 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 24, 16 }, | 61 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 24, 16 }, |
62 | [FEAT_REG_FIFOSIZE] = { 8, 0 }, | 62 | [FEAT_REG_FIFOSIZE] = { 8, 0 }, |
63 | [FEAT_REG_HORIZONTALACCU] = { 9, 0 }, | 63 | [FEAT_REG_HORIZONTALACCU] = { 9, 0 }, |
64 | [FEAT_REG_VERTICALACCU] = { 25, 16 }, | 64 | [FEAT_REG_VERTICALACCU] = { 25, 16 }, |
65 | [FEAT_REG_DISPC_CLK_SWITCH] = { 0, 0 }, | 65 | [FEAT_REG_DISPC_CLK_SWITCH] = { 0, 0 }, |
66 | [FEAT_REG_DSIPLL_REGN] = { 0, 0 }, | ||
67 | [FEAT_REG_DSIPLL_REGM] = { 0, 0 }, | ||
68 | [FEAT_REG_DSIPLL_REGM_DISPC] = { 0, 0 }, | ||
69 | [FEAT_REG_DSIPLL_REGM_DSI] = { 0, 0 }, | ||
66 | }; | 70 | }; |
67 | 71 | ||
68 | static const struct dss_reg_field omap3_dss_reg_fields[] = { | 72 | static const struct dss_reg_field omap3_dss_reg_fields[] = { |
69 | [FEAT_REG_FIRHINC] = { 12, 0 }, | 73 | [FEAT_REG_FIRHINC] = { 12, 0 }, |
70 | [FEAT_REG_FIRVINC] = { 28, 16 }, | 74 | [FEAT_REG_FIRVINC] = { 28, 16 }, |
71 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 11, 0 }, | 75 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 11, 0 }, |
72 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 27, 16 }, | 76 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 27, 16 }, |
73 | [FEAT_REG_FIFOSIZE] = { 10, 0 }, | 77 | [FEAT_REG_FIFOSIZE] = { 10, 0 }, |
74 | [FEAT_REG_HORIZONTALACCU] = { 9, 0 }, | 78 | [FEAT_REG_HORIZONTALACCU] = { 9, 0 }, |
75 | [FEAT_REG_VERTICALACCU] = { 25, 16 }, | 79 | [FEAT_REG_VERTICALACCU] = { 25, 16 }, |
76 | [FEAT_REG_DISPC_CLK_SWITCH] = { 0, 0 }, | 80 | [FEAT_REG_DISPC_CLK_SWITCH] = { 0, 0 }, |
81 | [FEAT_REG_DSIPLL_REGN] = { 7, 1 }, | ||
82 | [FEAT_REG_DSIPLL_REGM] = { 18, 8 }, | ||
83 | [FEAT_REG_DSIPLL_REGM_DISPC] = { 22, 19 }, | ||
84 | [FEAT_REG_DSIPLL_REGM_DSI] = { 26, 23 }, | ||
77 | }; | 85 | }; |
78 | 86 | ||
79 | static const struct dss_reg_field omap4_dss_reg_fields[] = { | 87 | static const struct dss_reg_field omap4_dss_reg_fields[] = { |
80 | [FEAT_REG_FIRHINC] = { 12, 0 }, | 88 | [FEAT_REG_FIRHINC] = { 12, 0 }, |
81 | [FEAT_REG_FIRVINC] = { 28, 16 }, | 89 | [FEAT_REG_FIRVINC] = { 28, 16 }, |
82 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 15, 0 }, | 90 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 15, 0 }, |
83 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 31, 16 }, | 91 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 31, 16 }, |
84 | [FEAT_REG_FIFOSIZE] = { 15, 0 }, | 92 | [FEAT_REG_FIFOSIZE] = { 15, 0 }, |
85 | [FEAT_REG_HORIZONTALACCU] = { 10, 0 }, | 93 | [FEAT_REG_HORIZONTALACCU] = { 10, 0 }, |
86 | [FEAT_REG_VERTICALACCU] = { 26, 16 }, | 94 | [FEAT_REG_VERTICALACCU] = { 26, 16 }, |
87 | [FEAT_REG_DISPC_CLK_SWITCH] = { 9, 8 }, | 95 | [FEAT_REG_DISPC_CLK_SWITCH] = { 9, 8 }, |
96 | [FEAT_REG_DSIPLL_REGN] = { 8, 1 }, | ||
97 | [FEAT_REG_DSIPLL_REGM] = { 20, 9 }, | ||
98 | [FEAT_REG_DSIPLL_REGM_DISPC] = { 25, 21 }, | ||
99 | [FEAT_REG_DSIPLL_REGM_DSI] = { 30, 26 }, | ||
88 | }; | 100 | }; |
89 | 101 | ||
90 | static const enum omap_display_type omap2_dss_supported_displays[] = { | 102 | static const enum omap_display_type omap2_dss_supported_displays[] = { |
@@ -184,15 +196,33 @@ static const char * const omap4_dss_clk_source_names[] = { | |||
184 | }; | 196 | }; |
185 | 197 | ||
186 | static const struct dss_param_range omap2_dss_param_range[] = { | 198 | static const struct dss_param_range omap2_dss_param_range[] = { |
187 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, | 199 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, |
200 | [FEAT_PARAM_DSIPLL_REGN] = { 0, 0 }, | ||
201 | [FEAT_PARAM_DSIPLL_REGM] = { 0, 0 }, | ||
202 | [FEAT_PARAM_DSIPLL_REGM_DISPC] = { 0, 0 }, | ||
203 | [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, 0 }, | ||
204 | [FEAT_PARAM_DSIPLL_FINT] = { 0, 0 }, | ||
205 | [FEAT_PARAM_DSIPLL_LPDIV] = { 0, 0 }, | ||
188 | }; | 206 | }; |
189 | 207 | ||
190 | static const struct dss_param_range omap3_dss_param_range[] = { | 208 | static const struct dss_param_range omap3_dss_param_range[] = { |
191 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, | 209 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, |
210 | [FEAT_PARAM_DSIPLL_REGN] = { 0, (1 << 7) - 1 }, | ||
211 | [FEAT_PARAM_DSIPLL_REGM] = { 0, (1 << 11) - 1 }, | ||
212 | [FEAT_PARAM_DSIPLL_REGM_DISPC] = { 0, (1 << 4) - 1 }, | ||
213 | [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 4) - 1 }, | ||
214 | [FEAT_PARAM_DSIPLL_FINT] = { 750000, 2100000 }, | ||
215 | [FEAT_PARAM_DSIPLL_LPDIV] = { 1, (1 << 13) - 1}, | ||
192 | }; | 216 | }; |
193 | 217 | ||
194 | static const struct dss_param_range omap4_dss_param_range[] = { | 218 | static const struct dss_param_range omap4_dss_param_range[] = { |
195 | [FEAT_PARAM_DSS_FCK] = { 0, 186000000 }, | 219 | [FEAT_PARAM_DSS_FCK] = { 0, 186000000 }, |
220 | [FEAT_PARAM_DSIPLL_REGN] = { 0, (1 << 8) - 1 }, | ||
221 | [FEAT_PARAM_DSIPLL_REGM] = { 0, (1 << 12) - 1 }, | ||
222 | [FEAT_PARAM_DSIPLL_REGM_DISPC] = { 0, (1 << 5) - 1 }, | ||
223 | [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 5) - 1 }, | ||
224 | [FEAT_PARAM_DSIPLL_FINT] = { 500000, 2500000 }, | ||
225 | [FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 }, | ||
196 | }; | 226 | }; |
197 | 227 | ||
198 | /* OMAP2 DSS Features */ | 228 | /* OMAP2 DSS Features */ |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index da63bbf38e90..12e9c4ef0dec 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -52,10 +52,20 @@ enum dss_feat_reg_field { | |||
52 | FEAT_REG_HORIZONTALACCU, | 52 | FEAT_REG_HORIZONTALACCU, |
53 | FEAT_REG_VERTICALACCU, | 53 | FEAT_REG_VERTICALACCU, |
54 | FEAT_REG_DISPC_CLK_SWITCH, | 54 | FEAT_REG_DISPC_CLK_SWITCH, |
55 | FEAT_REG_DSIPLL_REGN, | ||
56 | FEAT_REG_DSIPLL_REGM, | ||
57 | FEAT_REG_DSIPLL_REGM_DISPC, | ||
58 | FEAT_REG_DSIPLL_REGM_DSI, | ||
55 | }; | 59 | }; |
56 | 60 | ||
57 | enum dss_range_param { | 61 | enum dss_range_param { |
58 | FEAT_PARAM_DSS_FCK, | 62 | FEAT_PARAM_DSS_FCK, |
63 | FEAT_PARAM_DSIPLL_REGN, | ||
64 | FEAT_PARAM_DSIPLL_REGM, | ||
65 | FEAT_PARAM_DSIPLL_REGM_DISPC, | ||
66 | FEAT_PARAM_DSIPLL_REGM_DSI, | ||
67 | FEAT_PARAM_DSIPLL_FINT, | ||
68 | FEAT_PARAM_DSIPLL_LPDIV, | ||
59 | }; | 69 | }; |
60 | 70 | ||
61 | /* DSS Feature Functions */ | 71 | /* DSS Feature Functions */ |