diff options
| -rw-r--r-- | arch/arm/mach-tegra/board-trimslice-pinmux.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-tegra/board-trimslice.c | 40 | ||||
| -rw-r--r-- | arch/arm/mach-tegra/board-trimslice.h | 3 |
3 files changed, 47 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c index 321c61066c94..82646a411ecd 100644 --- a/arch/arm/mach-tegra/board-trimslice-pinmux.c +++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c | |||
| @@ -126,7 +126,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = { | |||
| 126 | {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 126 | {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| 127 | {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 127 | {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| 128 | {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 128 | {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| 129 | {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 129 | {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
| 130 | {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 130 | {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| 131 | {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 131 | {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| 132 | {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, | 132 | {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, |
| @@ -145,6 +145,9 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = { | |||
| 145 | static struct tegra_gpio_table gpio_table[] = { | 145 | static struct tegra_gpio_table gpio_table[] = { |
| 146 | { .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */ | 146 | { .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */ |
| 147 | { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */ | 147 | { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */ |
| 148 | |||
| 149 | { .gpio = TRIMSLICE_GPIO_USB1_MODE, .enable = true }, /* USB1 mode */ | ||
| 150 | { .gpio = TRIMSLICE_GPIO_USB2_RST, .enable = true }, /* USB2 PHY rst */ | ||
| 148 | }; | 151 | }; |
| 149 | 152 | ||
| 150 | void __init trimslice_pinmux_init(void) | 153 | void __init trimslice_pinmux_init(void) |
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c index a19e90b622ec..a8fff429fb4a 100644 --- a/arch/arm/mach-tegra/board-trimslice.c +++ b/arch/arm/mach-tegra/board-trimslice.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
| 26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
| 27 | #include <linux/i2c-tegra.h> | 27 | #include <linux/i2c-tegra.h> |
| 28 | #include <linux/platform_data/tegra_usb.h> | ||
| 29 | #include <linux/gpio.h> | ||
| 28 | 30 | ||
| 29 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
| 30 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
| @@ -32,6 +34,8 @@ | |||
| 32 | 34 | ||
| 33 | #include <mach/iomap.h> | 35 | #include <mach/iomap.h> |
| 34 | #include <mach/sdhci.h> | 36 | #include <mach/sdhci.h> |
| 37 | #include <mach/usb_phy.h> | ||
| 38 | #include <mach/gpio.h> | ||
| 35 | 39 | ||
| 36 | #include "board.h" | 40 | #include "board.h" |
| 37 | #include "clock.h" | 41 | #include "clock.h" |
| @@ -123,6 +127,41 @@ static void trimslice_i2c_init(void) | |||
| 123 | ARRAY_SIZE(trimslice_i2c3_board_info)); | 127 | ARRAY_SIZE(trimslice_i2c3_board_info)); |
| 124 | } | 128 | } |
| 125 | 129 | ||
| 130 | struct tegra_ulpi_config ehci2_phy_config = { | ||
| 131 | .reset_gpio = TRIMSLICE_GPIO_USB2_RST, | ||
| 132 | .clk = "cdev2", | ||
| 133 | }; | ||
| 134 | |||
| 135 | static struct tegra_ehci_platform_data ehci_ulpi_data = { | ||
| 136 | .operating_mode = TEGRA_USB_HOST, | ||
| 137 | .phy_config = &ehci2_phy_config, | ||
| 138 | }; | ||
| 139 | |||
| 140 | static struct tegra_ehci_platform_data ehci_utmi_data = { | ||
| 141 | .operating_mode = TEGRA_USB_HOST, | ||
| 142 | }; | ||
| 143 | |||
| 144 | static void trimslice_usb_init(void) | ||
| 145 | { | ||
| 146 | int err; | ||
| 147 | |||
| 148 | tegra_ehci3_device.dev.platform_data = &ehci_utmi_data; | ||
| 149 | platform_device_register(&tegra_ehci3_device); | ||
| 150 | |||
| 151 | tegra_ehci2_device.dev.platform_data = &ehci_ulpi_data; | ||
| 152 | platform_device_register(&tegra_ehci2_device); | ||
| 153 | |||
| 154 | err = gpio_request_one(TRIMSLICE_GPIO_USB1_MODE, GPIOF_OUT_INIT_HIGH, | ||
| 155 | "usb1mode"); | ||
| 156 | if (err) { | ||
| 157 | pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err); | ||
| 158 | return; | ||
| 159 | } | ||
| 160 | |||
| 161 | tegra_ehci1_device.dev.platform_data = &ehci_utmi_data; | ||
| 162 | platform_device_register(&tegra_ehci1_device); | ||
| 163 | } | ||
| 164 | |||
| 126 | static void __init tegra_trimslice_fixup(struct machine_desc *desc, | 165 | static void __init tegra_trimslice_fixup(struct machine_desc *desc, |
| 127 | struct tag *tags, char **cmdline, struct meminfo *mi) | 166 | struct tag *tags, char **cmdline, struct meminfo *mi) |
| 128 | { | 167 | { |
| @@ -164,6 +203,7 @@ static void __init tegra_trimslice_init(void) | |||
| 164 | platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices)); | 203 | platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices)); |
| 165 | 204 | ||
| 166 | trimslice_i2c_init(); | 205 | trimslice_i2c_init(); |
| 206 | trimslice_usb_init(); | ||
| 167 | } | 207 | } |
| 168 | 208 | ||
| 169 | MACHINE_START(TRIMSLICE, "trimslice") | 209 | MACHINE_START(TRIMSLICE, "trimslice") |
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h index e8ef6291c6f1..7a7dee86b4da 100644 --- a/arch/arm/mach-tegra/board-trimslice.h +++ b/arch/arm/mach-tegra/board-trimslice.h | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | #define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */ | 20 | #define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */ |
| 21 | #define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */ | 21 | #define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */ |
| 22 | 22 | ||
| 23 | #define TRIMSLICE_GPIO_USB1_MODE TEGRA_GPIO_PV2 /* USB1 mode */ | ||
| 24 | #define TRIMSLICE_GPIO_USB2_RST TEGRA_GPIO_PV0 /* USB2 PHY reset */ | ||
| 25 | |||
| 23 | void trimslice_pinmux_init(void); | 26 | void trimslice_pinmux_init(void); |
| 24 | 27 | ||
| 25 | #endif | 28 | #endif |
