devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Icenowy Zheng <icenowy@aosc.io>
To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	Icenowy Zheng <icenowy@aosc.io>
Subject: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
Date: Tue, 24 Jul 2018 09:15:51 +0800	[thread overview]
Message-ID: <20180724011551.49603-4-icenowy@aosc.io> (raw)
In-Reply-To: <20180724011551.49603-1-icenowy@aosc.io>

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.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 .../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 = <&reg_cldo2>;
+	vqmmc-supply = <&reg_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

  parent reply	other threads:[~2018-07-24  1:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  1:15 [PATCH 0/3] Add support for Pine H64 model B w/ Wi-Fi support Icenowy Zheng
2018-07-24  1:15 ` [PATCH 1/3] arm64: allwinner: dts: h6: add Pine H64 model B Icenowy Zheng
     [not found] ` <20180724011551.49603-1-icenowy-h8G6r0blFSE@public.gmane.org>
2018-07-24  1:15   ` [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1 Icenowy Zheng
     [not found]     ` <20180724011551.49603-3-icenowy-h8G6r0blFSE@public.gmane.org>
2018-07-24  8:56       ` Maxime Ripard
2018-07-24  8:57         ` Icenowy Zheng
2018-07-24  1:15 ` Icenowy Zheng [this message]
     [not found]   ` <20180724011551.49603-4-icenowy-h8G6r0blFSE@public.gmane.org>
2018-07-24  2:21     ` [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B Chen-Yu Tsai
     [not found]       ` <CAGb2v67zR-Q9n7L6CaFKDUJFHFEC_h8-RYxkdyeyJb_GbNmkJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-24  2:23         ` Icenowy Zheng
     [not found]           ` <CEA43CB7-1DA6-4983-BF18-82C4A48FB92B-h8G6r0blFSE@public.gmane.org>
2018-07-24  2:26             ` Chen-Yu Tsai
     [not found]               ` <CAGb2v64Qae4O430kP30DQNhp0Dt774OHt0nMe35ckp8X=CTFLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-24  2:28                 ` Icenowy Zheng
     [not found]                   ` <AC678B03-19B7-4110-B333-72188CE71296-h8G6r0blFSE@public.gmane.org>
2018-07-24  2:37                     ` Chen-Yu Tsai
     [not found]                       ` <CAGb2v656oPmAX=_y88b05xqrona3HFtU-VmNQhHxK_n-4gD+aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-24  2:39                         ` Icenowy Zheng
2018-07-24 14:41                         ` Maxime Ripard
2018-07-24 14:42                           ` Icenowy Zheng
     [not found]                             ` <198DB486-4789-4777-9596-2BD6FAFFB741-h8G6r0blFSE@public.gmane.org>
2018-07-25 12:19                               ` Maxime Ripard
2018-07-25 12:20                                 ` Icenowy Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180724011551.49603-4-icenowy@aosc.io \
    --to=icenowy@aosc.io \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).