From patchwork Mon Nov 21 16:24:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9439761 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 22BF9606DB for ; Mon, 21 Nov 2016 16:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E93262884B for ; Mon, 21 Nov 2016 16:29:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDC1A2888A; Mon, 21 Nov 2016 16:29:00 +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 AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 95C302884B for ; Mon, 21 Nov 2016 16:29:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8rRK-0008Lt-1R; Mon, 21 Nov 2016 16:27:30 +0000 Received: from forward14j.cmail.yandex.net ([2a02:6b8:0:1630::b4]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8rRE-000874-NT for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2016 16:27:26 +0000 Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::116]) by forward14j.cmail.yandex.net (Yandex) with ESMTP id 279CA216AE; Mon, 21 Nov 2016 19:27:00 +0300 (MSK) Received: from smtp2h.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 3EA9E781591; Mon, 21 Nov 2016 19:26:48 +0300 (MSK) Received: by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uDuymYLEmQ-QfHGuoD7; Mon, 21 Nov 2016 19:26:46 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aosc.xyz; s=mail; t=1479745607; bh=0JkS2HHV+KW78N0aym5a39TX73fTixXYefKNT2gdMV8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=V+4UFoKnq+W5wwWmZXGdp8XKMQzejRwXdml8S5K1cSfC5X7DPwpP7mTA6/Loz+zfg ns7bGYQRvNGUj/k1trJD+FKI6+pfgztSwiwQV3UovHqZY9vrzJsqX2ob++zKtg99JC 5VzCcU/sGjG9IvkJ68nluOYa+yES6NKj4vIhrGhg= Authentication-Results: smtp2h.mail.yandex.net; dkim=pass header.i=@aosc.xyz X-Yandex-ForeignMX: FR X-Yandex-Suid-Status: 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 0, 1 1130000036118848 From: Icenowy Zheng To: Jonathan Corbet , Maxime Ripard , Chen-Yu Tsai , Mark Rutland , Russell King , Hans de Goede Subject: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero Date: Tue, 22 Nov 2016 00:24:21 +0800 Message-Id: <20161121162421.800-3-icenowy@aosc.xyz> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161121162421.800-1-icenowy@aosc.xyz> References: <20161121162421.800-1-icenowy@aosc.xyz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161121_082725_258321_5D84C396 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Vishnu Patekar , Arnd Bergmann , linux-doc@vger.kernel.org, Andre Przywara , linux-kernel@vger.kernel.org, Icenowy Zheng , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of Orange Pi Zero, which used a dedicated regulator to power. Add the device tree node of the regulator, the enable gpio (with mmc-pwrseq) and the sdio controller. There's a out-of-tree driver tested to work with this device tree. Signed-off-by: Icenowy Zheng --- New patch in the patchset, since a out-of-tree working xradio driver is done. If there is any problem in this patch, it can be omitted. arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts index b428e47..39cac26 100644 --- a/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2plus-orangepi-zero.dts @@ -79,6 +79,24 @@ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; }; }; + + reg_vcc_wifi: reg_vcc_wifi { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&vcc_wifi_pin_opi0>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; + enable-active-high; + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; + }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwrseq_pin_opi0>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; + }; }; &ehci1 { @@ -95,6 +113,20 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc_wifi>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&mmc1_pins_a { + allwinner,pull = ; +}; + &ohci1 { status = "okay"; }; @@ -104,6 +136,11 @@ pins = "PA17"; function = "gpio_out"; }; + + vcc_wifi_pin_opi0: vcc_wifi_pin@0 { + allwinner,pins = "PA20"; + allwinner,function = "gpio_out"; + }; }; &r_pio { @@ -111,6 +148,11 @@ pins = "PL10"; function = "gpio_out"; }; + + wifi_pwrseq_pin_opi0: wifi_pwrseq_pin@0 { + allwinner,pins = "PL7"; + allwinner,function = "gpio_out"; + }; }; &uart0 {