diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index eada955014af..1af564b0487e 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -52,8 +52,9 @@ | |||
52 | #define GPIO_HUB_NRESET 62 | 52 | #define GPIO_HUB_NRESET 62 |
53 | #define GPIO_WIFI_PMENA 43 | 53 | #define GPIO_WIFI_PMENA 43 |
54 | #define GPIO_WIFI_IRQ 53 | 54 | #define GPIO_WIFI_IRQ 53 |
55 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | 55 | #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ |
56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
57 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
57 | 58 | ||
58 | /* wl127x BT, FM, GPS connectivity chip */ | 59 | /* wl127x BT, FM, GPS connectivity chip */ |
59 | static int wl1271_gpios[] = {46, -1, -1}; | 60 | static int wl1271_gpios[] = {46, -1, -1}; |
@@ -456,8 +457,9 @@ int __init omap4_panda_dvi_init(void) | |||
456 | } | 457 | } |
457 | 458 | ||
458 | static struct gpio panda_hdmi_gpios[] = { | 459 | static struct gpio panda_hdmi_gpios[] = { |
459 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 460 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, |
460 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 461 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
462 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
461 | }; | 463 | }; |
462 | 464 | ||
463 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | 465 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) |
@@ -474,10 +476,13 @@ static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | |||
474 | 476 | ||
475 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) | 477 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) |
476 | { | 478 | { |
477 | gpio_free(HDMI_GPIO_LS_OE); | 479 | gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios)); |
478 | gpio_free(HDMI_GPIO_HPD); | ||
479 | } | 480 | } |
480 | 481 | ||
482 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { | ||
483 | .hpd_gpio = HDMI_GPIO_HPD, | ||
484 | }; | ||
485 | |||
481 | static struct omap_dss_device omap4_panda_hdmi_device = { | 486 | static struct omap_dss_device omap4_panda_hdmi_device = { |
482 | .name = "hdmi", | 487 | .name = "hdmi", |
483 | .driver_name = "hdmi_panel", | 488 | .driver_name = "hdmi_panel", |
@@ -485,6 +490,7 @@ static struct omap_dss_device omap4_panda_hdmi_device = { | |||
485 | .platform_enable = omap4_panda_panel_enable_hdmi, | 490 | .platform_enable = omap4_panda_panel_enable_hdmi, |
486 | .platform_disable = omap4_panda_panel_disable_hdmi, | 491 | .platform_disable = omap4_panda_panel_disable_hdmi, |
487 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 492 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
493 | .data = &omap4_panda_hdmi_data, | ||
488 | }; | 494 | }; |
489 | 495 | ||
490 | static struct omap_dss_device *omap4_panda_dss_devices[] = { | 496 | static struct omap_dss_device *omap4_panda_dss_devices[] = { |
@@ -516,6 +522,10 @@ void omap4_panda_display_init(void) | |||
516 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | 522 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); |
517 | else | 523 | else |
518 | omap_hdmi_init(0); | 524 | omap_hdmi_init(0); |
525 | |||
526 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
527 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
528 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
519 | } | 529 | } |
520 | 530 | ||
521 | static void omap4_panda_init_rev(void) | 531 | static void omap4_panda_init_rev(void) |
@@ -535,13 +545,15 @@ static void omap4_panda_init_rev(void) | |||
535 | static void __init omap4_panda_init(void) | 545 | static void __init omap4_panda_init(void) |
536 | { | 546 | { |
537 | int package = OMAP_PACKAGE_CBS; | 547 | int package = OMAP_PACKAGE_CBS; |
548 | int ret; | ||
538 | 549 | ||
539 | if (omap_rev() == OMAP4430_REV_ES1_0) | 550 | if (omap_rev() == OMAP4430_REV_ES1_0) |
540 | package = OMAP_PACKAGE_CBL; | 551 | package = OMAP_PACKAGE_CBL; |
541 | omap4_mux_init(board_mux, NULL, package); | 552 | omap4_mux_init(board_mux, NULL, package); |
542 | 553 | ||
543 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | 554 | ret = wl12xx_set_platform_data(&omap_panda_wlan_data); |
544 | pr_err("error setting wl12xx data\n"); | 555 | if (ret) |
556 | pr_err("error setting wl12xx data: %d\n", ret); | ||
545 | 557 | ||
546 | omap4_panda_init_rev(); | 558 | omap4_panda_init_rev(); |
547 | omap4_panda_i2c_init(); | 559 | omap4_panda_i2c_init(); |