diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 82 |
1 files changed, 58 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 510b6a2ff0fa..b38cd7b240e8 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
| @@ -53,7 +53,8 @@ | |||
| 53 | #include "hsmmc.h" | 53 | #include "hsmmc.h" |
| 54 | #include "common-board-devices.h" | 54 | #include "common-board-devices.h" |
| 55 | 55 | ||
| 56 | #define CM_T35_GPIO_PENDOWN 57 | 56 | #define CM_T35_GPIO_PENDOWN 57 |
| 57 | #define SB_T35_USB_HUB_RESET_GPIO 167 | ||
| 57 | 58 | ||
| 58 | #define CM_T35_SMSC911X_CS 5 | 59 | #define CM_T35_SMSC911X_CS 5 |
| 59 | #define CM_T35_SMSC911X_GPIO 163 | 60 | #define CM_T35_SMSC911X_GPIO 163 |
| @@ -339,8 +340,10 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = { | |||
| 339 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), | 340 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
| 340 | }; | 341 | }; |
| 341 | 342 | ||
| 342 | static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { | 343 | static struct regulator_consumer_supply cm_t35_vio_supplies[] = { |
| 343 | REGULATOR_SUPPLY("vdvi", "omapdss"), | 344 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
| 345 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
| 346 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
| 344 | }; | 347 | }; |
| 345 | 348 | ||
| 346 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 349 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
| @@ -373,6 +376,19 @@ static struct regulator_init_data cm_t35_vsim = { | |||
| 373 | .consumer_supplies = cm_t35_vsim_supply, | 376 | .consumer_supplies = cm_t35_vsim_supply, |
| 374 | }; | 377 | }; |
| 375 | 378 | ||
| 379 | static struct regulator_init_data cm_t35_vio = { | ||
| 380 | .constraints = { | ||
| 381 | .min_uV = 1800000, | ||
| 382 | .max_uV = 1800000, | ||
| 383 | .apply_uV = true, | ||
| 384 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 385 | | REGULATOR_MODE_STANDBY, | ||
| 386 | .valid_ops_mask = REGULATOR_CHANGE_MODE, | ||
| 387 | }, | ||
| 388 | .num_consumer_supplies = ARRAY_SIZE(cm_t35_vio_supplies), | ||
| 389 | .consumer_supplies = cm_t35_vio_supplies, | ||
| 390 | }; | ||
| 391 | |||
| 376 | static uint32_t cm_t35_keymap[] = { | 392 | static uint32_t cm_t35_keymap[] = { |
| 377 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), | 393 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), |
| 378 | KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), | 394 | KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), |
| @@ -421,6 +437,23 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = { | |||
| 421 | .reset_gpio_port[2] = -EINVAL | 437 | .reset_gpio_port[2] = -EINVAL |
| 422 | }; | 438 | }; |
| 423 | 439 | ||
| 440 | static void cm_t35_init_usbh(void) | ||
| 441 | { | ||
| 442 | int err; | ||
| 443 | |||
| 444 | err = gpio_request_one(SB_T35_USB_HUB_RESET_GPIO, | ||
| 445 | GPIOF_OUT_INIT_LOW, "usb hub rst"); | ||
| 446 | if (err) { | ||
| 447 | pr_err("SB-T35: usb hub rst gpio request failed: %d\n", err); | ||
| 448 | } else { | ||
| 449 | udelay(10); | ||
| 450 | gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1); | ||
| 451 | msleep(1); | ||
| 452 | } | ||
| 453 | |||
| 454 | usbhs_init(&usbhs_bdata); | ||
| 455 | } | ||
| 456 | |||
| 424 | static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, | 457 | static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, |
| 425 | unsigned ngpio) | 458 | unsigned ngpio) |
| 426 | { | 459 | { |
| @@ -456,17 +489,14 @@ static struct twl4030_platform_data cm_t35_twldata = { | |||
| 456 | .gpio = &cm_t35_gpio_data, | 489 | .gpio = &cm_t35_gpio_data, |
| 457 | .vmmc1 = &cm_t35_vmmc1, | 490 | .vmmc1 = &cm_t35_vmmc1, |
| 458 | .vsim = &cm_t35_vsim, | 491 | .vsim = &cm_t35_vsim, |
| 492 | .vio = &cm_t35_vio, | ||
| 459 | }; | 493 | }; |
| 460 | 494 | ||
| 461 | static void __init cm_t35_init_i2c(void) | 495 | static void __init cm_t35_init_i2c(void) |
| 462 | { | 496 | { |
| 463 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, | 497 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, |
| 464 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | 498 | TWL_COMMON_REGULATOR_VDAC | |
| 465 | 499 | TWL_COMMON_PDATA_AUDIO); | |
| 466 | cm_t35_twldata.vpll2->constraints.name = "VDVI"; | ||
| 467 | cm_t35_twldata.vpll2->num_consumer_supplies = | ||
| 468 | ARRAY_SIZE(cm_t35_vdvi_supply); | ||
| 469 | cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply; | ||
| 470 | 500 | ||
| 471 | omap3_pmic_init("tps65930", &cm_t35_twldata); | 501 | omap3_pmic_init("tps65930", &cm_t35_twldata); |
| 472 | } | 502 | } |
| @@ -570,24 +600,28 @@ static void __init cm_t3x_common_dss_mux_init(int mux_mode) | |||
| 570 | 600 | ||
| 571 | static void __init cm_t35_init_mux(void) | 601 | static void __init cm_t35_init_mux(void) |
| 572 | { | 602 | { |
| 573 | omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 603 | int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT; |
| 574 | omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 604 | |
| 575 | omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 605 | omap_mux_init_signal("dss_data0.dss_data0", mux_mode); |
| 576 | omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 606 | omap_mux_init_signal("dss_data1.dss_data1", mux_mode); |
| 577 | omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 607 | omap_mux_init_signal("dss_data2.dss_data2", mux_mode); |
| 578 | omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 608 | omap_mux_init_signal("dss_data3.dss_data3", mux_mode); |
| 579 | cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); | 609 | omap_mux_init_signal("dss_data4.dss_data4", mux_mode); |
| 610 | omap_mux_init_signal("dss_data5.dss_data5", mux_mode); | ||
| 611 | cm_t3x_common_dss_mux_init(mux_mode); | ||
| 580 | } | 612 | } |
| 581 | 613 | ||
| 582 | static void __init cm_t3730_init_mux(void) | 614 | static void __init cm_t3730_init_mux(void) |
| 583 | { | 615 | { |
| 584 | omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 616 | int mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT; |
| 585 | omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 617 | |
| 586 | omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 618 | omap_mux_init_signal("sys_boot0", mux_mode); |
| 587 | omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 619 | omap_mux_init_signal("sys_boot1", mux_mode); |
| 588 | omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 620 | omap_mux_init_signal("sys_boot3", mux_mode); |
| 589 | omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 621 | omap_mux_init_signal("sys_boot4", mux_mode); |
| 590 | cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); | 622 | omap_mux_init_signal("sys_boot5", mux_mode); |
| 623 | omap_mux_init_signal("sys_boot6", mux_mode); | ||
| 624 | cm_t3x_common_dss_mux_init(mux_mode); | ||
| 591 | } | 625 | } |
| 592 | #else | 626 | #else |
| 593 | static inline void cm_t35_init_mux(void) {} | 627 | static inline void cm_t35_init_mux(void) {} |
| @@ -612,7 +646,7 @@ static void __init cm_t3x_common_init(void) | |||
| 612 | cm_t35_init_display(); | 646 | cm_t35_init_display(); |
| 613 | 647 | ||
| 614 | usb_musb_init(NULL); | 648 | usb_musb_init(NULL); |
| 615 | usbhs_init(&usbhs_bdata); | 649 | cm_t35_init_usbh(); |
| 616 | } | 650 | } |
| 617 | 651 | ||
| 618 | static void __init cm_t35_init(void) | 652 | static void __init cm_t35_init(void) |
