From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH 08/14] OMAPDSS: DSS: Add DRA7xx base support
Date: Tue, 27 Jan 2015 10:50:36 +0000 [thread overview]
Message-ID: <1422355842-11234-9-git-send-email-tomi.valkeinen@ti.com> (raw)
In-Reply-To: <1422355842-11234-1-git-send-email-tomi.valkeinen@ti.com>
Add base support for DRA7xx to DSS core.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dss.c | 40 +++++++++++++++++++++++
drivers/video/fbdev/omap2/dss/dss.h | 2 ++
drivers/video/fbdev/omap2/dss/dss_features.c | 1 +
drivers/video/fbdev/omap2/dss/omapdss-boot-init.c | 1 +
4 files changed, 44 insertions(+)
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)
return 0;
}
+static int dss_dpi_select_source_dra7xx(int port, enum omap_channel channel)
+{
+ switch (port) {
+ case 0:
+ return dss_dpi_select_source_omap5(port, channel);
+ case 1:
+ if (channel != OMAP_DSS_CHANNEL_LCD2)
+ return -EINVAL;
+ break;
+ case 2:
+ if (channel != OMAP_DSS_CHANNEL_LCD3)
+ return -EINVAL;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
int dss_dpi_select_source(int port, enum omap_channel channel)
{
return dss.feat->dpi_select_source(port, channel);
@@ -686,6 +706,12 @@ static const enum omap_display_type omap34xx_ports[] = {
OMAP_DISPLAY_TYPE_SDI,
};
+static const enum omap_display_type dra7xx_ports[] = {
+ OMAP_DISPLAY_TYPE_DPI,
+ OMAP_DISPLAY_TYPE_DPI,
+ OMAP_DISPLAY_TYPE_DPI,
+};
+
static const struct dss_features omap24xx_dss_feats __initconst = {
/*
* 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 = {
.num_ports = ARRAY_SIZE(omap2plus_ports),
};
+static const struct dss_features dra7xx_dss_feats __initconst = {
+ .fck_div_max = 64,
+ .dss_fck_multiplier = 1,
+ .parent_clk_name = "dpll_per_x2_ck",
+ .dpi_select_source = &dss_dpi_select_source_dra7xx,
+ .ports = dra7xx_ports,
+ .num_ports = ARRAY_SIZE(dra7xx_ports),
+};
+
static int __init dss_init_features(struct platform_device *pdev)
{
const struct dss_features *src;
@@ -784,6 +819,10 @@ static int __init dss_init_features(struct platform_device *pdev)
src = &am43xx_dss_feats;
break;
+ case OMAPDSS_VER_DRA7xx:
+ src = &dra7xx_dss_feats;
+ break;
+
default:
return -ENODEV;
}
@@ -1003,6 +1042,7 @@ static const struct of_device_id dss_of_match[] = {
{ .compatible = "ti,omap3-dss", },
{ .compatible = "ti,omap4-dss", },
{ .compatible = "ti,omap5-dss", },
+ { .compatible = "ti,dra7-dss", },
{},
};
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 {
DSS_PLL_DSI1,
DSS_PLL_DSI2,
DSS_PLL_HDMI,
+ DSS_PLL_VIDEO1,
+ DSS_PLL_VIDEO2,
};
struct 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)
break;
case OMAPDSS_VER_OMAP5:
+ case OMAPDSS_VER_DRA7xx:
omap_current_dss_features = &omap5_dss_features;
break;
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 = {
{ .compatible = "ti,omap3-dss", },
{ .compatible = "ti,omap4-dss", },
{ .compatible = "ti,omap5-dss", },
+ { .compatible = "ti,dra7-dss", },
{},
};
--
2.2.2
next prev parent reply other threads:[~2015-01-27 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 10:50 [PATCH 00/14] OMAPDSS: Add TI DRA7xx support Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 01/14] OMAPDSS: Add enum dss_pll_id Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 02/14] OMAPDSS: PLL: add dss_pll_wait_reset_done() Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 03/14] OMAPDSS: constify port arrays Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 04/14] OMAPDSS: OMAP5: fix digit output's allowed mgrs Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 05/14] OMAPDSS: encoder-tpd12s015: Fix race issue with LS_OE Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 06/14] OMAPDSS: add define for DRA7xx HW version Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 07/14] Doc/DT: Add DT binding doc for DRA7xx DSS Tomi Valkeinen
2015-01-27 10:50 ` Tomi Valkeinen [this message]
2015-01-27 10:50 ` [PATCH 09/14] OMAPDSS: Add functions for external control of PLL Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 10/14] OMAPDSS: Add Video PLLs for DRA7xx Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 11/14] OMAPDSS: DISPC: Add DRA7xx support Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 12/14] OMAPDSS: DISPC: program dispc polarities to control module Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 13/14] OMAPDSS: HDMI: Add DRA7xx support Tomi Valkeinen
2015-01-27 10:50 ` [PATCH 14/14] OMAPDSS: DPI: " Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422355842-11234-9-git-send-email-tomi.valkeinen@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox