From patchwork Thu May 31 16:51:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10441375 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 BE213603B5 for ; Thu, 31 May 2018 16:52:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B214728F80 for ; Thu, 31 May 2018 16:52:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A555828F8E; Thu, 31 May 2018 16:52:40 +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=unavailable 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 ABA1A28F80 for ; Thu, 31 May 2018 16:52:39 +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=fFo84/qGDHkRtuMCOtLVWjJAEvGXccHyZ4m0R5VRZnU=; b=bpF 75XMlnElyz/JXKrCuB/Z0vSJCS0EFC5upH0f4y2gpskbXrSOWfNFOSyP9uoHq3EVjYEWXOf31Sq5v WnJ+Quya1yGI22iCcUwWQBchxhBPJZ9ki5PkzvVmoBMulsFPrWRkv/TAliwJE87w1ScZWjLV9z6Bu 4ASGC+uWDTyOOCzxzc7Odupgj4NLdALnOU6nO+S+nNRSpAs9sJ3w1bIatOKm3O8AbrELASAT423+E iZY1VYf1p+kCaBOaoNicDaz7kqPPcsn5FixbEPqzfh+J7bSVZj9fQjXp+/4fC5UVpl2o1w+udEHnS 7XubqvSsHKOu0a+zvQ83Oy2N1sfdqPA==; 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 1fOQoW-0006NI-Tt; Thu, 31 May 2018 16:52:36 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOQoV-0006MU-12 for linux-arm-kernel@bombadil.infradead.org; Thu, 31 May 2018 16:52:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0iDL1vgRbh4cO5JDqJukGLErjxTBHds/OVSSg/WMq1k=; b=j4VAGteOUy7CCGikcLl8BYT0N xKAKJBlSV1Ujf6YqPZfAMaqtRkMXivz3kXtlJwbPviTlQo+nVr3tx0S5D0rGZ3ScSkXigqW1LbGwD DJ6YClyBALjyd7GWIII/XTP7Ol/VsN5nBKRn73SXpQd6uYOpc6x66rg+bS5JrB4NA3zsRkaPy0x0S 2ZYehwK5YmQ2AxI1FwvCBF/YRmmKSWvWljPeMSyFU7rRC0+QG4LtB9bqNZ09FgoQ+sIQIE3stmcim WGaOeCo7lCGAGXLPzaC7MSjbG1lC+nDE3f7w0BvUEhgb8paJ7P2wjieIuEJJDk2P2+hEfxyZlXYJ/ 7cqhhfwdQ==; Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOQnU-0001aR-U6 for linux-arm-kernel@lists.infradead.org; Thu, 31 May 2018 16:51:34 +0000 Received: by mail-pg0-x241.google.com with SMTP id l2-v6so9964241pgc.7 for ; Thu, 31 May 2018 09:51:21 -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=0iDL1vgRbh4cO5JDqJukGLErjxTBHds/OVSSg/WMq1k=; b=UXJgD/vXSgyfFuuoW4WmM6hHR2tg+VXFOiPf/jgtlNSFitrqRbklT6hy/EwnvkgOem 1eWvrk65HjgoAq+xbBuzH5fnEkVsJhh7Dm69lWfIY+zfjW01AYbhRVydNLZtE2KgAzRN HsIANBX6PpXIp7zvvB9vvbrNmMg7jXA1lTSpQ= 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=0iDL1vgRbh4cO5JDqJukGLErjxTBHds/OVSSg/WMq1k=; b=KGUONvrZMVYIbxfiPfgSoW6hQz0cA7vuwSOl4uj7t0EPNMdIuBzZGpOGzfLzDtPgST W6kaifE86X5C3T1+wx44eS86vvfnI74s6gBW63DS45UMZBCNwpt7xIF3j/hz3VpLL+nC 6Pom3/Hqig2h57QxFnSV6FIcYkCel+ZHkT5p+NKBNUSrp63nl2fb4DOzDvDCRPWEAIyH 9ZYI+1ca5Wc40bMvb/1Svn3RAf7AGdIdPRUNEQQRSwLtqbSXe6NUyQgVAdzc2qkb40Z5 HSdJjZAqG0hy9pEqOwUCWBqa/cco31VfgJFPp7K3sw+0H1V8AUwMPQNw4sA6mierWn// ppRQ== X-Gm-Message-State: ALKqPwetgqqIxeo8iECK65ws93AaG10b11TpxuvOcovuMKp+Ct4FjcMt HjTSl6XBmIzoUXBQ/gQRQ9Q1Jw== X-Google-Smtp-Source: ADUXVKJUUED91HHLKaBoqEod3MIXOSuH39JgNpLtgy0f0YDYAiWsQUP+gxsZICnOPieFXJsfCH75vA== X-Received: by 2002:a65:5244:: with SMTP id q4-v6mr6082000pgp.201.1527785479565; Thu, 31 May 2018 09:51:19 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id r8-v6sm68590998pfk.179.2018.05.31.09.51.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 09:51:18 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Trimarchi , Icenowy Zheng Subject: [PATCH v2] arm64: allwinner: a64-amarula-relic: Enable AP6330 WiFi support Date: Thu, 31 May 2018 22:21:09 +0530 Message-Id: <20180531165109.8476-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-20180531_175132_958495_160FF49B X-CRM114-Status: GOOD ( 13.41 ) 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 --- Changes for v2: - Move external rtc clock nodes into main rtc node definition of sun50i-a64.dtsi .../dts/allwinner/sun50i-a64-amarula-relic.dts | 31 ++++++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 2 files changed, 34 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..eac4793c8502 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>; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..82516aec4153 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -634,6 +634,9 @@ reg = <0x01f00000 0x54>; interrupts = , ; + clock-output-names = "rtc-osc32k", "rtc-osc32k-out"; + clocks = <&osc32k>; + #clock-cells = <1>; }; r_intc: interrupt-controller@1f00c00 {