diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | 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 85805d432e38..f5fcc5f2258d 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 | ||
51 | static const int sdp4430_keymap[] = { | 54 | static const int sdp4430_keymap[] = { |
52 | KEY(0, 0, KEY_E), | 55 | KEY(0, 0, KEY_E), |
@@ -620,6 +623,76 @@ static void __init omap_sfh7741prox_init(void) | |||
620 | } | 623 | } |
621 | } | 624 | } |
622 | 625 | ||
626 | static void sdp4430_hdmi_mux_init(void) | ||
627 | { | ||
628 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
629 | omap_mux_init_signal("hdmi_hpd", | ||
630 | OMAP_PIN_INPUT_PULLUP); | ||
631 | omap_mux_init_signal("hdmi_cec", | ||
632 | OMAP_PIN_INPUT_PULLUP); | ||
633 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
634 | omap_mux_init_signal("hdmi_ddc_scl", | ||
635 | OMAP_PIN_INPUT_PULLUP); | ||
636 | omap_mux_init_signal("hdmi_ddc_sda", | ||
637 | OMAP_PIN_INPUT_PULLUP); | ||
638 | } | ||
639 | |||
640 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | ||
641 | { | ||
642 | int status; | ||
643 | |||
644 | status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, | ||
645 | "hdmi_gpio_hpd"); | ||
646 | if (status) { | ||
647 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD); | ||
648 | return status; | ||
649 | } | ||
650 | status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, | ||
651 | "hdmi_gpio_ls_oe"); | ||
652 | if (status) { | ||
653 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE); | ||
654 | goto error1; | ||
655 | } | ||
656 | |||
657 | return 0; | ||
658 | |||
659 | error1: | ||
660 | gpio_free(HDMI_GPIO_HPD); | ||
661 | |||
662 | return status; | ||
663 | } | ||
664 | |||
665 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) | ||
666 | { | ||
667 | gpio_free(HDMI_GPIO_LS_OE); | ||
668 | gpio_free(HDMI_GPIO_HPD); | ||
669 | } | ||
670 | |||
671 | static struct omap_dss_device sdp4430_hdmi_device = { | ||
672 | .name = "hdmi", | ||
673 | .driver_name = "hdmi_panel", | ||
674 | .type = OMAP_DISPLAY_TYPE_HDMI, | ||
675 | .platform_enable = sdp4430_panel_enable_hdmi, | ||
676 | .platform_disable = sdp4430_panel_disable_hdmi, | ||
677 | .channel = OMAP_DSS_CHANNEL_DIGIT, | ||
678 | }; | ||
679 | |||
680 | static struct omap_dss_device *sdp4430_dss_devices[] = { | ||
681 | &sdp4430_hdmi_device, | ||
682 | }; | ||
683 | |||
684 | static struct omap_dss_board_info sdp4430_dss_data = { | ||
685 | .num_devices = ARRAY_SIZE(sdp4430_dss_devices), | ||
686 | .devices = sdp4430_dss_devices, | ||
687 | .default_device = &sdp4430_hdmi_device, | ||
688 | }; | ||
689 | |||
690 | void omap_4430sdp_display_init(void) | ||
691 | { | ||
692 | sdp4430_hdmi_mux_init(); | ||
693 | omap_display_init(&sdp4430_dss_data); | ||
694 | } | ||
695 | |||
623 | #ifdef CONFIG_OMAP_MUX | 696 | #ifdef CONFIG_OMAP_MUX |
624 | static struct omap_board_mux board_mux[] __initdata = { | 697 | static struct omap_board_mux board_mux[] __initdata = { |
625 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 698 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
@@ -661,6 +734,8 @@ static void __init omap_4430sdp_init(void) | |||
661 | status = omap4_keyboard_init(&sdp4430_keypad_data); | 734 | status = omap4_keyboard_init(&sdp4430_keypad_data); |
662 | if (status) | 735 | if (status) |
663 | pr_err("Keypad initialization failed: %d\n", status); | 736 | pr_err("Keypad initialization failed: %d\n", status); |
737 | |||
738 | omap_4430sdp_display_init(); | ||
664 | } | 739 | } |
665 | 740 | ||
666 | static void __init omap_4430sdp_map_io(void) | 741 | static void __init omap_4430sdp_map_io(void) |