aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-05-19 08:08:27 -0400
committerColin Cross <ccross@android.com>2011-07-12 23:38:55 -0400
commit13db7a7f41a6ab619ed622d6e7b5bc1285124e1d (patch)
tree1de05e906e1b1a849b05c496d109642baa36b710 /arch/arm/mach-tegra
parentdda9cd289ca781593354cf9ad9c091aa5a1260a8 (diff)
ARM: tegra: paz00: enable usb ports
This patch add support for the second and third ehci bus on paz00. The first bus needs gadget and nvec support and will be added once the needed patches are upstream. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-paz00-pinmux.c1
-rw-r--r--arch/arm/mach-tegra/board-paz00.c35
-rw-r--r--arch/arm/mach-tegra/board-paz00.h1
3 files changed, 36 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index d2faa50174ef..acee62e26e9b 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -147,6 +147,7 @@ static struct tegra_gpio_table gpio_table[] = {
147 { .gpio = TEGRA_GPIO_SD4_CD, .enable = true }, 147 { .gpio = TEGRA_GPIO_SD4_CD, .enable = true },
148 { .gpio = TEGRA_GPIO_SD4_WP, .enable = true }, 148 { .gpio = TEGRA_GPIO_SD4_WP, .enable = true },
149 { .gpio = TEGRA_GPIO_SD4_POWER, .enable = true }, 149 { .gpio = TEGRA_GPIO_SD4_POWER, .enable = true },
150 { .gpio = TEGRA_ULPI_RST, .enable = true },
150}; 151};
151 152
152void paz00_pinmux_init(void) 153void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 5f1c110c508b..e1e19598c648 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -27,6 +27,7 @@
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/i2c-tegra.h> 29#include <linux/i2c-tegra.h>
30#include <linux/platform_data/tegra_usb.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -36,6 +37,8 @@
36#include <mach/iomap.h> 37#include <mach/iomap.h>
37#include <mach/irqs.h> 38#include <mach/irqs.h>
38#include <mach/sdhci.h> 39#include <mach/sdhci.h>
40#include <mach/usb_phy.h>
41#include <mach/gpio.h>
39 42
40#include "board.h" 43#include "board.h"
41#include "board-paz00.h" 44#include "board-paz00.h"
@@ -95,6 +98,36 @@ static void paz00_i2c_init(void)
95 platform_device_register(&tegra_i2c_device4); 98 platform_device_register(&tegra_i2c_device4);
96} 99}
97 100
101static struct tegra_ulpi_config ulpi_phy_config = {
102 .reset_gpio = TEGRA_ULPI_RST,
103 .clk = "cdev2",
104};
105
106static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
107 [0] = {
108 .operating_mode = TEGRA_USB_OTG,
109 .power_down_on_bus_suspend = 1,
110 },
111 [1] = {
112 .phy_config = &ulpi_phy_config,
113 .operating_mode = TEGRA_USB_HOST,
114 .power_down_on_bus_suspend = 1,
115 },
116 [2] = {
117 .operating_mode = TEGRA_USB_HOST,
118 .power_down_on_bus_suspend = 1,
119 },
120};
121
122static void paz00_usb_init(void)
123{
124 tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1];
125 tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2];
126
127 platform_device_register(&tegra_ehci2_device);
128 platform_device_register(&tegra_ehci3_device);
129}
130
98static void __init tegra_paz00_fixup(struct machine_desc *desc, 131static void __init tegra_paz00_fixup(struct machine_desc *desc,
99 struct tag *tags, char **cmdline, struct meminfo *mi) 132 struct tag *tags, char **cmdline, struct meminfo *mi)
100{ 133{
@@ -109,7 +142,6 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
109 { NULL, NULL, 0, 0}, 142 { NULL, NULL, 0, 0},
110}; 143};
111 144
112
113static struct tegra_sdhci_platform_data sdhci_pdata1 = { 145static struct tegra_sdhci_platform_data sdhci_pdata1 = {
114 .cd_gpio = TEGRA_GPIO_SD1_CD, 146 .cd_gpio = TEGRA_GPIO_SD1_CD,
115 .wp_gpio = TEGRA_GPIO_SD1_WP, 147 .wp_gpio = TEGRA_GPIO_SD1_WP,
@@ -142,6 +174,7 @@ static void __init tegra_paz00_init(void)
142 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); 174 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
143 175
144 paz00_i2c_init(); 176 paz00_i2c_init();
177 paz00_usb_init();
145} 178}
146 179
147MACHINE_START(PAZ00, "paz00") 180MACHINE_START(PAZ00, "paz00")
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 221ce9c662da..6b0b733fe553 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -23,6 +23,7 @@
23#define TEGRA_GPIO_SD4_CD TEGRA_GPIO_PH2 23#define TEGRA_GPIO_SD4_CD TEGRA_GPIO_PH2
24#define TEGRA_GPIO_SD4_WP TEGRA_GPIO_PH3 24#define TEGRA_GPIO_SD4_WP TEGRA_GPIO_PH3
25#define TEGRA_GPIO_SD4_POWER TEGRA_GPIO_PI6 25#define TEGRA_GPIO_SD4_POWER TEGRA_GPIO_PI6
26#define TEGRA_ULPI_RST TEGRA_GPIO_PV0
26 27
27void paz00_pinmux_init(void); 28void paz00_pinmux_init(void);
28 29