aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 18:11:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 18:11:19 -0500
commit51be08419dc86c72486ac556aa39bc01026a403d (patch)
tree50ac35ac89f207d2a732b67eb2f1e9b671e5c064 /arch/arm/mach-omap2
parentec8013beddd717d1740cfefb1a9b900deef85462 (diff)
parentf787f32e67e00b072f46b2ae3c454d2c0a1fcdb7 (diff)
Merge branch 'fbdev-next' of git://github.com/schandinat/linux-2.6
* 'fbdev-next' of git://github.com/schandinat/linux-2.6: (175 commits) module_param: make bool parameters really bool (drivers/video/i810) Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." OMAPDSS: HDMI: Disable DDC internal pull up OMAPDSS: HDMI: Move duplicate code from boardfile OMAPDSS: add OrtusTech COM43H4M10XTC display support OMAP: DSS2: Support for UMSH-8173MD TFT panel ASoC: OMAP: HDMI: Move HDMI codec trigger function to generic HDMI driver OMAPDSS: HDMI: Create function to enable HDMI audio ASoC: OMAP: HDMI: Correct signature of ASoC functions ASoC: OMAP: HDMI: Introduce driver data for audio codec grvga: fix section mismatch warnings video: s3c-fb: Don't keep device runtime active when open video: s3c-fb: Hold runtime PM references when touching registers video: s3c-fb: Take a runtime PM reference when unblanked video: s3c-fb: Disable runtime PM in error paths from probe video: s3c-fb: Use s3c_fb_enable() to enable the framebuffer video: s3c-fb: Make runtime PM functional again drivers/video: fsl-diu-fb: merge fsl_diu_alloc() into map_video_memory() drivers/video: fsl-diu-fb: add default platform ops functions drivers/video: fsl-diu-fb: remove broken reference count enabling the display ...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c23
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c25
-rw-r--r--arch/arm/mach-omap2/display.c39
3 files changed, 56 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 2ceb75d21eb2..39fba9df17fb 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -602,20 +602,6 @@ static void __init omap_sfh7741prox_init(void)
602 __func__, OMAP4_SFH7741_ENABLE_GPIO, error); 602 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
603} 603}
604 604
605static void sdp4430_hdmi_mux_init(void)
606{
607 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
608 omap_mux_init_signal("hdmi_hpd",
609 OMAP_PIN_INPUT_PULLUP);
610 omap_mux_init_signal("hdmi_cec",
611 OMAP_PIN_INPUT_PULLUP);
612 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
613 omap_mux_init_signal("hdmi_ddc_scl",
614 OMAP_PIN_INPUT_PULLUP);
615 omap_mux_init_signal("hdmi_ddc_sda",
616 OMAP_PIN_INPUT_PULLUP);
617}
618
619static struct gpio sdp4430_hdmi_gpios[] = { 605static struct gpio sdp4430_hdmi_gpios[] = {
620 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 606 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
621 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 607 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -833,9 +819,16 @@ static void omap_4430sdp_display_init(void)
833 pr_err("%s: Could not get display_sel GPIO\n", __func__); 819 pr_err("%s: Could not get display_sel GPIO\n", __func__);
834 820
835 sdp4430_lcd_init(); 821 sdp4430_lcd_init();
836 sdp4430_hdmi_mux_init();
837 sdp4430_picodlp_init(); 822 sdp4430_picodlp_init();
838 omap_display_init(&sdp4430_dss_data); 823 omap_display_init(&sdp4430_dss_data);
824 /*
825 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
826 * later have external pull up on the HDMI I2C lines
827 */
828 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
829 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
830 else
831 omap_hdmi_init(0);
839} 832}
840 833
841#ifdef CONFIG_OMAP_MUX 834#ifdef CONFIG_OMAP_MUX
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index e96a2e7ad36f..30ad40db2cf3 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -412,21 +412,6 @@ int __init omap4_panda_dvi_init(void)
412 return r; 412 return r;
413} 413}
414 414
415
416static void omap4_panda_hdmi_mux_init(void)
417{
418 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
419 omap_mux_init_signal("hdmi_hpd",
420 OMAP_PIN_INPUT_PULLUP);
421 omap_mux_init_signal("hdmi_cec",
422 OMAP_PIN_INPUT_PULLUP);
423 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
424 omap_mux_init_signal("hdmi_ddc_scl",
425 OMAP_PIN_INPUT_PULLUP);
426 omap_mux_init_signal("hdmi_ddc_sda",
427 OMAP_PIN_INPUT_PULLUP);
428}
429
430static struct gpio panda_hdmi_gpios[] = { 415static struct gpio panda_hdmi_gpios[] = {
431 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 416 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
432 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 417 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -478,8 +463,16 @@ void omap4_panda_display_init(void)
478 if (r) 463 if (r)
479 pr_err("error initializing panda DVI\n"); 464 pr_err("error initializing panda DVI\n");
480 465
481 omap4_panda_hdmi_mux_init();
482 omap_display_init(&omap4_panda_dss_data); 466 omap_display_init(&omap4_panda_dss_data);
467
468 /*
469 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
470 * later have external pull up on the HDMI I2C lines
471 */
472 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
473 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
474 else
475 omap_hdmi_init(0);
483} 476}
484 477
485static void __init omap4_panda_init(void) 478static void __init omap4_panda_init(void)
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index bc6cf863a563..3c446d1a1781 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -30,6 +30,7 @@
30#include <plat/omap-pm.h> 30#include <plat/omap-pm.h>
31#include "common.h" 31#include "common.h"
32 32
33#include "mux.h"
33#include "control.h" 34#include "control.h"
34#include "display.h" 35#include "display.h"
35 36
@@ -97,6 +98,36 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
97 { "dss_hdmi", "omapdss_hdmi", -1 }, 98 { "dss_hdmi", "omapdss_hdmi", -1 },
98}; 99};
99 100
101static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
102{
103 u32 reg;
104 u16 control_i2c_1;
105
106 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
107 omap_mux_init_signal("hdmi_hpd",
108 OMAP_PIN_INPUT_PULLUP);
109 omap_mux_init_signal("hdmi_cec",
110 OMAP_PIN_INPUT_PULLUP);
111 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
112 omap_mux_init_signal("hdmi_ddc_scl",
113 OMAP_PIN_INPUT_PULLUP);
114 omap_mux_init_signal("hdmi_ddc_sda",
115 OMAP_PIN_INPUT_PULLUP);
116
117 /*
118 * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and
119 * HDMI_DDC_SCL_PULLUPRESX (bit 24) are set to disable
120 * internal pull up resistor.
121 */
122 if (flags & OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP) {
123 control_i2c_1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_1;
124 reg = omap4_ctrl_pad_readl(control_i2c_1);
125 reg |= (OMAP4_HDMI_DDC_SDA_PULLUPRESX_MASK |
126 OMAP4_HDMI_DDC_SCL_PULLUPRESX_MASK);
127 omap4_ctrl_pad_writel(reg, control_i2c_1);
128 }
129}
130
100static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) 131static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
101{ 132{
102 u32 enable_mask, enable_shift; 133 u32 enable_mask, enable_shift;
@@ -130,6 +161,14 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
130 return 0; 161 return 0;
131} 162}
132 163
164int omap_hdmi_init(enum omap_hdmi_flags flags)
165{
166 if (cpu_is_omap44xx())
167 omap4_hdmi_mux_pads(flags);
168
169 return 0;
170}
171
133static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) 172static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
134{ 173{
135 if (cpu_is_omap44xx()) 174 if (cpu_is_omap44xx())