From patchwork Fri Jun 1 17:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10444189 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 4F70C602BD for ; Fri, 1 Jun 2018 17:36:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CAAF28D7B for ; Fri, 1 Jun 2018 17:36:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30E4A28D96; Fri, 1 Jun 2018 17:36:34 +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 8896828D95 for ; Fri, 1 Jun 2018 17:36:33 +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=s9T4/VEHx9a1rXMQj9VN4heuN9BJcIIbzqPYp3iiAbo=; b=BjAsmn/3bAHsrEezzN2ObhxIce lq6fcl8OO4VBJD/tWeq26oSnBJ6qIqeKBhge4Ju+A+WVHnsXaHhE3spyGQS/VO/fB0PDARZ0l08hP CIHf7y7/J95EFkkhdtEFS7aFrY/UCo0CQDI1MWbVgQ3phmXl9KiI0wEdYdEqxKCpnO+/XL56G+O9w sT2myWexhZoOnpp/nuw5OvXIpi4RR0D73+y8QNFmd7VCKTTUyCWysP2MpfuR71mwzRpRrBNthNaiz 5FP+e1SEGcVsp51iMFrUvKcdBTpOM2TJ6PoRimJ8VDqfYqGX7/5i1CnTgCJ6cTsyrvNMzqDbb8v93 NaDCBq1w==; 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 1fOnyS-0002tm-03; Fri, 01 Jun 2018 17:36:24 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOnxv-0002dM-77 for linux-arm-kernel@lists.infradead.org; Fri, 01 Jun 2018 17:35:53 +0000 Received: by mail-pl0-x241.google.com with SMTP id u6-v6so15712506pls.9 for ; Fri, 01 Jun 2018 10:35:44 -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:in-reply-to:references; bh=tfqWwG0cZVjS4mzUN1N3s2BL7kTBkBbDO4/phavLHBY=; b=BEDwVbbN1JWY/reicCetQ8U/EGOrkSX+oTVm+09WMcvfg0GFyDMQaQcVULQopgYQtu q3VcVS7J4oh2OrJgyIZb2K2MmuTOD9ta4WCjQ/9blMblfJCgvTgiJMjXIfQi7LRW9Bno OtPmm8AY5SJFvZX095YAYn+ygxkxQM0A+PUzA= 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=tfqWwG0cZVjS4mzUN1N3s2BL7kTBkBbDO4/phavLHBY=; b=Yvwd964V7QvADZtgKPmonFcxEsPgDSW+uMDzJ8tyOvOQvOk7yNYXFZYQRxwLAwvWbP ihPQxMohTAQPI+cZbCox5XXvcn8rOqZM1i0rBe0iCwRqDWEQRUggpRbZi3rDK63ha0Wn 9X9Qi0wk/pqbXsEoi8A87QEVI6Ae240ozUI3BuYmuIcht1CIU2JhhmVHL1buCAMo2Tna DPRTzw/E33lEH8IG4xnRTdy2HL5f36aXNYFHr78CHMVJ7Zt3ObxY0qrDv7et6kVZhCnv 8QpbnJTLH+fanfwJYwfYy2l7d1pIYW691uQ6ifUlONhyX1V9nTg36f5BstrLbuWSM8D2 8UQA== X-Gm-Message-State: ALKqPwcqUO7hsvpGBWOyCAhHE0+gXNOReZjcR16e+HViK+dZflvLiuSB 9BgePF5+j206SSTD8uan1aj0tg== X-Google-Smtp-Source: ADUXVKKoYNUGbuoSrBUYIWgHjEre9BiJ9G8kf2OIl2Y6o2d/Rgi35i9I7QenXIuB15MUCKU1TDtXrQ== X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr11992930pls.18.1527874543996; Fri, 01 Jun 2018 10:35:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id v16-v6sm118764143pfk.164.2018.06.01.10.35.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Jun 2018 10:35:43 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Michael Trimarchi , Icenowy Zheng Subject: [PATCH v3 2/2] arm64: allwinner: a64-amarula-relic: Enable AP6330 WiFi support Date: Fri, 1 Jun 2018 23:05:27 +0530 Message-Id: <20180601173527.18051-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180601173527.18051-1-jagan@amarulasolutions.com> References: <20180601173527.18051-1-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_103551_753927_85DBFB51 X-CRM114-Status: GOOD ( 14.86 ) 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 v3: - move dtsi change in separate patch 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 ++++++++++++++++++++++ 1 file changed, 31 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>;