Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp816965imm; Thu, 31 May 2018 09:53:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJeQ56m+ARxIJEcMt+vmTX3ttNe22DmhkovDyIozpK3sPh3t9yejKvHGGC/hx29n79onQJW X-Received: by 2002:a62:d6d2:: with SMTP id a79-v6mr7588160pfl.87.1527785591816; Thu, 31 May 2018 09:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527785591; cv=none; d=google.com; s=arc-20160816; b=uLgZvdR9n8KzOxdep5sXRr2Azfa9P7h3ndhmjDUDtnUvP9qCjToGiLGewaI4M6nv6u jkZ+biSS4dxgZDUK51WXeSQJ85BKkM4yRqQ2qECjHED5ZFWZ1JIi7EkPqWGCXpvyyJq5 WuI0+SPwA36mr/4N+az5cR1D+PIxbfT9rF2D/5pzugUqX7MsloZFeUw+unL4vNdLJp74 NEEGbZIw6LoRWP/T0UH9x8EznoQ/MMXjRwABgTvm8/P5nK+i+8MafyQjz5jPVTRFIVa5 BiFypWSrzni+esC8bF6kiodUn2QFbsppkdP9tl8c4z93/+h/tnWsTOlcIjJ0tQcjC325 miYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=0iDL1vgRbh4cO5JDqJukGLErjxTBHds/OVSSg/WMq1k=; b=09N2j4Y88E3ZMBYkcGGWw1j3WRQI6/q9W9D9OSqn0b/SJZ8Y8YrS4+b0k+miAA6gYS ilsP/Fo4PI9Mqa/h93rDBMtHVjyUBFx3d+oPoQKLhxBW+rn5FoFK94+wmKZ9YKh6KZas KGxUMhsJxTgleOlNJiXke+PQ/fggpT39rBVLt9i9F4ohp1cBrBB4LiH0suG4LjbZCNFE OB3pYf67IdZKHwDsKUWp+IKgOSHUCoZf7i16ARIzzoAo/oQnXbGK/HUkSufk0d0mIv9+ jXcZHPm9A7dG7tb4WvRIU7+Qnk/Y9M4BRpSUf3d9tD4kGe+x+tQ+r1cVItsK+wyjMgyl c6Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UXJgD/vX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12-v6si15691109plk.535.2018.05.31.09.52.57; Thu, 31 May 2018 09:53:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UXJgD/vX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932770AbeEaQvW (ORCPT + 99 others); Thu, 31 May 2018 12:51:22 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:39709 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932753AbeEaQvU (ORCPT ); Thu, 31 May 2018 12:51:20 -0400 Received: by mail-pg0-f66.google.com with SMTP id w12-v6so8761022pgc.6 for ; Thu, 31 May 2018 09:51:20 -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=iV9CC1uDS6HB1/wrjeTx0jTJxqMLu/1BukWjyN8DQEREIYG4iBQRX46JcnhIkgQ+ZL vysd1dIkdWTSpB28+HgowSTesZchZc0HNJcti6zQC6nL0lDS+UCCeyuTADrk2H75tBnP 4KkRRoiRKq1hbMB2MjwdLO21tqUd8uBfPs/hTMQHK3Zm2RwH4KPWeJ9yb0qASA0/l5fD ouuqVsZ36vx39PcdxDqQR2ufF94vL5IGzVOBGfSg2GaYihTAIRDstbwjOLaLP2Y4RUuZ 2Ie2snBNGQWn+JDzsyXqtrTr1Q7+QEndJcXZ1gx6gqkjupaQzIpoTce5nPTV9EKIfeuk vRfQ== X-Gm-Message-State: ALKqPwffALBO4/hNG5U3LwIY5IXhvUQeW1HPpU7wID/vWFdctbyLYiio qmV4+2oYtOxJAgY9wIQrHlYXxA== 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 Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Jagan Teki 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 { -- 2.14.3