aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/display.c')
-rw-r--r--arch/arm/mach-omap2/display.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index dce9905d64b..ffd9bd98302 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -29,6 +29,7 @@
29#include <plat/omap-pm.h> 29#include <plat/omap-pm.h>
30#include <plat/common.h> 30#include <plat/common.h>
31 31
32#include "mux.h"
32#include "control.h" 33#include "control.h"
33#include "display.h" 34#include "display.h"
34 35
@@ -96,6 +97,36 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
96 { "dss_hdmi", "omapdss_hdmi", -1 }, 97 { "dss_hdmi", "omapdss_hdmi", -1 },
97}; 98};
98 99
100static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
101{
102 u32 reg;
103 u16 control_i2c_1;
104
105 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
106 omap_mux_init_signal("hdmi_hpd",
107 OMAP_PIN_INPUT_PULLUP);
108 omap_mux_init_signal("hdmi_cec",
109 OMAP_PIN_INPUT_PULLUP);
110 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
111 omap_mux_init_signal("hdmi_ddc_scl",
112 OMAP_PIN_INPUT_PULLUP);
113 omap_mux_init_signal("hdmi_ddc_sda",
114 OMAP_PIN_INPUT_PULLUP);
115
116 /*
117 * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and
118 * HDMI_DDC_SCL_PULLUPRESX (bit 24) are set to disable
119 * internal pull up resistor.
120 */
121 if (flags & OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP) {
122 control_i2c_1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_1;
123 reg = omap4_ctrl_pad_readl(control_i2c_1);
124 reg |= (OMAP4_HDMI_DDC_SDA_PULLUPRESX_MASK |
125 OMAP4_HDMI_DDC_SCL_PULLUPRESX_MASK);
126 omap4_ctrl_pad_writel(reg, control_i2c_1);
127 }
128}
129
99static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) 130static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
100{ 131{
101 u32 enable_mask, enable_shift; 132 u32 enable_mask, enable_shift;
@@ -129,6 +160,14 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
129 return 0; 160 return 0;
130} 161}
131 162
163int omap_hdmi_init(enum omap_hdmi_flags flags)
164{
165 if (cpu_is_omap44xx())
166 omap4_hdmi_mux_pads(flags);
167
168 return 0;
169}
170
132static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) 171static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
133{ 172{
134 if (cpu_is_omap44xx()) 173 if (cpu_is_omap44xx())