From patchwork Thu May 19 12:08:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Dietrich X-Patchwork-Id: 797182 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4JCAf22026938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 12:11:02 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QN22R-0001R6-7F; Thu, 19 May 2011 12:09:11 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QN22P-0003YU-Hs; Thu, 19 May 2011 12:09:09 +0000 Received: from mailout-de.gmx.net ([213.165.64.23]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1QN21r-0003W7-6z for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2011 12:08:37 +0000 Received: (qmail invoked by alias); 19 May 2011 12:08:33 -0000 Received: from fb07-iapwap2.physik.uni-giessen.de (EHLO localhost.localdomain) [134.176.19.122] by mail.gmx.net (mp049) with SMTP; 19 May 2011 14:08:33 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX19vVOl31LlvqJ1e4cMTlQJqA2r9Xf6QqnKZ2t4Y17 NE3Q7NP0hw19AY From: Marc Dietrich To: Colin Cross Subject: [PATCH 3/6] ARM: tegra: paz00: enable usb ports Date: Thu, 19 May 2011 14:08:27 +0200 Message-Id: <1305806910-3903-4-git-send-email-marvin24@gmx.de> X-Mailer: git-send-email 1.7.4.2 In-Reply-To: <1305806910-3903-1-git-send-email-marvin24@gmx.de> References: <1305806910-3903-1-git-send-email-marvin24@gmx.de> X-Y-GMX-Trusted: 0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110519_080835_655665_07E441AB X-CRM114-Status: GOOD ( 16.37 ) X-Spam-Score: 2.2 (++) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (2.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [213.165.64.23 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (marvin24[at]gmx.de) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (marvin24[at]gmx.de) Cc: linux-tegra@vger.kernel.org, Olof Johansson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 12:11:02 +0000 (UTC) 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 --- arch/arm/mach-tegra/board-paz00-pinmux.c | 1 + arch/arm/mach-tegra/board-paz00.c | 35 +++++++++++++++++++++++++++++- arch/arm/mach-tegra/board-paz00.h | 1 + 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 d2faa50..acee62e 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[] = { { .gpio = TEGRA_GPIO_SD4_CD, .enable = true }, { .gpio = TEGRA_GPIO_SD4_WP, .enable = true }, { .gpio = TEGRA_GPIO_SD4_POWER, .enable = true }, + { .gpio = TEGRA_ULPI_RST, .enable = true }, }; void paz00_pinmux_init(void) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 5f1c110..e1e1959 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -36,6 +37,8 @@ #include #include #include +#include +#include #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") diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index 221ce9c..6b0b733 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -23,6 +23,7 @@ #define TEGRA_GPIO_SD4_CD TEGRA_GPIO_PH2 #define TEGRA_GPIO_SD4_WP TEGRA_GPIO_PH3 #define TEGRA_GPIO_SD4_POWER TEGRA_GPIO_PI6 +#define TEGRA_ULPI_RST TEGRA_GPIO_PV0 void paz00_pinmux_init(void);