--- linux-2.6.39.armv7l/arch/arm/mach-tegra/board-trimslice-pinmux.c.TEGRA 2011-05-19 00:06:34.000000000 -0400 +++ linux-2.6.39.armv7l/arch/arm/mach-tegra/board-trimslice-pinmux.c 2011-08-16 01:16:35.194157025 -0400 @@ -126,7 +126,7 @@ {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, - {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, --- linux-2.6.39.armv7l/arch/arm/mach-tegra/board-trimslice.c.TEGRA 2011-05-19 00:06:34.000000000 -0400 +++ linux-2.6.39.armv7l/arch/arm/mach-tegra/board-trimslice.c 2011-08-16 01:25:44.679159239 -0400 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,8 @@ #include #include +#include +#include #include "board.h" #include "clock.h" @@ -102,6 +105,68 @@ } subsys_initcall(tegra_trimslice_pci_init); +static struct tegra_utmip_config utmi_phy_config[] = { + [0] = { + .hssync_start_delay = 0, + .idle_wait_delay = 17, + .elastic_limit = 16, + .term_range_adj = 6, + .xcvr_setup = 15, + .xcvr_lsfslew = 2, + .xcvr_lsrslew = 2, + }, + [1] = { + .hssync_start_delay = 0, + .idle_wait_delay = 17, + .elastic_limit = 16, + .term_range_adj = 6, + .xcvr_setup = 8, + .xcvr_lsfslew = 2, + .xcvr_lsrslew = 2, + }, +}; + +static struct tegra_ehci_platform_data ehci1_data = { + .phy_config = &utmi_phy_config[0], + .operating_mode = TEGRA_USB_HOST, + .power_down_on_bus_suspend = 0, +}; + +struct tegra_ulpi_config ehci2_phy_config = { + .reset_gpio = TEGRA_GPIO_PV0, + .clk = "pll_m", +}; + +static struct tegra_ehci_platform_data ehci2_data = { + .operating_mode = TEGRA_USB_HOST, + .phy_config = &ehci2_phy_config, + .power_down_on_bus_suspend = 0, +}; + +static struct tegra_ehci_platform_data ehci3_data = { + .phy_config = &utmi_phy_config[1], + .operating_mode = TEGRA_USB_HOST, + .power_down_on_bus_suspend = 0, +}; + +static void trimslice_usb_init(void) +{ + tegra_ehci3_device.dev.platform_data = &ehci3_data; + platform_device_register(&tegra_ehci3_device); + + tegra_gpio_enable(TEGRA_GPIO_PV0); + tegra_ehci2_device.dev.platform_data = &ehci2_data; + platform_device_register(&tegra_ehci2_device); + + tegra_gpio_enable(TEGRA_GPIO_PV2); + gpio_request(TEGRA_GPIO_PV2, "usb1 mode"); + gpio_direction_output(TEGRA_GPIO_PV2, 1); + + tegra_ehci1_device.dev.platform_data = &ehci1_data; + platform_device_register(&tegra_ehci1_device); +} + + static void __init tegra_trimslice_init(void) { tegra_clk_init_from_table(trimslice_clk_init_table); @@ -112,8 +177,11 @@ tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices)); + + trimslice_usb_init(); } + MACHINE_START(TRIMSLICE, "trimslice") .boot_params = 0x00000100, .fixup = tegra_trimslice_fixup,