From patchwork Tue May 29 17:22:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10436497 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 61694602BF for ; Tue, 29 May 2018 17:23:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506FB2267B for ; Tue, 29 May 2018 17:23:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 450D728826; Tue, 29 May 2018 17:23:44 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 698702267B for ; Tue, 29 May 2018 17:23:43 +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: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:In-Reply-To: References:List-Owner; bh=slv9sh4ry8t1CYAnHNR5ch2DJvgWLCTU2hZvpGItdiY=; b=HsJ AHZZsOrMFyZ+UezdxKTM8rhtSTdpOdJ8gC+gmUS5N25F6cZJEmZMv+4dMZL01gaQ75JZ94HfE/oV3 rb+ANND7usiBbbzmiMThJ9sRywKGXqqI4UUdJoE5XH6oeR5Lnd1e8IgXUQWq69owPAaoa9xIdKq05 akMWBCgBGftN5eQuEBjyw7WY+65ZGkQopjPP0lPGSFc0XOmgXKMaCIFYLvzkG+AUQz//rOF9Wj7P8 7FqMG3HcoWYxeFvuze7iJ6VXmf0w78oK80xxHA/4RLDzuDQUDHQVVkWT71NAb0cL+oFxnfbpbyuGx 9iUCKuUR/1G1ltc6DV4F01DFy8HMuTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNiLK-0008Hh-D3; Tue, 29 May 2018 17:23:30 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNiKu-0008Ef-27 for linux-arm-kernel@lists.infradead.org; Tue, 29 May 2018 17:23:15 +0000 Received: by mail-pf0-x241.google.com with SMTP id a20-v6so7611878pfo.0 for ; Tue, 29 May 2018 10:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=w5XZleaYcT5RyK5Yv3z90zzU/ePePTGoVF06jEd1aFs=; b=IyFhPUqUDDIJHu8S6km/DQvtkqkYPOWwiArP92fPl21GGYGtIeaRlTVr/l0i9CFoqn k4cnsLX6oMxAb3a6Hjw6QVBkap2gZHuvzPmlRCqfiZp/ldILpHHksOrEpmJqFAmTIumu SL7vcTkK60kSiznH+awVeSk1GGYXAMiqsfJ/Y= 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; bh=w5XZleaYcT5RyK5Yv3z90zzU/ePePTGoVF06jEd1aFs=; b=ZGOJZsdaLOLFHTzi2RRbVvz9n3aGlIsvE7i49qMW0OpZKVVdJS6uqkq1u0KjY0wQR6 DvD9BsJvEujEUApf4gEgID0Dzf9gJoX79+EAZrqw/OPCEp9sFdZow0WSZiKEvZuSogTn nu2/MS0U/o4a2b0QxBqZyvoBEZswmmpydTAnzp5R5Mne+rlENLqDb/b7ckhBopqk7jdZ jndehr99IB0l6uonjv7bGJUMlrk9JRJazqUwc+9rSiwGtpb+wKBTQd/5ZiNdItyHbPzA 5nVpLvQJccKrm+lXng3c/DAJWieBzzAjU0+j8YifBxskRXjHsymruWvJ//HuFlwtJ5wN EAGQ== X-Gm-Message-State: ALKqPwdwFja9mnyIYNkY7xY+nglQ1CxxGLMLUeMIBO2OIvIG5l1cllUD 13ZzQJSY95XexEIqMW+JoMw36A== X-Google-Smtp-Source: ADUXVKIhLcx3qlrQirdcc1/CfF6TvEqBwU+VSOQWyofU7Q9SpeBzPprbfVfIJUiSukt+QHx8HWqzJg== X-Received: by 2002:a63:7c55:: with SMTP id l21-v6mr5064932pgn.352.1527614573311; Tue, 29 May 2018 10:22:53 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id r68-v6sm71210828pfi.174.2018.05.29.10.22.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 10:22:52 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Trimarchi , Icenowy Zheng Subject: [PATCH] arm64: allwinner: a64-amarula-relic: Enable AP6330 WiFi support Date: Tue, 29 May 2018 22:52:38 +0530 Message-Id: <20180529172238.9718-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180529_102304_588490_F9C2141E X-CRM114-Status: GOOD ( 13.91 ) 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, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jagan Teki 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 Enable AP6330 WiFi/BT combo chip on Amarula A64-Relic board: - WiFi SDIO interface is connected to MMC1 - WiFi WL-PMU-EN pin connected to gpio PL2: attach to mmc-pwrseq - WiFi WL-WAKE-AP pin connected to gpio PL3 - 32kHz external oscillator gate clock from RTC Signed-off-by: Jagan Teki --- .../dts/allwinner/sun50i-a64-amarula-relic.dts | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts index ce4a256ff086..a77b70ca88e3 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts @@ -21,12 +21,43 @@ chosen { stdout-path = "serial0:115200n8"; }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc 1>; + clock-names = "ext_clock"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */ + }; }; &ehci0 { status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_dcdc1>; + /* + * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but + * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with + * 0Ohm register to vcc-io-wifi so eldo1 is used. + */ + vqmmc-supply = <®_eldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PL3 */ + interrupt-names = "host-wake"; + }; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; @@ -170,6 +201,12 @@ regulator-name = "vcc-rtc"; }; +&rtc { + clock-output-names = "rtc-osc32k", "rtc-osc32k-out"; + clocks = <&osc32k>; + #clock-cells = <1>; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>;