aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-03-22 01:27:36 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 01:27:36 -0400
commitda49252fb0392d8196833ef3da92e48fb371f8d7 (patch)
tree1299899f7513a900b2229b8cde289bca8c41d2f5 /arch/arm/mach-omap2/board-4430sdp.c
parenteddecbb601c9ea3fab7e67d7892010fc9426d1e6 (diff)
parentb295d6e593e02168fdafc5db11464b6d51cf239d (diff)
Merge branch 'for-paul' of git://gitorious.org/linux-omap-dss2/linux
Conflicts: arch/arm/mach-omap2/board-overo.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c75
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 333ceb2c8fb..62c78de1aa5 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -36,6 +36,7 @@
36#include <plat/usb.h> 36#include <plat/usb.h>
37#include <plat/mmc.h> 37#include <plat/mmc.h>
38#include <plat/omap4-keypad.h> 38#include <plat/omap4-keypad.h>
39#include <plat/display.h>
39 40
40#include "mux.h" 41#include "mux.h"
41#include "hsmmc.h" 42#include "hsmmc.h"
@@ -47,6 +48,8 @@
47#define ETH_KS8851_QUART 138 48#define ETH_KS8851_QUART 138
48#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 49#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
49#define OMAP4_SFH7741_ENABLE_GPIO 188 50#define OMAP4_SFH7741_ENABLE_GPIO 188
51#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
52#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
50 53
51static const int sdp4430_keymap[] = { 54static const int sdp4430_keymap[] = {
52 KEY(0, 0, KEY_E), 55 KEY(0, 0, KEY_E),
@@ -621,6 +624,76 @@ static void __init omap_sfh7741prox_init(void)
621 } 624 }
622} 625}
623 626
627static void sdp4430_hdmi_mux_init(void)
628{
629 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
630 omap_mux_init_signal("hdmi_hpd",
631 OMAP_PIN_INPUT_PULLUP);
632 omap_mux_init_signal("hdmi_cec",
633 OMAP_PIN_INPUT_PULLUP);
634 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
635 omap_mux_init_signal("hdmi_ddc_scl",
636 OMAP_PIN_INPUT_PULLUP);
637 omap_mux_init_signal("hdmi_ddc_sda",
638 OMAP_PIN_INPUT_PULLUP);
639}
640
641static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
642{
643 int status;
644
645 status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH,
646 "hdmi_gpio_hpd");
647 if (status) {
648 pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD);
649 return status;
650 }
651 status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH,
652 "hdmi_gpio_ls_oe");
653 if (status) {
654 pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE);
655 goto error1;
656 }
657
658 return 0;
659
660error1:
661 gpio_free(HDMI_GPIO_HPD);
662
663 return status;
664}
665
666static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
667{
668 gpio_free(HDMI_GPIO_LS_OE);
669 gpio_free(HDMI_GPIO_HPD);
670}
671
672static struct omap_dss_device sdp4430_hdmi_device = {
673 .name = "hdmi",
674 .driver_name = "hdmi_panel",
675 .type = OMAP_DISPLAY_TYPE_HDMI,
676 .platform_enable = sdp4430_panel_enable_hdmi,
677 .platform_disable = sdp4430_panel_disable_hdmi,
678 .channel = OMAP_DSS_CHANNEL_DIGIT,
679};
680
681static struct omap_dss_device *sdp4430_dss_devices[] = {
682 &sdp4430_hdmi_device,
683};
684
685static struct omap_dss_board_info sdp4430_dss_data = {
686 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
687 .devices = sdp4430_dss_devices,
688 .default_device = &sdp4430_hdmi_device,
689};
690
691void omap_4430sdp_display_init(void)
692{
693 sdp4430_hdmi_mux_init();
694 omap_display_init(&sdp4430_dss_data);
695}
696
624#ifdef CONFIG_OMAP_MUX 697#ifdef CONFIG_OMAP_MUX
625static struct omap_board_mux board_mux[] __initdata = { 698static struct omap_board_mux board_mux[] __initdata = {
626 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), 699 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -729,6 +802,8 @@ static void __init omap_4430sdp_init(void)
729 status = omap4_keyboard_init(&sdp4430_keypad_data); 802 status = omap4_keyboard_init(&sdp4430_keypad_data);
730 if (status) 803 if (status)
731 pr_err("Keypad initialization failed: %d\n", status); 804 pr_err("Keypad initialization failed: %d\n", status);
805
806 omap_4430sdp_display_init();
732} 807}
733 808
734static void __init omap_4430sdp_map_io(void) 809static void __init omap_4430sdp_map_io(void)