Skip to content

Commit 23d3498

Browse files
author
Tero Kristo
committed
ARM: OMAP4: display: convert display to use syscon for dsi muxing
The legacy control module APIs will be gone, thus convert the display driver to use syscon. This change should eventually be moved to display driver from the board directory. Signed-off-by: Tero Kristo <t-kristo@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
1 parent 7415b0b commit 23d3498

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

arch/arm/mach-omap2/display.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include <linux/of.h>
2727
#include <linux/of_platform.h>
2828
#include <linux/slab.h>
29+
#include <linux/mfd/syscon.h>
30+
#include <linux/regmap.h>
2931

3032
#include <video/omapdss.h>
3133
#include "omap_hwmod.h"
@@ -104,6 +106,10 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
104106
{ "dss_hdmi", "omapdss_hdmi", -1 },
105107
};
106108

109+
#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
110+
111+
static struct regmap *omap4_dsi_mux_syscon;
112+
107113
static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
108114
{
109115
u32 enable_mask, enable_shift;
@@ -124,15 +130,15 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
124130
return -ENODEV;
125131
}
126132

127-
reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
133+
regmap_read(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, &reg);
128134

129135
reg &= ~enable_mask;
130136
reg &= ~pipd_mask;
131137

132138
reg |= (lanes << enable_shift) & enable_mask;
133139
reg |= (lanes << pipd_shift) & pipd_mask;
134140

135-
omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
141+
regmap_write(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, reg);
136142

137143
return 0;
138144
}
@@ -665,5 +671,10 @@ int __init omapdss_init_of(void)
665671
return r;
666672
}
667673

674+
/* add DSI info for omap4 */
675+
node = of_find_node_by_name(NULL, "omap4_padconf_global");
676+
if (node)
677+
omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
678+
668679
return 0;
669680
}

0 commit comments

Comments
 (0)