aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-08 10:30:34 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-08 10:30:34 -0500
commit193984f43decedd2604547022e3a26249dc18b3e (patch)
tree5a2637a0fd775e4430fc537f8107f499eea470ea /arch
parentc5627f65d6b860023f8ee985df61c20617dd21b5 (diff)
parent9a9016832d2601a290db4dce6dd55552bdae5b1a (diff)
Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Diffstat (limited to 'arch')
-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 515646886b5..e1fe304ce36 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -595,20 +595,6 @@ static void __init omap_sfh7741prox_init(void)
595 __func__, OMAP4_SFH7741_ENABLE_GPIO, error); 595 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
596} 596}
597 597
598static void sdp4430_hdmi_mux_init(void)
599{
600 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
601 omap_mux_init_signal("hdmi_hpd",
602 OMAP_PIN_INPUT_PULLUP);
603 omap_mux_init_signal("hdmi_cec",
604 OMAP_PIN_INPUT_PULLUP);
605 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
606 omap_mux_init_signal("hdmi_ddc_scl",
607 OMAP_PIN_INPUT_PULLUP);
608 omap_mux_init_signal("hdmi_ddc_sda",
609 OMAP_PIN_INPUT_PULLUP);
610}
611
612static struct gpio sdp4430_hdmi_gpios[] = { 598static struct gpio sdp4430_hdmi_gpios[] = {
613 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 599 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
614 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 600 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -826,9 +812,16 @@ static void omap_4430sdp_display_init(void)
826 pr_err("%s: Could not get display_sel GPIO\n", __func__); 812 pr_err("%s: Could not get display_sel GPIO\n", __func__);
827 813
828 sdp4430_lcd_init(); 814 sdp4430_lcd_init();
829 sdp4430_hdmi_mux_init();
830 sdp4430_picodlp_init(); 815 sdp4430_picodlp_init();
831 omap_display_init(&sdp4430_dss_data); 816 omap_display_init(&sdp4430_dss_data);
817 /*
818 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
819 * later have external pull up on the HDMI I2C lines
820 */
821 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
822 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
823 else
824 omap_hdmi_init(0);
832} 825}
833 826
834#ifdef CONFIG_OMAP_MUX 827#ifdef CONFIG_OMAP_MUX
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index a8c2c4263e3..3e1c507fb01 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -478,21 +478,6 @@ int __init omap4_panda_dvi_init(void)
478 return r; 478 return r;
479} 479}
480 480
481
482static void omap4_panda_hdmi_mux_init(void)
483{
484 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
485 omap_mux_init_signal("hdmi_hpd",
486 OMAP_PIN_INPUT_PULLUP);
487 omap_mux_init_signal("hdmi_cec",
488 OMAP_PIN_INPUT_PULLUP);
489 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
490 omap_mux_init_signal("hdmi_ddc_scl",
491 OMAP_PIN_INPUT_PULLUP);
492 omap_mux_init_signal("hdmi_ddc_sda",
493 OMAP_PIN_INPUT_PULLUP);
494}
495
496static struct gpio panda_hdmi_gpios[] = { 481static struct gpio panda_hdmi_gpios[] = {
497 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 482 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" },
498 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 483 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
@@ -544,8 +529,16 @@ void omap4_panda_display_init(void)
544 if (r) 529 if (r)
545 pr_err("error initializing panda DVI\n"); 530 pr_err("error initializing panda DVI\n");
546 531
547 omap4_panda_hdmi_mux_init();
548 omap_display_init(&omap4_panda_dss_data); 532 omap_display_init(&omap4_panda_dss_data);
533
534 /*
535 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
536 * later have external pull up on the HDMI I2C lines
537 */
538 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
539 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
540 else
541 omap_hdmi_init(0);
549} 542}
550 543
551static void __init omap4_panda_init(void) 544static void __init omap4_panda_init(void)
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())