From patchwork Thu Jan 5 17:37:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 9499425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C2A43606DE for ; Thu, 5 Jan 2017 17:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA4EC27BFC for ; Thu, 5 Jan 2017 17:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF14D283F0; Thu, 5 Jan 2017 17:38:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A686F27BFC for ; Thu, 5 Jan 2017 17:38:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cPBzr-00068i-7K; Thu, 05 Jan 2017 17:38:39 +0000 Received: from mout02.posteo.de ([185.67.36.142]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cPBzm-0005mc-Ju for linux-arm-kernel@lists.infradead.org; Thu, 05 Jan 2017 17:38:36 +0000 Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3tvZdj1PmfzypX; Thu, 5 Jan 2017 18:38:00 +0100 (CET) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1483637879; x=1484242680; bh=UDdOQshXowI/t4014tC9rvEra4al64HZa28CGut/DxM=; b=WaqbvOiwoyJv QrdnEvNA6XIhn4lAkmzwku5ILI4VcIxLNigkVXlHQlGKsLkMhUmOzhon+ngNvXIU 8ka+myX/xUXqC7KY2M9FvBhqo/Iv68z0gLXd4Vne74pv+9Pjm/Aypq1A6ZkVW6Hf Q3ggkuxZ1iJZCYCzkcETbY+QqNqjm/sfQoMgONvnOOooew5P2ZuKZRKCUIjqoRsj TVmv344n9A6ebxrKfBSc3WKkAd7WYeAZG6exfZE9fbXpHjNHz6jdgfGGtU++wF5T wfPWk7bhzW52rdV2qrQmJobq0tIa9hzbPJnJIo2hAvOQnfHui5frtT5eJYBzC26Z JB50/86r+g== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id mVaN4Gh3OLED; Thu, 5 Jan 2017 18:37:59 +0100 (CET) Received: from nzxt.fritz.box (x4d021851.dyn.telefonica.de [77.2.24.81]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 5 Jan 2017 18:37:59 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: dts: sun7i: Add wifi dt node on Banana Pro Date: Thu, 5 Jan 2017 18:37:53 +0100 Message-Id: <20170105173753.14024-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170105_093835_032822_13786D28 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , Maxime Ripard , =?UTF-8?q?J=C3=B6rg=20Krause?= , Chen-Yu Tsai Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Banana Pro has an AMPAK AP6181 WiFi+Bluetooth module. The WiFi part is a BCM43362 IC connected to MMC3 of the A20 SoC via SDIO. The IC also takes a power enable signal via GPIO. This commit adds a device-tree node to power it up, so the mmc subsys can scan it, and enables the mmc controller which is connected to it. As the wifi enable pin of the AP6181 module is not really a regulator, switch the mmc3 node to the mmc-pwrseq framework for controlling it. This more accurately reflectes how the hardware actually works. Signed-off-by: Jörg Krause --- Changes v2 (suggested by Maxime Ripard): - rename pwrseq node to clarify the function rather what it's connected to - use dash instead of underscore for the pwrseq node name - remove setting pull-ups for mmc3 (default since commit 37bc56128d92) --- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts index 19d63d4049de..77f8fb76c157 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts @@ -76,6 +76,13 @@ }; }; + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&vmmc3_pin_bananapro>; + reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; + }; + reg_gmac_3v3: gmac-3v3 { compatible = "regulator-fixed"; pinctrl-names = "default"; @@ -87,17 +94,6 @@ enable-active-high; gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; }; - - reg_vmmc3: vmmc3 { - compatible = "regulator-fixed"; - pinctrl-names = "default"; - pinctrl-0 = <&vmmc3_pin_bananapro>; - regulator-name = "vmmc3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - enable-active-high; - gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>; - }; }; &ahci { @@ -166,10 +162,20 @@ &mmc3 { pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins_a>; - vmmc-supply = <®_vmmc3>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; + wakeup-source; status = "okay"; + + brcmf: bcrmf@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "host-wake"; + }; }; &ohci0 {