diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2011-02-22 19:21:29 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:13 -0800 |
commit | 425c776ea9e648a0caa7ad79e9adeb643a795248 (patch) | |
tree | 4c715b10ba938e36f7ca766d945afbbf53693665 /arch/arm | |
parent | 9f5ba6dd8a6a4f1e34ac5649b4138b11e20c9773 (diff) |
arm: tegra: ventana: Enabling suspend on USB1 & USB3
Enabling power down when device suspends for USB1 and USB3.
Also added the platform data structure which is used
when USB suspends.
Bug 770041
Original-Change-Id: I8bbe3ee90451a4a193c832bd384558747fe25036
Reviewed-on: http://git-master/r/20030
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R4e63ff13e831b3a278b4f195e0ff67097f87630b
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-tegra/board-ventana-power.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.h | 4 |
3 files changed, 27 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-power.c b/arch/arm/mach-tegra/board-ventana-power.c index 0c8b14dbf486..8abed08630d8 100644 --- a/arch/arm/mach-tegra/board-ventana-power.c +++ b/arch/arm/mach-tegra/board-ventana-power.c @@ -164,10 +164,10 @@ static struct tps6586x_subdev_info tps_devs[] = { }; static struct tps6586x_platform_data tps_platform = { - .irq_base = TEGRA_NR_IRQS, + .irq_base = TPS6586X_INT_BASE, .num_subdevs = ARRAY_SIZE(tps_devs), .subdevs = tps_devs, - .gpio_base = TEGRA_NR_GPIOS, + .gpio_base = TPS6586X_GPIO_BASE, }; static struct i2c_board_info __initdata ventana_regulators[] = { diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c index c55ba6a8df05..5d141e378ac6 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -153,7 +153,7 @@ static struct tegra_ulpi_config ventana_ehci2_ulpi_phy_config = { static struct tegra_ehci_platform_data ventana_ehci2_ulpi_platform_data = { .operating_mode = TEGRA_USB_HOST, - .power_down_on_bus_suspend = 0, + .power_down_on_bus_suspend = 1, .phy_config = &ventana_ehci2_ulpi_phy_config, }; @@ -309,11 +309,27 @@ static int __init ventana_touch_init(void) } +static struct usb_phy_plat_data tegra_usb_phy_pdata[] = { + [0] = { + .instance = 0, + .vbus_irq = TPS6586X_INT_BASE + TPS6586X_INT_USB_DET, + .vbus_gpio = TEGRA_GPIO_PD0, + }, + [1] = { + .instance = 1, + .vbus_gpio = -1, + }, + [2] = { + .instance = 2, + .vbus_gpio = TEGRA_GPIO_PD3, + }, +}; + static struct tegra_ehci_platform_data tegra_ehci_pdata[] = { [0] = { .phy_config = &utmi_phy_config[0], .operating_mode = TEGRA_USB_HOST, - .power_down_on_bus_suspend = 0, + .power_down_on_bus_suspend = 1, }, [1] = { .phy_config = &ulpi_phy_config, @@ -323,7 +339,7 @@ static struct tegra_ehci_platform_data tegra_ehci_pdata[] = { [2] = { .phy_config = &utmi_phy_config[1], .operating_mode = TEGRA_USB_HOST, - .power_down_on_bus_suspend = 0, + .power_down_on_bus_suspend = 1, }, }; @@ -408,6 +424,8 @@ static void __init ventana_power_off_init(void) static void ventana_usb_init(void) { + tegra_usb_phy_init(tegra_usb_phy_pdata, ARRAY_SIZE(tegra_usb_phy_pdata)); + tegra_otg_device.dev.platform_data = &tegra_otg_pdata; platform_device_register(&tegra_otg_device); diff --git a/arch/arm/mach-tegra/board-ventana.h b/arch/arm/mach-tegra/board-ventana.h index 353ac46f6ea0..288513449c59 100644 --- a/arch/arm/mach-tegra/board-ventana.h +++ b/arch/arm/mach-tegra/board-ventana.h @@ -48,4 +48,8 @@ int ventana_emc_init(void); #define CAM3_LDO_SHUTDN_L_GPIO (TCA6416_GPIO_BASE + 11) /* gpio11 */ #define CAM_I2C_MUX_RST_GPIO (TCA6416_GPIO_BASE + 15) /* gpio15 */ +/* Interrupt numbers from external peripherals */ +#define TPS6586X_INT_BASE TEGRA_NR_IRQS +#define TPS6586X_INT_END (TPS6586X_INT_BASE + 32) + #endif |