diff options
author | Archit Taneja <archit@ti.com> | 2012-04-08 07:17:01 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-24 09:50:07 -0400 |
commit | 233628328037c02cf3db6165cab5d3f43587c5f3 (patch) | |
tree | f46e2a4084f25324c7afbfa4f27a84d8e9650b47 /drivers/video/omap2/dss/dss_features.c | |
parent | d66b15818c16af35ddb5da7b53905d9f6f62a45b (diff) |
OMAPDSS: Add basic omap5 features to dss and dispc
Add basic omap5 features for dss and dispc.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dss_features.c')
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index c26fc1fb7dbc..af4775a20708 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -106,6 +106,21 @@ static const struct dss_reg_field omap4_dss_reg_fields[] = { | |||
106 | [FEAT_REG_DSIPLL_REGM_DSI] = { 30, 26 }, | 106 | [FEAT_REG_DSIPLL_REGM_DSI] = { 30, 26 }, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static const struct dss_reg_field omap5_dss_reg_fields[] = { | ||
110 | [FEAT_REG_FIRHINC] = { 12, 0 }, | ||
111 | [FEAT_REG_FIRVINC] = { 28, 16 }, | ||
112 | [FEAT_REG_FIFOLOWTHRESHOLD] = { 15, 0 }, | ||
113 | [FEAT_REG_FIFOHIGHTHRESHOLD] = { 31, 16 }, | ||
114 | [FEAT_REG_FIFOSIZE] = { 15, 0 }, | ||
115 | [FEAT_REG_HORIZONTALACCU] = { 10, 0 }, | ||
116 | [FEAT_REG_VERTICALACCU] = { 26, 16 }, | ||
117 | [FEAT_REG_DISPC_CLK_SWITCH] = { 9, 7 }, | ||
118 | [FEAT_REG_DSIPLL_REGN] = { 8, 1 }, | ||
119 | [FEAT_REG_DSIPLL_REGM] = { 20, 9 }, | ||
120 | [FEAT_REG_DSIPLL_REGM_DISPC] = { 25, 21 }, | ||
121 | [FEAT_REG_DSIPLL_REGM_DSI] = { 30, 26 }, | ||
122 | }; | ||
123 | |||
109 | static const enum omap_display_type omap2_dss_supported_displays[] = { | 124 | static const enum omap_display_type omap2_dss_supported_displays[] = { |
110 | /* OMAP_DSS_CHANNEL_LCD */ | 125 | /* OMAP_DSS_CHANNEL_LCD */ |
111 | OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI, | 126 | OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI, |
@@ -144,6 +159,19 @@ static const enum omap_display_type omap4_dss_supported_displays[] = { | |||
144 | OMAP_DISPLAY_TYPE_DSI, | 159 | OMAP_DISPLAY_TYPE_DSI, |
145 | }; | 160 | }; |
146 | 161 | ||
162 | static const enum omap_display_type omap5_dss_supported_displays[] = { | ||
163 | /* OMAP_DSS_CHANNEL_LCD */ | ||
164 | OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI | | ||
165 | OMAP_DISPLAY_TYPE_DSI, | ||
166 | |||
167 | /* OMAP_DSS_CHANNEL_DIGIT */ | ||
168 | OMAP_DISPLAY_TYPE_HDMI | OMAP_DISPLAY_TYPE_DPI, | ||
169 | |||
170 | /* OMAP_DSS_CHANNEL_LCD2 */ | ||
171 | OMAP_DISPLAY_TYPE_DPI | OMAP_DISPLAY_TYPE_DBI | | ||
172 | OMAP_DISPLAY_TYPE_DSI, | ||
173 | }; | ||
174 | |||
147 | static const enum omap_color_mode omap2_dss_supported_color_modes[] = { | 175 | static const enum omap_color_mode omap2_dss_supported_color_modes[] = { |
148 | /* OMAP_DSS_GFX */ | 176 | /* OMAP_DSS_GFX */ |
149 | OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | | 177 | OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | |
@@ -298,6 +326,14 @@ static const char * const omap4_dss_clk_source_names[] = { | |||
298 | [OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI] = "PLL2_CLK2", | 326 | [OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI] = "PLL2_CLK2", |
299 | }; | 327 | }; |
300 | 328 | ||
329 | static const char * const omap5_dss_clk_source_names[] = { | ||
330 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DPLL_DSI1_A_CLK1", | ||
331 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DPLL_DSI1_A_CLK2", | ||
332 | [OMAP_DSS_CLK_SRC_FCK] = "DSS_CLK", | ||
333 | [OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC] = "DPLL_DSI1_C_CLK1", | ||
334 | [OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI] = "DPLL_DSI1_C_CLK2", | ||
335 | }; | ||
336 | |||
301 | static const struct dss_param_range omap2_dss_param_range[] = { | 337 | static const struct dss_param_range omap2_dss_param_range[] = { |
302 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, | 338 | [FEAT_PARAM_DSS_FCK] = { 0, 173000000 }, |
303 | [FEAT_PARAM_DSS_PCD] = { 2, 255 }, | 339 | [FEAT_PARAM_DSS_PCD] = { 2, 255 }, |
@@ -349,6 +385,22 @@ static const struct dss_param_range omap4_dss_param_range[] = { | |||
349 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | 385 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, |
350 | }; | 386 | }; |
351 | 387 | ||
388 | static const struct dss_param_range omap5_dss_param_range[] = { | ||
389 | [FEAT_PARAM_DSS_FCK] = { 0, 200000000 }, | ||
390 | [FEAT_PARAM_DSS_PCD] = { 1, 255 }, | ||
391 | [FEAT_PARAM_DSIPLL_REGN] = { 0, (1 << 8) - 1 }, | ||
392 | [FEAT_PARAM_DSIPLL_REGM] = { 0, (1 << 12) - 1 }, | ||
393 | [FEAT_PARAM_DSIPLL_REGM_DISPC] = { 0, (1 << 5) - 1 }, | ||
394 | [FEAT_PARAM_DSIPLL_REGM_DSI] = { 0, (1 << 5) - 1 }, | ||
395 | [FEAT_PARAM_DSIPLL_FINT] = { 500000, 2500000 }, | ||
396 | [FEAT_PARAM_DSIPLL_LPDIV] = { 0, (1 << 13) - 1 }, | ||
397 | [FEAT_PARAM_DSI_FCK] = { 0, 170000000 }, | ||
398 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | ||
399 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, | ||
400 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
401 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
402 | }; | ||
403 | |||
352 | static const enum dss_feat_id omap2_dss_feat_list[] = { | 404 | static const enum dss_feat_id omap2_dss_feat_list[] = { |
353 | FEAT_LCDENABLEPOL, | 405 | FEAT_LCDENABLEPOL, |
354 | FEAT_LCDENABLESIGNAL, | 406 | FEAT_LCDENABLESIGNAL, |
@@ -450,6 +502,25 @@ static const enum dss_feat_id omap4_dss_feat_list[] = { | |||
450 | FEAT_BURST_2D, | 502 | FEAT_BURST_2D, |
451 | }; | 503 | }; |
452 | 504 | ||
505 | static const enum dss_feat_id omap5_dss_feat_list[] = { | ||
506 | FEAT_MGR_LCD2, | ||
507 | FEAT_CORE_CLK_DIV, | ||
508 | FEAT_LCD_CLK_SRC, | ||
509 | FEAT_DSI_DCS_CMD_CONFIG_VC, | ||
510 | FEAT_DSI_VC_OCP_WIDTH, | ||
511 | FEAT_DSI_GNQ, | ||
512 | FEAT_HDMI_CTS_SWMODE, | ||
513 | FEAT_HDMI_AUDIO_USE_MCLK, | ||
514 | FEAT_HANDLE_UV_SEPARATE, | ||
515 | FEAT_ATTR2, | ||
516 | FEAT_CPR, | ||
517 | FEAT_PRELOAD, | ||
518 | FEAT_FIR_COEF_V, | ||
519 | FEAT_ALPHA_FREE_ZORDER, | ||
520 | FEAT_FIFO_MERGE, | ||
521 | FEAT_BURST_2D, | ||
522 | }; | ||
523 | |||
453 | /* OMAP2 DSS Features */ | 524 | /* OMAP2 DSS Features */ |
454 | static const struct omap_dss_features omap2_dss_features = { | 525 | static const struct omap_dss_features omap2_dss_features = { |
455 | .reg_fields = omap2_dss_reg_fields, | 526 | .reg_fields = omap2_dss_reg_fields, |
@@ -570,6 +641,26 @@ static const struct omap_dss_features omap4_dss_features = { | |||
570 | .burst_size_unit = 16, | 641 | .burst_size_unit = 16, |
571 | }; | 642 | }; |
572 | 643 | ||
644 | /* OMAP5 DSS Features */ | ||
645 | static const struct omap_dss_features omap5_dss_features = { | ||
646 | .reg_fields = omap5_dss_reg_fields, | ||
647 | .num_reg_fields = ARRAY_SIZE(omap5_dss_reg_fields), | ||
648 | |||
649 | .features = omap5_dss_feat_list, | ||
650 | .num_features = ARRAY_SIZE(omap5_dss_feat_list), | ||
651 | |||
652 | .num_mgrs = 3, | ||
653 | .num_ovls = 4, | ||
654 | .supported_displays = omap5_dss_supported_displays, | ||
655 | .supported_color_modes = omap4_dss_supported_color_modes, | ||
656 | .overlay_caps = omap4_dss_overlay_caps, | ||
657 | .clksrc_names = omap5_dss_clk_source_names, | ||
658 | .dss_params = omap5_dss_param_range, | ||
659 | .supported_rotation_types = OMAP_DSS_ROT_DMA | OMAP_DSS_ROT_TILER, | ||
660 | .buffer_size_unit = 16, | ||
661 | .burst_size_unit = 16, | ||
662 | }; | ||
663 | |||
573 | #if defined(CONFIG_OMAP4_DSS_HDMI) | 664 | #if defined(CONFIG_OMAP4_DSS_HDMI) |
574 | /* HDMI OMAP4 Functions*/ | 665 | /* HDMI OMAP4 Functions*/ |
575 | static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { | 666 | static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { |
@@ -707,6 +798,8 @@ void dss_features_init(void) | |||
707 | omap_current_dss_features = &omap4430_es2_0_1_2_dss_features; | 798 | omap_current_dss_features = &omap4430_es2_0_1_2_dss_features; |
708 | else if (cpu_is_omap44xx()) | 799 | else if (cpu_is_omap44xx()) |
709 | omap_current_dss_features = &omap4_dss_features; | 800 | omap_current_dss_features = &omap4_dss_features; |
801 | else if (soc_is_omap54xx()) | ||
802 | omap_current_dss_features = &omap5_dss_features; | ||
710 | else | 803 | else |
711 | DSSWARN("Unsupported OMAP version"); | 804 | DSSWARN("Unsupported OMAP version"); |
712 | } | 805 | } |