From patchwork Mon Jan 9 20:36:38 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: 9505885 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 8962260757 for ; Mon, 9 Jan 2017 20:37:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7248628461 for ; Mon, 9 Jan 2017 20:37:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65B7B28515; Mon, 9 Jan 2017 20:37:25 +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 D1A0F28461 for ; Mon, 9 Jan 2017 20:37:24 +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 1cQgh0-0001xS-5r; Mon, 09 Jan 2017 20:37:22 +0000 Received: from mout02.posteo.de ([185.67.36.142]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQggv-0001ow-2U for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2017 20:37:19 +0000 Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3ty6Q64C3Pzytp; Mon, 9 Jan 2017 21:36:46 +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=1483994204; x=1484599005; bh=N48VijY7b+mVzqsdtHq1PUutaIK/lkUnYg+twXnR6Zs=; b=qem3igD9y487 f1YlJ9Rko0GBbZPF0TBZMeQ7R9yKqRnNtMWJfd0VF11eB2FfhIuBQwSXQX5TsrN6 32uvf99FQ6/0EMiV2TF8FQyLsK39wN0JGffofeYxVzYtnbC7cowrPNunSyXS5SkP g7gyLkptIAqYk6Op43h1gKZzg0b6XXgGtzOrHx3S1DlFFYTsn+X9WCOaprXcWz4D 5GlkiqsyHEs81TgUUNhbMk2ilqhMEO/w1Xdiz68Ry0xtLb77LpmJAgG8iqPVpQf+ Io5S70VWayp5Fhym4i27+O32K856BCokzSzDOPu2IUT8kC5p7F9k9/iSRXPf5nIY BWG2Vs8+CQ== 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 gLBcnMDRu-re; Mon, 9 Jan 2017 21:36:44 +0100 (CET) Received: from nzxt.fritz.box (x4d0cd619.dyn.telefonica.de [77.12.214.25]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Mon, 9 Jan 2017 21:36:44 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3] ARM: dts: sun7i: Add wifi dt node on Banana Pro Date: Mon, 9 Jan 2017 21:36:38 +0100 Message-Id: <20170109203638.29546-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-20170109_123717_455326_54FEAB0C X-CRM114-Status: GOOD ( 10.15 ) 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 v3 suggested by Maxime Ripard): - do not set the wakeup-source property for the mmc3 node as it is suspicious and propably does not work 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 | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts index f1a33560710f..c17e6407fee0 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 { @@ -170,10 +166,19 @@ &mmc3 { pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins_a>; - vmmc-supply = <®_vmmc3>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; 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 {