From patchwork Wed Aug 30 03:01:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 9928701 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 1D618602B9 for ; Wed, 30 Aug 2017 03:04:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 126CF205D1 for ; Wed, 30 Aug 2017 03:04:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 075E6228C9; Wed, 30 Aug 2017 03:04:27 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E8FA205D1 for ; Wed, 30 Aug 2017 03:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rtS6mSSLgSuPfHZKWQLTxf5T0+KNHDNdgCjTSTmoQJg=; b=X1Prd8P3gHhDuIe83J3xcD7pN0 XA923dbfkNH2qKVrjqVGQ4/nEhtTq6zMEv0WOoVCoK7b7cNErssgpXNDutRtBqrc8XJd56fujWpJ9 EOuq7HQv1f82QZJb1zNkTdEBqs/HiYrmmazwEJlAIKyIP37LYbGhY9JsSIK2Fsy/ZGFC9qycifNCA 9zVH4BF4eQCYR3i1YOBO58D8JcHeHx38VdQepNfUmyiSP5KoKBk4HYirKp+bcVXBskFutpIgTpHPj SGXk1zIhjCjMQasFgRJoeVtBYx7L/edbW2arXyUHkNurMWrb3ZMZ3SPiDATyFK0fBoqgLigzd34S4 eLQiM2Nw==; 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 1dmtIi-0007Wc-Ba; Wed, 30 Aug 2017 03:04:20 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dmtGB-0005Fb-41 for linux-arm-kernel@lists.infradead.org; Wed, 30 Aug 2017 03:01:46 +0000 Received: by mail-wm0-x243.google.com with SMTP id e67so394506wmd.0 for ; Tue, 29 Aug 2017 20:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MNfeOL1TUNqnxkO35AX1e0QgNVjRRWZRkfzK2fhl6rw=; b=BesaA7N4pa/Z4Zp3TQg8rAju2SHIbzRm4wTfvFn9yR2dBUMRv0OW4rWYx0q18Bck1F OE4aHFnn9JcDeSIUcHm+1C8ccKvB4HGw31+ijFH0+G7UvcqCarYGvQ8jEeYbkKBYEOEt xoCMAdFtPCQMlH/kObQRCjcvMN8DEzSkYmJImcpm5X5XHJqjNZU1cza+rrxexOdUoiT2 YON6fYpixyBu/9sdJrXp1aQNBSAKQNbsOTpyxS7NqTX23efN7SkfKfqkqzOZ9YBUa6Sm zvqwc8PWmuzEB0e2X67rkW3m8xIeVWMgCGNzVfxRlriFKVxVCHkBnjykheZSM8evEq1R jNyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MNfeOL1TUNqnxkO35AX1e0QgNVjRRWZRkfzK2fhl6rw=; b=pNyL2Gcu/RSZhLVNnFPnUmYezcdFSdbmZ2lxAekYrXNsWdM73IE/+MzqRYrX5l9RaL Z1abHlfOLxrEMmhSV6iZdpmeoa7HCp+LjdZA3A2Shlqku1cewaNpNXuU9EDf81SVQ5O8 Vijyq/tgHvrPd6JObNZcplD5PEgxLNyPh/cbG+7Yw0qMAfH4arvtPwJG4I1USuycDLbi W/yrVz+OoJgQuYU56jPL8cHOTAN2+np2tPa/ot1c8p4GnXJPzg4E88UfRak1+5suId4E tlNhLoLgyk8fHuHzuCTwhTvW25wdAnvrgxXSSY+8blYDK+flUPWx5d9J6o1f0odbrMqE ywcQ== X-Gm-Message-State: AHYfb5holJZQNm3RVp/fPQzyUmxN08RgGTmSRqaYDeMmr+RBpWbV1yMz zwaiE8G8xBNmaw== X-Received: by 10.28.220.195 with SMTP id t186mr338918wmg.112.1504062081352; Tue, 29 Aug 2017 20:01:21 -0700 (PDT) Received: from philipp-K52Jr.fritz.box (p5B3DD0C2.dip0.t-ipconnect.de. [91.61.208.194]) by smtp.gmail.com with ESMTPSA id y25sm4186306wrd.50.2017.08.29.20.01.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Aug 2017 20:01:20 -0700 (PDT) From: Philipp Rossak X-Google-Original-From: Philipp Rossak < embed3d@gmail.com > To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org Subject: [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus Date: Wed, 30 Aug 2017 05:01:07 +0200 Message-Id: <1504062070-13523-5-git-send-email-embed3d@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504062070-13523-1-git-send-email-embed3d@gmail.com> References: <1504062070-13523-1-git-send-email-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170829_200143_536611_E152C56E X-CRM114-Status: GOOD ( 10.06 ) 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: devicetree@vger.kernel.org, Philipp Rossak , linux-kernel@vger.kernel.org, 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 From: Philipp Rossak The WiFi side of the AP6212 WiFi/BT combo module is connected to mmc1. There are also GPIOs for enable and interrupts. Enable WiFi on this board by enabling mmc1 and adding the power sequencing clocks and GPIO, as well as the chip's interrupt line. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts index b9c6c27..3054308 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts @@ -48,6 +48,7 @@ aliases { ethernet0 = &emac; + ethernet1 = &ap6212; }; reg_gmac_3v3: gmac-3v3 { @@ -59,6 +60,14 @@ enable-active-high; gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en_npi_m1p>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ + }; + }; &ehci1 { @@ -93,6 +102,25 @@ }; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + ap6212: sdio_wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ + interrupt-names = "host-wake"; + }; +}; + &ohci1 { status = "okay"; }; @@ -100,3 +128,10 @@ &ohci2 { status = "okay"; }; + +&r_pio { + wifi_en_npi_m1p: wifi_en_pin { + pins = "PL7"; + function = "gpio_out"; + }; +};