From: Mythri P K <mythripk@ti.com>
To: linux-omap@vger.kernel.org
Cc: tomi.valkeinen@ti.com, Mythri P K <mythripk@ti.com>
Subject: [PATCH v2 7/8] OMAP4 : HDMI : Add HDMI structure in the board file for OMAP4 SDP
Date: Tue, 1 Mar 2011 19:46:27 +0530 [thread overview]
Message-ID: <1298988988-28429-8-git-send-email-mythripk@ti.com> (raw)
In-Reply-To: <1298988988-28429-1-git-send-email-mythripk@ti.com>
Adding board file structure for display which adds the display
structure with HDMI as the default driver when the display init
is called.
HDMI GPIO configurations are also done in this file.
Signed-off-by: Mythri P K <mythripk@ti.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 75 +++++++++++++++++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 07d1b20..2123257 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -35,6 +35,7 @@
#include <plat/common.h>
#include <plat/usb.h>
#include <plat/mmc.h>
+#include <plat/display.h>
#include "mux.h"
#include "hsmmc.h"
@@ -47,6 +48,8 @@
#define OMAP4SDP_MDM_PWR_EN_GPIO 157
#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
#define OMAP4_SFH7741_ENABLE_GPIO 188
+#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
+#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
static struct gpio_led sdp4430_gpio_leds[] = {
{
@@ -552,6 +555,76 @@ static void __init omap_sfh7741prox_init(void)
}
}
+static void sdp4430_hdmi_mux_init(void)
+{
+ /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
+ omap_mux_init_signal("hdmi_hpd",
+ OMAP_PIN_INPUT_PULLUP);
+ omap_mux_init_signal("hdmi_cec",
+ OMAP_PIN_INPUT_PULLUP);
+ /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
+ omap_mux_init_signal("hdmi_ddc_scl",
+ OMAP_PIN_INPUT_PULLUP);
+ omap_mux_init_signal("hdmi_ddc_sda",
+ OMAP_PIN_INPUT_PULLUP);
+}
+
+static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
+{
+ int status;
+
+ status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
+ "hdmi_gpio_hpd");
+ if (status) {
+ pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
+ return status;
+ }
+ status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
+ "hdmi_gpio_ls_oe");
+ if (status) {
+ pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
+ goto error1;
+ }
+
+ return 0;
+
+error1:
+ gpio_free(HDMI_GPIO_HPD);
+
+ return status;
+}
+
+static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
+{
+ gpio_free(HDMI_GPIO_LS_OE);
+ gpio_free(HDMI_GPIO_HPD);
+}
+
+static struct omap_dss_device sdp4430_hdmi_device = {
+ .name = "hdmi",
+ .driver_name = "hdmi_panel",
+ .type = OMAP_DISPLAY_TYPE_HDMI,
+ .platform_enable = sdp4430_panel_enable_hdmi,
+ .platform_disable = sdp4430_panel_disable_hdmi,
+ .channel = OMAP_DSS_CHANNEL_DIGIT,
+};
+
+static struct omap_dss_device *sdp4430_dss_devices[] = {
+ &sdp4430_hdmi_device,
+};
+
+static struct omap_dss_board_info sdp4430_dss_data = {
+ .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
+ .devices = sdp4430_dss_devices,
+ .default_device = &sdp4430_hdmi_device,
+};
+
+void omap_4430sdp_display_init(void)
+{
+ sdp4430_hdmi_mux_init();
+ omap_display_init(&sdp4430_dss_data);
+}
+
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -594,6 +667,8 @@ static void __init omap_4430sdp_init(void)
spi_register_board_info(sdp4430_spi_board_info,
ARRAY_SIZE(sdp4430_spi_board_info));
}
+
+ omap_4430sdp_display_init();
}
static void __init omap_4430sdp_map_io(void)
--
1.5.6.3
next prev parent reply other threads:[~2011-03-01 13:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 14:16 [PATCH v2 0/8] OMAP4 : DSS2 : HDMI support Mythri P K
2011-03-01 14:16 ` [PATCH v2 1/8] OMAP4 : DSS2 : Add display type HDMI to DSS2 Mythri P K
2011-03-01 14:16 ` [PATCH v2 2/8] OMAP4 : DSS2 : HDMI: HDMI specific display controller and dss change Mythri P K
2011-03-01 17:01 ` Tomi Valkeinen
2011-03-03 4:27 ` K, Mythri P
2011-03-03 5:29 ` K, Mythri P
2011-03-03 6:40 ` Tomi Valkeinen
2011-03-01 14:16 ` [PATCH v2 3/8] OMAP4 : DSS2 : HDMI: HDMI driver header file addition Mythri P K
2011-03-01 17:23 ` Tomi Valkeinen
2011-03-01 14:16 ` [PATCH v2 4/8] OMAP4 : DSS2 : HDMI: HDMI driver addition in the DSS drivers interface Mythri P K
2011-03-01 17:37 ` Tomi Valkeinen
2011-03-03 4:35 ` K, Mythri P
2011-03-01 14:16 ` [PATCH v2 5/8] OMAP4 : DSS2 : HDMI: HDMI panel driver addition in the DSS Mythri P K
2011-03-01 17:11 ` Tomi Valkeinen
2011-03-03 4:28 ` K, Mythri P
2011-03-01 14:16 ` [PATCH v2 6/8] OMAP4 : DSS : HDMI: Call to HDMI module init to register driver Mythri P K
2011-03-01 14:16 ` Mythri P K [this message]
2011-03-01 14:16 ` [PATCH v2 8/8] OMAP4 : HDMI : Add HDMI structure in the board file for OMAP4 PANDA Mythri P K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298988988-28429-8-git-send-email-mythripk@ti.com \
--to=mythripk@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.