diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 333ceb2c8fb0..56702c5e577f 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), |
@@ -547,6 +550,12 @@ static struct regulator_init_data sdp4430_vusb = { | |||
547 | }, | 550 | }, |
548 | }; | 551 | }; |
549 | 552 | ||
553 | static struct regulator_init_data sdp4430_clk32kg = { | ||
554 | .constraints = { | ||
555 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
556 | }, | ||
557 | }; | ||
558 | |||
550 | static struct twl4030_platform_data sdp4430_twldata = { | 559 | static struct twl4030_platform_data sdp4430_twldata = { |
551 | .irq_base = TWL6030_IRQ_BASE, | 560 | .irq_base = TWL6030_IRQ_BASE, |
552 | .irq_end = TWL6030_IRQ_END, | 561 | .irq_end = TWL6030_IRQ_END, |
@@ -562,6 +571,7 @@ static struct twl4030_platform_data sdp4430_twldata = { | |||
562 | .vaux1 = &sdp4430_vaux1, | 571 | .vaux1 = &sdp4430_vaux1, |
563 | .vaux2 = &sdp4430_vaux2, | 572 | .vaux2 = &sdp4430_vaux2, |
564 | .vaux3 = &sdp4430_vaux3, | 573 | .vaux3 = &sdp4430_vaux3, |
574 | .clk32kg = &sdp4430_clk32kg, | ||
565 | .usb = &omap4_usbphy_data | 575 | .usb = &omap4_usbphy_data |
566 | }; | 576 | }; |
567 | 577 | ||
@@ -621,6 +631,76 @@ static void __init omap_sfh7741prox_init(void) | |||
621 | } | 631 | } |
622 | } | 632 | } |
623 | 633 | ||
634 | static void sdp4430_hdmi_mux_init(void) | ||
635 | { | ||
636 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
637 | omap_mux_init_signal("hdmi_hpd", | ||
638 | OMAP_PIN_INPUT_PULLUP); | ||
639 | omap_mux_init_signal("hdmi_cec", | ||
640 | OMAP_PIN_INPUT_PULLUP); | ||
641 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
642 | omap_mux_init_signal("hdmi_ddc_scl", | ||
643 | OMAP_PIN_INPUT_PULLUP); | ||
644 | omap_mux_init_signal("hdmi_ddc_sda", | ||
645 | OMAP_PIN_INPUT_PULLUP); | ||
646 | } | ||
647 | |||
648 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | ||
649 | { | ||
650 | int status; | ||
651 | |||
652 | status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, | ||
653 | "hdmi_gpio_hpd"); | ||
654 | if (status) { | ||
655 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD); | ||
656 | return status; | ||
657 | } | ||
658 | status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, | ||
659 | "hdmi_gpio_ls_oe"); | ||
660 | if (status) { | ||
661 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE); | ||
662 | goto error1; | ||
663 | } | ||
664 | |||
665 | return 0; | ||
666 | |||
667 | error1: | ||
668 | gpio_free(HDMI_GPIO_HPD); | ||
669 | |||
670 | return status; | ||
671 | } | ||
672 | |||
673 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) | ||
674 | { | ||
675 | gpio_free(HDMI_GPIO_LS_OE); | ||
676 | gpio_free(HDMI_GPIO_HPD); | ||
677 | } | ||
678 | |||
679 | static struct omap_dss_device sdp4430_hdmi_device = { | ||
680 | .name = "hdmi", | ||
681 | .driver_name = "hdmi_panel", | ||
682 | .type = OMAP_DISPLAY_TYPE_HDMI, | ||
683 | .platform_enable = sdp4430_panel_enable_hdmi, | ||
684 | .platform_disable = sdp4430_panel_disable_hdmi, | ||
685 | .channel = OMAP_DSS_CHANNEL_DIGIT, | ||
686 | }; | ||
687 | |||
688 | static struct omap_dss_device *sdp4430_dss_devices[] = { | ||
689 | &sdp4430_hdmi_device, | ||
690 | }; | ||
691 | |||
692 | static struct omap_dss_board_info sdp4430_dss_data = { | ||
693 | .num_devices = ARRAY_SIZE(sdp4430_dss_devices), | ||
694 | .devices = sdp4430_dss_devices, | ||
695 | .default_device = &sdp4430_hdmi_device, | ||
696 | }; | ||
697 | |||
698 | void omap_4430sdp_display_init(void) | ||
699 | { | ||
700 | sdp4430_hdmi_mux_init(); | ||
701 | omap_display_init(&sdp4430_dss_data); | ||
702 | } | ||
703 | |||
624 | #ifdef CONFIG_OMAP_MUX | 704 | #ifdef CONFIG_OMAP_MUX |
625 | static struct omap_board_mux board_mux[] __initdata = { | 705 | static struct omap_board_mux board_mux[] __initdata = { |
626 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 706 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
@@ -729,6 +809,8 @@ static void __init omap_4430sdp_init(void) | |||
729 | status = omap4_keyboard_init(&sdp4430_keypad_data); | 809 | status = omap4_keyboard_init(&sdp4430_keypad_data); |
730 | if (status) | 810 | if (status) |
731 | pr_err("Keypad initialization failed: %d\n", status); | 811 | pr_err("Keypad initialization failed: %d\n", status); |
812 | |||
813 | omap_4430sdp_display_init(); | ||
732 | } | 814 | } |
733 | 815 | ||
734 | static void __init omap_4430sdp_map_io(void) | 816 | static void __init omap_4430sdp_map_io(void) |