Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6467947imm; Mon, 23 Jul 2018 19:25:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdFRxXsibBg+SFGhewtK/RxmM77KnfcwcvxUF759kv6fbA2p1JqLARhKVmRSnf3LFZWW4Fq X-Received: by 2002:a17:902:904c:: with SMTP id w12-v6mr168582plz.95.1532399149601; Mon, 23 Jul 2018 19:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532399149; cv=none; d=google.com; s=arc-20160816; b=C7lQKorPFnwcVnEuAwAA4VwYQc+earI53QMXdkHkAfh791eW2owZyMhR8QV1LsbqHN TdnqMNN9F734ntAcnsWO9W/nl0g0Jahrau/fasspE5AvEliIUKH5mKLGy7qn4myOEYUi y/bmhNLQ8aCOpEOd9skD0Zpx3J/7zsl5JqC6xxptod1Wt6PnJMp+C8w5lwYZtUh4xaEa e2hUpJ0f1tTjjnVW7ivRSEq4wqezew33Gn0KRhRlTzLbBtDcjexxJqtwweXmNGpcp8ZC gzkSIvgDJ8vla7ZS8cCoxzht0ReZgYh3zYdeTqTT36JBeMrQ3Yqtr2ZazV5JKHs+4077 XvcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date :arc-authentication-results; bh=6hi0gkc0dq7mbuKwhSriqMDGUigI0+Cv5yQIyC7U4+U=; b=urqdxvRu72EIpPff0asj++CTivF5prZ9jEjT054y1aummdagki9iaDilek5H+WmigS XvWqOaRUQK6FxHLUJQpTapy2rbJuiXY0k7DiUMKcvEOg2NG8Ii43QF6Ok8TiEJNkZfnj L62L2WqOdQKJDsQtt2MKTPcrIClFMmJGzxf3MTOVshcplSN82X3UEJM0w8pmLbBNuiT3 r86Y9I2jtrXIf3xUgzZZtEHH9HmEa/qisRW7PeQDcX2rIjoz5RlKg9Dfmuu7dkdiL7SO e06LdwqsAYYQYKyWe96edefoz6O2lOPFs+9veeJbQT1LlW8i9sv9un1pWKHg6XlRVZRg Kq+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 102-v6si9424629pla.38.2018.07.23.19.25.35; Mon, 23 Jul 2018 19:25:49 -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; 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 S2388426AbeGXD1v convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Jul 2018 23:27:51 -0400 Received: from hermes.aosc.io ([199.195.250.187]:59916 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388194AbeGXD1v (ORCPT ); Mon, 23 Jul 2018 23:27:51 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id B080E9F5A0; Tue, 24 Jul 2018 02:23:38 +0000 (UTC) Date: Tue, 24 Jul 2018 10:23:19 +0800 In-Reply-To: References: <20180724011551.49603-1-icenowy@aosc.io> <20180724011551.49603-4-icenowy@aosc.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B To: Chen-Yu Tsai CC: Maxime Ripard , linux-arm-kernel , devicetree , linux-kernel , linux-sunxi From: Icenowy Zheng Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai 写到: >On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng wrote: >> The Pine H64 model A has a Wi-Fi module connector and the model B has >an >> on-board RTL8723BS Wi-Fi module. >> >> Add support for them. For model A, as it's not defaultly present, >keep >> it disabled now. > >Nope. Pine64 actually has two WiFi/BT modules. And they require >different >device tree snippets for both the WiFi and BT side. This is better >resolved >with device tree overlays. > >I have both, though I've yet found time to work on them. I have also both. The skeleton here can get the Wi-Fi of both to work. > >ChenYu > >> Signed-off-by: Icenowy Zheng >> --- >> .../allwinner/sun50i-h6-pine-h64-model-b.dts | 8 +++++ >> .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 29 >+++++++++++++++++++ >> 2 files changed, 37 insertions(+) >> >> diff --git >a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts >b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts >> index d0fcc25efb00..d0f775613c9b 100644 >> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts >> @@ -18,3 +18,11 @@ >> }; >> }; >> }; >> + >> +&mmc1 { >> + status = "okay"; >> +}; >> + >> +&wifi_pwrseq { >> + status = "okay"; >> +}; >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts >b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts >> index a85867f8b684..75db6d4139bf 100644 >> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts >> @@ -40,6 +40,12 @@ >> gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 >*/ >> }; >> }; >> + >> + wifi_pwrseq: wifi_pwrseq { >> + compatible = "mmc-pwrseq-simple"; >> + reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PL2 */ >> + status = "disabled"; >> + }; >> }; >> >> &mmc0 { >> @@ -50,6 +56,17 @@ >> status = "okay"; >> }; >> >> +&mmc1 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&mmc1_pins>; >> + vmmc-supply = <®_cldo2>; >> + vqmmc-supply = <®_bldo2>; >> + mmc-pwrseq = <&wifi_pwrseq>; >> + bus-width = <4>; >> + non-removable; >> + status = "disabled"; >> +}; >> + >> &mmc2 { >> pinctrl-names = "default"; >> pinctrl-0 = <&mmc2_pins>; >> @@ -128,12 +145,24 @@ >> }; >> >> reg_cldo2: cldo2 { >> + /* >> + * This regulator is connected with >CLDO3. >> + * Before the kernel can support >synchronized >> + * enable of coupled regulators, keep >them >> + * both always on as a ugly hack. >> + */ >> + regulator-always-on; >> regulator-min-microvolt = <3300000>; >> regulator-max-microvolt = <3300000>; >> regulator-name = "vcc-wifi-1"; >> }; >> >> reg_cldo3: cldo3 { >> + /* >> + * This regulator is connected with >CLDO2. >> + * See the comments for CLDO2. >> + */ >> + regulator-always-on; >> regulator-min-microvolt = <3300000>; >> regulator-max-microvolt = <3300000>; >> regulator-name = "vcc-wifi-2"; >> -- >> 2.18.0 >>