aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-12-31 04:23:31 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-02-04 05:32:05 -0500
commit6d817880cdfd0456ccf5f2b705d7078957ea09cb (patch)
tree05d3c6d468b69aec4dbedbb2013d84e2aee615e4 /drivers/video
parent6761a8f60633fc40d062436abb1e3c4877329968 (diff)
OMAPDSS: DSS: Add DRA7xx base support
Add base support for DRA7xx to DSS core. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.c40
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.h2
-rw-r--r--drivers/video/fbdev/omap2/dss/dss_features.c1
-rw-r--r--drivers/video/fbdev/omap2/dss/omapdss-boot-init.c1
4 files changed, 44 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 1884c29ef482..8c79839fbe87 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -605,6 +605,26 @@ static int dss_dpi_select_source_omap5(int port, enum omap_channel channel)
605 return 0; 605 return 0;
606} 606}
607 607
608static int dss_dpi_select_source_dra7xx(int port, enum omap_channel channel)
609{
610 switch (port) {
611 case 0:
612 return dss_dpi_select_source_omap5(port, channel);
613 case 1:
614 if (channel != OMAP_DSS_CHANNEL_LCD2)
615 return -EINVAL;
616 break;
617 case 2:
618 if (channel != OMAP_DSS_CHANNEL_LCD3)
619 return -EINVAL;
620 break;
621 default:
622 return -EINVAL;
623 }
624
625 return 0;
626}
627
608int dss_dpi_select_source(int port, enum omap_channel channel) 628int dss_dpi_select_source(int port, enum omap_channel channel)
609{ 629{
610 return dss.feat->dpi_select_source(port, channel); 630 return dss.feat->dpi_select_source(port, channel);
@@ -686,6 +706,12 @@ static const enum omap_display_type omap34xx_ports[] = {
686 OMAP_DISPLAY_TYPE_SDI, 706 OMAP_DISPLAY_TYPE_SDI,
687}; 707};
688 708
709static const enum omap_display_type dra7xx_ports[] = {
710 OMAP_DISPLAY_TYPE_DPI,
711 OMAP_DISPLAY_TYPE_DPI,
712 OMAP_DISPLAY_TYPE_DPI,
713};
714
689static const struct dss_features omap24xx_dss_feats __initconst = { 715static const struct dss_features omap24xx_dss_feats __initconst = {
690 /* 716 /*
691 * fck div max is really 16, but the divider range has gaps. The range 717 * fck div max is really 16, but the divider range has gaps. The range
@@ -744,6 +770,15 @@ static const struct dss_features am43xx_dss_feats __initconst = {
744 .num_ports = ARRAY_SIZE(omap2plus_ports), 770 .num_ports = ARRAY_SIZE(omap2plus_ports),
745}; 771};
746 772
773static const struct dss_features dra7xx_dss_feats __initconst = {
774 .fck_div_max = 64,
775 .dss_fck_multiplier = 1,
776 .parent_clk_name = "dpll_per_x2_ck",
777 .dpi_select_source = &dss_dpi_select_source_dra7xx,
778 .ports = dra7xx_ports,
779 .num_ports = ARRAY_SIZE(dra7xx_ports),
780};
781
747static int __init dss_init_features(struct platform_device *pdev) 782static int __init dss_init_features(struct platform_device *pdev)
748{ 783{
749 const struct dss_features *src; 784 const struct dss_features *src;
@@ -784,6 +819,10 @@ static int __init dss_init_features(struct platform_device *pdev)
784 src = &am43xx_dss_feats; 819 src = &am43xx_dss_feats;
785 break; 820 break;
786 821
822 case OMAPDSS_VER_DRA7xx:
823 src = &dra7xx_dss_feats;
824 break;
825
787 default: 826 default:
788 return -ENODEV; 827 return -ENODEV;
789 } 828 }
@@ -1003,6 +1042,7 @@ static const struct of_device_id dss_of_match[] = {
1003 { .compatible = "ti,omap3-dss", }, 1042 { .compatible = "ti,omap3-dss", },
1004 { .compatible = "ti,omap4-dss", }, 1043 { .compatible = "ti,omap4-dss", },
1005 { .compatible = "ti,omap5-dss", }, 1044 { .compatible = "ti,omap5-dss", },
1045 { .compatible = "ti,dra7-dss", },
1006 {}, 1046 {},
1007}; 1047};
1008 1048
diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h
index d6c9c3d3db14..4bca36a591ca 100644
--- a/drivers/video/fbdev/omap2/dss/dss.h
+++ b/drivers/video/fbdev/omap2/dss/dss.h
@@ -104,6 +104,8 @@ enum dss_pll_id {
104 DSS_PLL_DSI1, 104 DSS_PLL_DSI1,
105 DSS_PLL_DSI2, 105 DSS_PLL_DSI2,
106 DSS_PLL_HDMI, 106 DSS_PLL_HDMI,
107 DSS_PLL_VIDEO1,
108 DSS_PLL_VIDEO2,
107}; 109};
108 110
109struct dss_pll; 111struct dss_pll;
diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c
index 0e6f3f54749f..376270b777f8 100644
--- a/drivers/video/fbdev/omap2/dss/dss_features.c
+++ b/drivers/video/fbdev/omap2/dss/dss_features.c
@@ -943,6 +943,7 @@ void dss_features_init(enum omapdss_version version)
943 break; 943 break;
944 944
945 case OMAPDSS_VER_OMAP5: 945 case OMAPDSS_VER_OMAP5:
946 case OMAPDSS_VER_DRA7xx:
946 omap_current_dss_features = &omap5_dss_features; 947 omap_current_dss_features = &omap5_dss_features;
947 break; 948 break;
948 949
diff --git a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
index 2f0822ee3ff9..42b87f95267c 100644
--- a/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
+++ b/drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
@@ -186,6 +186,7 @@ static const struct of_device_id omapdss_of_match[] __initconst = {
186 { .compatible = "ti,omap3-dss", }, 186 { .compatible = "ti,omap3-dss", },
187 { .compatible = "ti,omap4-dss", }, 187 { .compatible = "ti,omap4-dss", },
188 { .compatible = "ti,omap5-dss", }, 188 { .compatible = "ti,omap5-dss", },
189 { .compatible = "ti,dra7-dss", },
189 {}, 190 {},
190}; 191};
191 192