summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-paz00.c
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-05-19 14:08:27 +0200
committerColin Cross <ccross@android.com>2011-07-12 20:38:55 -0700
commit13db7a7f41a6ab619ed622d6e7b5bc1285124e1d (patch)
tree1de05e906e1b1a849b05c496d109642baa36b710 /arch/arm/mach-tegra/board-paz00.c
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/board-paz00.c')
-rw-r--r--arch/arm/mach-tegra/board-paz00.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 5f1c110c508..e1e19598c64 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -27,6 +27,7 @@
#include <linux/io.h>
#include <linux/i2c.h>
#include <linux/i2c-tegra.h>
+#include <linux/platform_data/tegra_usb.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -36,6 +37,8 @@
#include <mach/iomap.h>
#include <mach/irqs.h>
#include <mach/sdhci.h>
+#include <mach/usb_phy.h>
+#include <mach/gpio.h>
#include "board.h"
#include "board-paz00.h"
@@ -95,6 +98,36 @@ static void paz00_i2c_init(void)
platform_device_register(&tegra_i2c_device4);
}
+static struct tegra_ulpi_config ulpi_phy_config = {
+ .reset_gpio = TEGRA_ULPI_RST,
+ .clk = "cdev2",
+};
+
+static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
+ [0] = {
+ .operating_mode = TEGRA_USB_OTG,
+ .power_down_on_bus_suspend = 1,
+ },
+ [1] = {
+ .phy_config = &ulpi_phy_config,
+ .operating_mode = TEGRA_USB_HOST,
+ .power_down_on_bus_suspend = 1,
+ },
+ [2] = {
+ .operating_mode = TEGRA_USB_HOST,
+ .power_down_on_bus_suspend = 1,
+ },
+};
+
+static void paz00_usb_init(void)
+{
+ tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1];
+ tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2];
+
+ platform_device_register(&tegra_ehci2_device);
+ platform_device_register(&tegra_ehci3_device);
+}
+
static void __init tegra_paz00_fixup(struct machine_desc *desc,
struct tag *tags, char **cmdline, struct meminfo *mi)
{
@@ -109,7 +142,6 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
{ NULL, NULL, 0, 0},
};
-
static struct tegra_sdhci_platform_data sdhci_pdata1 = {
.cd_gpio = TEGRA_GPIO_SD1_CD,
.wp_gpio = TEGRA_GPIO_SD1_WP,
@@ -142,6 +174,7 @@ static void __init tegra_paz00_init(void)
platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
paz00_i2c_init();
+ paz00_usb_init();
}
MACHINE_START(PAZ00, "paz00")