From patchwork Wed Jan 4 14:22:49 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: 9498029 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 4C6E6606A9 for ; Wed, 4 Jan 2017 22:51:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 363DC267EC for ; Wed, 4 Jan 2017 22:51:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B2E4281D2; Wed, 4 Jan 2017 22:51:57 +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 24ECD267EC for ; Wed, 4 Jan 2017 22:51:56 +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 1cOuPT-00080m-8W; Wed, 04 Jan 2017 22:51:55 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cOtkw-0003Q7-8O for linux-arm-kernel@bombadil.infradead.org; Wed, 04 Jan 2017 22:10:02 +0000 Received: from mout02.posteo.de ([185.67.36.142]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOmTV-0006zD-UK for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2017 14:23:34 +0000 Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3tttM341LLz105r; Wed, 4 Jan 2017 15:22:54 +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=1483539773; x=1484144574; bh=P3ADxop+5w7RDcNyM+xmGikuhcrZDRYeXLVcYFPn1iA=; b=tiF+3qsqIVJU i1dOfhL6p2JFWSwpgcrC0mkWE1GG+oxP1xzHXFh2yXdMDycDi02Zw2VxrXxP7NCS p3ptLu6c+cXH6AdSy6PAx70UbofnpN31M1X/JWnXTmemewHszXnidIL/dZOaYcOl 3wKTy6Y9RaM0erOb64Qh7bNe7elHDvH6jIj4I5e1UNolmlLGaT7qKhbEWYAXaSrG jHPdxFlwZYbGF8TAvzKveAu0bHy1CoWWW+qveDI6j6CoUp+QP6ljfdKwWSXIneRG Z2k6ahB8yT0EZNezrNrBzvZToxqN7MZTiHKVFgPxQ0zME9e3CMOsosUdNymtWLUU glRnYsvxJw== 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 1WhDOrDyYv8E; Wed, 4 Jan 2017 15:22:53 +0100 (CET) Received: from nzxt.fritz.box (xd933f107.dyn.telefonica.de [217.51.241.7]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Wed, 4 Jan 2017 15:22:53 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: dts: sun7i: Add wifi dt node on Banana Pro Date: Wed, 4 Jan 2017 15:22:49 +0100 Message-Id: <20170104142250.22171-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-20170104_092334_208614_5C20EEB4 X-CRM114-Status: UNSURE ( 8.78 ) 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 --- arch/arm/boot/dts/sun7i-a20-bananapro.dts | 35 ++++++++++++++++++++----------- 1 file changed, 23 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..439ad50dcd4a 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts @@ -76,6 +76,13 @@ }; }; + mmc3_pwrseq: mmc3_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,25 @@ &mmc3 { pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins_a>; - vmmc-supply = <®_vmmc3>; + vmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&mmc3_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"; + }; +}; + +&mmc3_pins_a { + /* AP6181 requires pull-up */ + allwinner,pull = ; }; &ohci0 {