diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-08-08 16:35:15 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-08-09 15:07:33 -0400 |
commit | bc24ed4f21c0ef6d99b653077747c3104f5f9b60 (patch) | |
tree | ecdb52a4394782a7350956e42bd2c3dd62b78169 /arch/arm/mach-tegra | |
parent | a697e694aeb82f2643825c45dc0214666172c540 (diff) |
ARM: Tegra: Seaboard: Add USB devices
Seaboard has a couple of external USB ports. Add the platform devices and
GPIO infra-structure to enable these.
I tested both ports with a mouse on Seaboard non-clamshell.
This change is extracted from code in the ChromeOS 2.6.38 kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-seaboard-pinmux.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-seaboard.c | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c index 78797507e30..74f78b7e3f1 100644 --- a/arch/arm/mach-tegra/board-seaboard-pinmux.c +++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c | |||
@@ -168,6 +168,7 @@ static struct tegra_gpio_table gpio_table[] = { | |||
168 | { .gpio = TEGRA_GPIO_POWERKEY, .enable = true }, | 168 | { .gpio = TEGRA_GPIO_POWERKEY, .enable = true }, |
169 | { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, | 169 | { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, |
170 | { .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true }, | 170 | { .gpio = TEGRA_GPIO_CDC_IRQ, .enable = true }, |
171 | { .gpio = TEGRA_GPIO_USB1, .enable = true }, | ||
171 | }; | 172 | }; |
172 | 173 | ||
173 | void __init seaboard_pinmux_init(void) | 174 | void __init seaboard_pinmux_init(void) |
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index 07cd8e4885c..237a94a1f44 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c | |||
@@ -69,6 +69,8 @@ static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = { | |||
69 | { "pll_a_out0", "pll_a", 11289600, true }, | 69 | { "pll_a_out0", "pll_a", 11289600, true }, |
70 | { "cdev1", NULL, 0, true }, | 70 | { "cdev1", NULL, 0, true }, |
71 | { "i2s1", "pll_a_out0", 11289600, false}, | 71 | { "i2s1", "pll_a_out0", 11289600, false}, |
72 | { "usbd", "clk_m", 12000000, true}, | ||
73 | { "usb3", "clk_m", 12000000, true}, | ||
72 | { NULL, NULL, 0, 0}, | 74 | { NULL, NULL, 0, 0}, |
73 | }; | 75 | }; |
74 | 76 | ||
@@ -182,6 +184,29 @@ static struct i2c_board_info __initdata wm8903_device = { | |||
182 | .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ), | 184 | .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ), |
183 | }; | 185 | }; |
184 | 186 | ||
187 | static int seaboard_ehci_init(void) | ||
188 | { | ||
189 | int gpio_status; | ||
190 | |||
191 | gpio_status = gpio_request(TEGRA_GPIO_USB1, "VBUS_USB1"); | ||
192 | if (gpio_status < 0) { | ||
193 | pr_err("VBUS_USB1 request GPIO FAILED\n"); | ||
194 | WARN_ON(1); | ||
195 | } | ||
196 | |||
197 | gpio_status = gpio_direction_output(TEGRA_GPIO_USB1, 1); | ||
198 | if (gpio_status < 0) { | ||
199 | pr_err("VBUS_USB1 request GPIO DIRECTION FAILED\n"); | ||
200 | WARN_ON(1); | ||
201 | } | ||
202 | gpio_set_value(TEGRA_GPIO_USB1, 1); | ||
203 | |||
204 | platform_device_register(&tegra_ehci1_device); | ||
205 | platform_device_register(&tegra_ehci3_device); | ||
206 | |||
207 | return 0; | ||
208 | } | ||
209 | |||
185 | static void __init seaboard_i2c_init(void) | 210 | static void __init seaboard_i2c_init(void) |
186 | { | 211 | { |
187 | gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); | 212 | gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); |
@@ -209,6 +234,8 @@ static void __init seaboard_common_init(void) | |||
209 | tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; | 234 | tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; |
210 | 235 | ||
211 | platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); | 236 | platform_add_devices(seaboard_devices, ARRAY_SIZE(seaboard_devices)); |
237 | |||
238 | seaboard_ehci_init(); | ||
212 | } | 239 | } |
213 | 240 | ||
214 | static void __init tegra_seaboard_init(void) | 241 | static void __init tegra_seaboard_init(void) |