|
36 | 36 | #include <plat/usb.h>
|
37 | 37 | #include <plat/mmc.h>
|
38 | 38 | #include <plat/omap4-keypad.h>
|
| 39 | +#include <plat/display.h> |
39 | 40 |
|
40 | 41 | #include "mux.h"
|
41 | 42 | #include "hsmmc.h"
|
|
47 | 48 | #define ETH_KS8851_QUART 138
|
48 | 49 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
|
49 | 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 | 54 | static const int sdp4430_keymap[] = {
|
52 | 55 | KEY(0, 0, KEY_E),
|
@@ -621,6 +624,76 @@ static void __init omap_sfh7741prox_init(void)
|
621 | 624 | }
|
622 | 625 | }
|
623 | 626 |
|
| 627 | +static 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 | + |
| 641 | +static 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 | + |
| 660 | +error1: |
| 661 | + gpio_free(HDMI_GPIO_HPD); |
| 662 | + |
| 663 | + return status; |
| 664 | +} |
| 665 | + |
| 666 | +static 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 | + |
| 672 | +static 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 | + |
| 681 | +static struct omap_dss_device *sdp4430_dss_devices[] = { |
| 682 | + &sdp4430_hdmi_device, |
| 683 | +}; |
| 684 | + |
| 685 | +static 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 | + |
| 691 | +void omap_4430sdp_display_init(void) |
| 692 | +{ |
| 693 | + sdp4430_hdmi_mux_init(); |
| 694 | + omap_display_init(&sdp4430_dss_data); |
| 695 | +} |
| 696 | + |
624 | 697 | #ifdef CONFIG_OMAP_MUX
|
625 | 698 | static struct omap_board_mux board_mux[] __initdata = {
|
626 | 699 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
@@ -729,6 +802,8 @@ static void __init omap_4430sdp_init(void)
|
729 | 802 | status = omap4_keyboard_init(&sdp4430_keypad_data);
|
730 | 803 | if (status)
|
731 | 804 | pr_err("Keypad initialization failed: %d\n", status);
|
| 805 | + |
| 806 | + omap_4430sdp_display_init(); |
732 | 807 | }
|
733 | 808 |
|
734 | 809 | static void __init omap_4430sdp_map_io(void)
|
|
0 commit comments