Skip to content

Commit

Permalink
OMAPDSS: DSS: Add DRA7xx base support
Browse files Browse the repository at this point in the history
Add base support for DRA7xx to DSS core.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Feb 4, 2015
1 parent 6761a8f commit 6d81788
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
40 changes: 40 additions & 0 deletions drivers/video/fbdev/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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", },
{},
};

Expand Down
2 changes: 2 additions & 0 deletions drivers/video/fbdev/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/dss_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions drivers/video/fbdev/omap2/dss/omapdss-boot-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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", },
{},
};

Expand Down

0 comments on commit 6d81788

Please sign in to comment.