From patchwork Thu May 19 12:08:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Dietrich X-Patchwork-Id: 797212 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 p4JCBAt0027484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 12:11:30 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QN22u-0002Hu-3v; Thu, 19 May 2011 12:09:40 +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 1QN22s-0003ZS-Bo; Thu, 19 May 2011 12:09:38 +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 1QN21s-0003WP-5o for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2011 12:08:38 +0000 Received: (qmail invoked by alias); 19 May 2011 12:08:35 -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:35 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX19rab4wPjNrqQPaBsiZkL0h8QWBGtLFwISljSwq/F +4Ogr1k+JytD/f From: Marc Dietrich To: Colin Cross Subject: [PATCH 6/6] ARM: tegra: paz00: enable wifi card Date: Thu, 19 May 2011 14:08:30 +0200 Message-Id: <1305806910-3903-7-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_080836_516422_8B229999 X-CRM114-Status: GOOD ( 13.91 ) 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:30 +0000 (UTC) The Wifi card attached to one usb port needs to be unkilled. The corresponding gpio and also the gpio for the LED are exported to be controlled by userspace later on. Signed-off-by: Marc Dietrich --- arch/arm/mach-tegra/board-paz00-pinmux.c | 2 ++ arch/arm/mach-tegra/board-paz00.c | 22 ++++++++++++++++++++++ arch/arm/mach-tegra/board-paz00.h | 7 +++++++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index bdd2627..41a6304 100644 --- a/arch/arm/mach-tegra/board-paz00-pinmux.c +++ b/arch/arm/mach-tegra/board-paz00-pinmux.c @@ -145,6 +145,8 @@ static struct tegra_gpio_table gpio_table[] = { { .gpio = TEGRA_GPIO_SD1_WP, .enable = true }, { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true }, { .gpio = TEGRA_ULPI_RST, .enable = true }, + { .gpio = TEGRA_WIFI_PWRN, .enable = true }, + { .gpio = TEGRA_WIFI_LED, .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 1b076f6..c78ef4c 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -135,6 +135,27 @@ static void __init tegra_paz00_fixup(struct machine_desc *desc, mi->bank[0].size = 448 * SZ_1M; } +static void __init paz00_wifi_init(void) +{ + int ret; + + /* unlock hw rfkill */ + ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH, + "wifi_pwrn"); + if(ret) { + pr_warning("WIFI: could not request PWRN gpio!\n"); + return; + } + gpio_export(TEGRA_WIFI_PWRN, 0); + + /* export wifi led */ + ret = gpio_request_one(TEGRA_WIFI_LED, GPIOF_OUT_INIT_HIGH, + "wifi_led"); + if(ret) + pr_warning("WIFI: could not request LED gpio!\n"); + gpio_export(TEGRA_WIFI_LED, 0); +} + static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = { /* name parent rate enabled */ { "uartd", "pll_p", 216000000, true }, @@ -167,6 +188,7 @@ static void __init tegra_paz00_init(void) paz00_i2c_init(); paz00_usb_init(); + paz00_wifi_init(); } MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index d4ff39d..a49543a 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -17,11 +17,18 @@ #ifndef _MACH_TEGRA_BOARD_PAZ00_H #define _MACH_TEGRA_BOARD_PAZ00_H +/* SDMMC */ #define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 #define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 #define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 + +/* ULPI */ #define TEGRA_ULPI_RST TEGRA_GPIO_PV0 +/* Wifi */ +#define TEGRA_WIFI_LED TEGRA_GPIO_PD0 +#define TEGRA_WIFI_PWRN TEGRA_GPIO_PK5 + void paz00_pinmux_init(void); #endif