[ARM] tegra: board-stingray: Platform data for ehci devices
authorBenoit Goby <benoit@android.com>
Fri, 10 Sep 2010 07:52:27 +0000 (00:52 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:51:32 +0000 (16:51 -0700)
Change-Id: I8a0120d016ed5cf5b0080a86af6b324b1f3e9d1c
Signed-off-by: Benoit Goby <benoit@android.com>
arch/arm/mach-tegra/board-stingray.c

index 1a6a2c42a2b5dddccb0b49efc84727e7f6da635d..6444879881451502a38ce4279a66fa8965581207 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/dma-mapping.h>
 #include <linux/fsl_devices.h>
+#include <linux/tegra_usb.h>
 #include <linux/pda_power.h>
 #include <linux/gpio.h>
 #include <linux/delay.h>
@@ -385,7 +386,7 @@ static struct platform_device rndis_device = {
 };
 #endif
 
-static struct tegra_utmip_config host_phy_config[] = {
+static struct tegra_utmip_config utmi_phy_config[] = {
        [0] = {
                .hssync_start_delay = 0,
                .idle_wait_delay = 17,
@@ -395,7 +396,7 @@ static struct tegra_utmip_config host_phy_config[] = {
                .xcvr_lsfslew = 2,
                .xcvr_lsrslew = 2,
        },
-       [2] = {
+       [1] = {
                .hssync_start_delay = 0,
                .idle_wait_delay = 17,
                .elastic_limit = 16,
@@ -411,6 +412,24 @@ static struct tegra_ulpi_config ulpi_phy_config = {
        .clk = "clk_dev2",
 };
 
+static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
+       [0] = {
+               .phy_config = &utmi_phy_config[0],
+               .operating_mode = TEGRA_USB_OTG,
+               .power_down_on_bus_suspend = 0,
+       },
+       [1] = {
+               .phy_config = &ulpi_phy_config,
+               .operating_mode = TEGRA_USB_HOST,
+               .power_down_on_bus_suspend = 1,
+       },
+       [2] = {
+               .phy_config = &utmi_phy_config[1],
+               .operating_mode = TEGRA_USB_HOST,
+               .power_down_on_bus_suspend = 1,
+       },
+};
+
 /* bq24617 charger */
 static struct resource bq24617_resources[] = {
        [0] = {
@@ -749,8 +768,8 @@ static void stingray_usb_init(void)
        struct android_usb_platform_data *platform_data;
 
        tegra_udc_device.dev.platform_data = &tegra_udc_pdata;
-       tegra_ehci2_device.dev.platform_data = &ulpi_phy_config;
-       tegra_ehci3_device.dev.platform_data = &host_phy_config[2];
+       tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1];
+       tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2];
 
        platform_device_register(&tegra_udc_device);
        platform_device_register(&tegra_ehci2_device);
@@ -990,7 +1009,7 @@ static void __init tegra_stingray_init(void)
        tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata;
        cpcap_device_register(&cpcap_audio_device);
 
-       tegra_ehci1_device.dev.platform_data = &host_phy_config[0];
+       tegra_ehci1_device.dev.platform_data = &tegra_ehci_pdata[0];
 
        platform_add_devices(stingray_devices, ARRAY_SIZE(stingray_devices));