diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index a94ce07be72f..795ffc461522 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | #include <plat/display.h> | ||
37 | 38 | ||
38 | #include <plat/board.h> | 39 | #include <plat/board.h> |
39 | #include <plat/common.h> | 40 | #include <plat/common.h> |
@@ -49,6 +50,8 @@ | |||
49 | #define GPIO_HUB_NRESET 62 | 50 | #define GPIO_HUB_NRESET 62 |
50 | #define GPIO_WIFI_PMENA 43 | 51 | #define GPIO_WIFI_PMENA 43 |
51 | #define GPIO_WIFI_IRQ 53 | 52 | #define GPIO_WIFI_IRQ 53 |
53 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | ||
54 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | ||
52 | 55 | ||
53 | /* wl127x BT, FM, GPS connectivity chip */ | 56 | /* wl127x BT, FM, GPS connectivity chip */ |
54 | static int wl1271_gpios[] = {46, -1, -1}; | 57 | static int wl1271_gpios[] = {46, -1, -1}; |
@@ -467,6 +470,76 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
467 | #define board_mux NULL | 470 | #define board_mux NULL |
468 | #endif | 471 | #endif |
469 | 472 | ||
473 | static void omap4_panda_hdmi_mux_init(void) | ||
474 | { | ||
475 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
476 | omap_mux_init_signal("hdmi_hpd", | ||
477 | OMAP_PIN_INPUT_PULLUP); | ||
478 | omap_mux_init_signal("hdmi_cec", | ||
479 | OMAP_PIN_INPUT_PULLUP); | ||
480 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
481 | omap_mux_init_signal("hdmi_ddc_scl", | ||
482 | OMAP_PIN_INPUT_PULLUP); | ||
483 | omap_mux_init_signal("hdmi_ddc_sda", | ||
484 | OMAP_PIN_INPUT_PULLUP); | ||
485 | } | ||
486 | |||
487 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | ||
488 | { | ||
489 | int status; | ||
490 | |||
491 | status = gpio_request_one(HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, | ||
492 | "hdmi_gpio_hpd"); | ||
493 | if (status) { | ||
494 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_HPD); | ||
495 | return status; | ||
496 | } | ||
497 | status = gpio_request_one(HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, | ||
498 | "hdmi_gpio_ls_oe"); | ||
499 | if (status) { | ||
500 | pr_err("Cannot request GPIO %d\n", HDMI_GPIO_LS_OE); | ||
501 | goto error1; | ||
502 | } | ||
503 | |||
504 | return 0; | ||
505 | |||
506 | error1: | ||
507 | gpio_free(HDMI_GPIO_HPD); | ||
508 | |||
509 | return status; | ||
510 | } | ||
511 | |||
512 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) | ||
513 | { | ||
514 | gpio_free(HDMI_GPIO_LS_OE); | ||
515 | gpio_free(HDMI_GPIO_HPD); | ||
516 | } | ||
517 | |||
518 | static struct omap_dss_device omap4_panda_hdmi_device = { | ||
519 | .name = "hdmi", | ||
520 | .driver_name = "hdmi_panel", | ||
521 | .type = OMAP_DISPLAY_TYPE_HDMI, | ||
522 | .platform_enable = omap4_panda_panel_enable_hdmi, | ||
523 | .platform_disable = omap4_panda_panel_disable_hdmi, | ||
524 | .channel = OMAP_DSS_CHANNEL_DIGIT, | ||
525 | }; | ||
526 | |||
527 | static struct omap_dss_device *omap4_panda_dss_devices[] = { | ||
528 | &omap4_panda_hdmi_device, | ||
529 | }; | ||
530 | |||
531 | static struct omap_dss_board_info omap4_panda_dss_data = { | ||
532 | .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), | ||
533 | .devices = omap4_panda_dss_devices, | ||
534 | .default_device = &omap4_panda_hdmi_device, | ||
535 | }; | ||
536 | |||
537 | void omap4_panda_display_init(void) | ||
538 | { | ||
539 | omap4_panda_hdmi_mux_init(); | ||
540 | omap_display_init(&omap4_panda_dss_data); | ||
541 | } | ||
542 | |||
470 | static void __init omap4_panda_init(void) | 543 | static void __init omap4_panda_init(void) |
471 | { | 544 | { |
472 | int package = OMAP_PACKAGE_CBS; | 545 | int package = OMAP_PACKAGE_CBS; |
@@ -485,6 +558,7 @@ static void __init omap4_panda_init(void) | |||
485 | omap4_twl6030_hsmmc_init(mmc); | 558 | omap4_twl6030_hsmmc_init(mmc); |
486 | omap4_ehci_init(); | 559 | omap4_ehci_init(); |
487 | usb_musb_init(&musb_board_data); | 560 | usb_musb_init(&musb_board_data); |
561 | omap4_panda_display_init(); | ||
488 | } | 562 | } |
489 | 563 | ||
490 | static void __init omap4_panda_map_io(void) | 564 | static void __init omap4_panda_map_io(void) |