linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for Pine H64 model B w/ Wi-Fi support
@ 2018-07-24  1:15 Icenowy Zheng
  2018-07-24  1:15 ` [PATCH 1/3] arm64: allwinner: dts: h6: add Pine H64 model B Icenowy Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  1:15 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Icenowy Zheng

Pine H64 has made a new "model B", on which "Euler bus" and "EXP bus"
are dropped, one LED is stripped and the Wi-Fi become an on-board
RTL8723BS.

Add support for this board, with the Wi-Fi support.

Wi-Fi support is also introduced for model A, but disabled.

Icenowy Zheng (3):
  arm64: allwinner: dts: h6: add Pine H64 model B
  arm64: allwinner: dts: h6: add pinmux for MMC1
  arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B

 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-pine-h64-model-b.dts  | 28 +++++++++++++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 34 +++++++++++++++++--
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |  8 +++++
 4 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts

-- 
2.18.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] arm64: allwinner: dts: h6: add Pine H64 model B
  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 ` Icenowy Zheng
  2018-07-24  1:15 ` [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1 Icenowy Zheng
  2018-07-24  1:15 ` [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B Icenowy Zheng
  2 siblings, 0 replies; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  1:15 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Icenowy Zheng

Pine H64 model B is another variant of Pine H64 by Pine64. It features a
smaller board footprint (of RPi size) and drops PCIe. It also have WLAN
on board (rather than via expansion connector on the original model A)
and some LED changes.

Add an initial device tree for it. Only LED difference is considered
now, as functionalities related to other changes are still not available
now.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-pine-h64-model-b.dts  | 20 +++++++++++++++++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts |  5 +++--
 3 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 9ffa7a038791..330b5fb3715b 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -16,3 +16,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
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
new file mode 100644
index 000000000000..d0fcc25efb00
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+#include "sun50i-h6-pine-h64.dts"
+
+/ {
+	model = "Pine H64 Model B";
+	compatible = "pine64,pine-h64-model-b", "pine64,pine-h64",
+		     "allwinner,sun50i-h6";
+
+	leds {
+		/delete-node/ heartbeat;
+
+		status {
+			label = "pine-h64:red:status";
+		};
+	};
+};
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 ceffc40810ee..a85867f8b684 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -10,8 +10,9 @@
 #include <dt-bindings/gpio/gpio.h>
 
 / {
-	model = "Pine H64";
-	compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
+	model = "Pine H64 Model A";
+	compatible = "pine64,pine-h64-model-a", "pine64,pine-h64",
+		     "allwinner,sun50i-h6";
 
 	aliases {
 		serial0 = &uart0;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1
  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
@ 2018-07-24  1:15 ` Icenowy Zheng
  2018-07-24  8:56   ` Maxime Ripard
  2018-07-24  1:15 ` [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B Icenowy Zheng
  2 siblings, 1 reply; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  1:15 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Icenowy Zheng

The MMC1 controller on H6, in the reference design and most third party
design, is used to connect SDIO Wi-Fi.

Add pinmux for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index cfa5fffcf62b..ba1a3a3e2149 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -134,6 +134,14 @@
 				bias-pull-up;
 			};
 
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3",
+				       "PG4", "PG5";
+				function = "mmc1";
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
 			mmc2_pins: mmc2-pins {
 				pins = "PC1", "PC4", "PC5", "PC6",
 				       "PC7", "PC8", "PC9", "PC10",
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  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
  2018-07-24  1:15 ` [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1 Icenowy Zheng
@ 2018-07-24  1:15 ` Icenowy Zheng
  2018-07-24  2:21   ` Chen-Yu Tsai
  2 siblings, 1 reply; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  1:15 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi, Icenowy Zheng

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


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  1:15 ` [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B Icenowy Zheng
@ 2018-07-24  2:21   ` Chen-Yu Tsai
  2018-07-24  2:23     ` Icenowy Zheng
  0 siblings, 1 reply; 16+ messages in thread
From: Chen-Yu Tsai @ 2018-07-24  2:21 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io> 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.

ChenYu

> 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
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:21   ` Chen-Yu Tsai
@ 2018-07-24  2:23     ` Icenowy Zheng
  2018-07-24  2:26       ` [linux-sunxi] " Chen-Yu Tsai
  0 siblings, 1 reply; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  2:23 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io> 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 <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
>>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:23     ` Icenowy Zheng
@ 2018-07-24  2:26       ` Chen-Yu Tsai
  2018-07-24  2:28         ` Icenowy Zheng
  0 siblings, 1 reply; 16+ messages in thread
From: Chen-Yu Tsai @ 2018-07-24  2:26 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io> 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.

Cool. Then I can put away my RTL module for now. :)

ChenYu

>
>>
>>ChenYu
>>
>>> 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
>>>
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:26       ` [linux-sunxi] " Chen-Yu Tsai
@ 2018-07-24  2:28         ` Icenowy Zheng
  2018-07-24  2:37           ` Chen-Yu Tsai
  0 siblings, 1 reply; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  2:28 UTC (permalink / raw)
  To: wens, Chen-Yu Tsai
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
>wrote:
>>
>>
>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
>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.
>
>Cool. Then I can put away my RTL module for now. :)

P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
is only a bonus function and it can fall back to standard in-band
interrupt (which doesn't need special binding, and is currently
used by mainline r8723bs driver.)

>
>ChenYu
>
>>
>>>
>>>ChenYu
>>>
>>>> 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
>>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:28         ` Icenowy Zheng
@ 2018-07-24  2:37           ` Chen-Yu Tsai
  2018-07-24  2:39             ` Icenowy Zheng
  2018-07-24 14:41             ` Maxime Ripard
  0 siblings, 2 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2018-07-24  2:37 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
> 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
>>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
>>wrote:
>>>
>>>
>>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
>>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
>>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.
>>
>>Cool. Then I can put away my RTL module for now. :)
>
> P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
> is only a bonus function and it can fall back to standard in-band
> interrupt (which doesn't need special binding, and is currently
> used by mainline r8723bs driver.)

Correct. With BT you'll have serdev device nodes with different
compatibles. Then you'll have to resort to overlays, and you'd probably
end up adding WiFi OOB interrupt bits as well.

So the question remaining is: should we enable the MMC part, along
with power sequencing and regulator supplies, by default? Thinking
more about it, I'm actually OK with it. The board connectors are
clearly marked as being for a WiFi+BT module. The whole space on
the board is surrounded by a box in silkscreen. Sorry for the
initial nack.

Maxime, any thoughts?

>>
>>ChenYu
>>
>>>
>>>>
>>>>ChenYu
>>>>
>>>>> 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
>>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>Groups "linux-sunxi" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>send an email to linux-sunxi+unsubscribe@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:37           ` Chen-Yu Tsai
@ 2018-07-24  2:39             ` Icenowy Zheng
  2018-07-24 14:41             ` Maxime Ripard
  1 sibling, 0 replies; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  2:39 UTC (permalink / raw)
  To: wens, Chen-Yu Tsai
  Cc: Maxime Ripard, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月24日 GMT+08:00 上午10:37:51, Chen-Yu Tsai <wens@csie.org> 写到:
>On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io>
>wrote:
>>
>>
>> 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
>>>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
>>>wrote:
>>>>
>>>>
>>>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
>>>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
>>>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.
>>>
>>>Cool. Then I can put away my RTL module for now. :)
>>
>> P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
>> is only a bonus function and it can fall back to standard in-band
>> interrupt (which doesn't need special binding, and is currently
>> used by mainline r8723bs driver.)
>
>Correct. With BT you'll have serdev device nodes with different
>compatibles. Then you'll have to resort to overlays, and you'd probably
>end up adding WiFi OOB interrupt bits as well.
>
>So the question remaining is: should we enable the MMC part, along
>with power sequencing and regulator supplies, by default? Thinking
>more about it, I'm actually OK with it. The board connectors are
>clearly marked as being for a WiFi+BT module. The whole space on
>the board is surrounded by a box in silkscreen. Sorry for the
>initial nack.
>
>Maxime, any thoughts?

I remember he refused it for Pine A64.

>
>>>
>>>ChenYu
>>>
>>>>
>>>>>
>>>>>ChenYu
>>>>>
>>>>>> 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
>>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>Groups "linux-sunxi" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>send an email to linux-sunxi+unsubscribe@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google
>Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1
  2018-07-24  1:15 ` [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1 Icenowy Zheng
@ 2018-07-24  8:56   ` Maxime Ripard
  2018-07-24  8:57     ` Icenowy Zheng
  0 siblings, 1 reply; 16+ messages in thread
From: Maxime Ripard @ 2018-07-24  8:56 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

On Tue, Jul 24, 2018 at 09:15:50AM +0800, Icenowy Zheng wrote:
> The MMC1 controller on H6, in the reference design and most third party
> design, is used to connect SDIO Wi-Fi.
> 
> Add pinmux for it.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index cfa5fffcf62b..ba1a3a3e2149 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -134,6 +134,14 @@
>  				bias-pull-up;
>  			};
>  
> +			mmc1_pins: mmc1-pins {
> +				pins = "PG0", "PG1", "PG2", "PG3",
> +				       "PG4", "PG5";
> +				function = "mmc1";
> +				drive-strength = <30>;
> +				bias-pull-up;
> +			};
> +

Is that the sole muxing option for MMC1? If so, it should be added to
the mmc1 node.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1
  2018-07-24  8:56   ` Maxime Ripard
@ 2018-07-24  8:57     ` Icenowy Zheng
  0 siblings, 0 replies; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24  8:57 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月24日 GMT+08:00 下午4:56:39, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>On Tue, Jul 24, 2018 at 09:15:50AM +0800, Icenowy Zheng wrote:
>> The MMC1 controller on H6, in the reference design and most third
>party
>> design, is used to connect SDIO Wi-Fi.
>> 
>> Add pinmux for it.
>> 
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> index cfa5fffcf62b..ba1a3a3e2149 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> @@ -134,6 +134,14 @@
>>  				bias-pull-up;
>>  			};
>>  
>> +			mmc1_pins: mmc1-pins {
>> +				pins = "PG0", "PG1", "PG2", "PG3",
>> +				       "PG4", "PG5";
>> +				function = "mmc1";
>> +				drive-strength = <30>;
>> +				bias-pull-up;
>> +			};
>> +
>
>Is that the sole muxing option for MMC1? If so, it should be added to
>the mmc1 node.

Oh... yes, it is.

Will do in v2.

>
>Maxime

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24  2:37           ` Chen-Yu Tsai
  2018-07-24  2:39             ` Icenowy Zheng
@ 2018-07-24 14:41             ` Maxime Ripard
  2018-07-24 14:42               ` Icenowy Zheng
  1 sibling, 1 reply; 16+ messages in thread
From: Maxime Ripard @ 2018-07-24 14:41 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Icenowy Zheng, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

On Tue, Jul 24, 2018 at 10:37:51AM +0800, Chen-Yu Tsai wrote:
> On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
> >
> >
> > 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
> >>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
> >>wrote:
> >>>
> >>>
> >>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org> 写到:
> >>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
> >>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.
> >>
> >>Cool. Then I can put away my RTL module for now. :)
> >
> > P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
> > is only a bonus function and it can fall back to standard in-band
> > interrupt (which doesn't need special binding, and is currently
> > used by mainline r8723bs driver.)
> 
> Correct. With BT you'll have serdev device nodes with different
> compatibles. Then you'll have to resort to overlays, and you'd probably
> end up adding WiFi OOB interrupt bits as well.
> 
> So the question remaining is: should we enable the MMC part, along
> with power sequencing and regulator supplies, by default? Thinking
> more about it, I'm actually OK with it. The board connectors are
> clearly marked as being for a WiFi+BT module. The whole space on
> the board is surrounded by a box in silkscreen. Sorry for the
> initial nack.
> 
> Maxime, any thoughts?

If there's a need for an overlay anyway, there's no real reason to
enable it by default, especially if not everything is there.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24 14:41             ` Maxime Ripard
@ 2018-07-24 14:42               ` Icenowy Zheng
  2018-07-25 12:19                 ` Maxime Ripard
  0 siblings, 1 reply; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-24 14:42 UTC (permalink / raw)
  To: maxime.ripard, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月24日 GMT+08:00 下午10:41:51, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>On Tue, Jul 24, 2018 at 10:37:51AM +0800, Chen-Yu Tsai wrote:
>> On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io>
>wrote:
>> >
>> >
>> > 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
>> >>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
>> >>wrote:
>> >>>
>> >>>
>> >>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org>
>写到:
>> >>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
>> >>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.
>> >>
>> >>Cool. Then I can put away my RTL module for now. :)
>> >
>> > P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
>> > is only a bonus function and it can fall back to standard in-band
>> > interrupt (which doesn't need special binding, and is currently
>> > used by mainline r8723bs driver.)
>> 
>> Correct. With BT you'll have serdev device nodes with different
>> compatibles. Then you'll have to resort to overlays, and you'd
>probably
>> end up adding WiFi OOB interrupt bits as well.
>> 
>> So the question remaining is: should we enable the MMC part, along
>> with power sequencing and regulator supplies, by default? Thinking
>> more about it, I'm actually OK with it. The board connectors are
>> clearly marked as being for a WiFi+BT module. The whole space on
>> the board is surrounded by a box in silkscreen. Sorry for the
>> initial nack.
>> 
>> Maxime, any thoughts?
>
>If there's a need for an overlay anyway, there's no real reason to
>enable it by default, especially if not everything is there.

Everything is there, for model B support.

>
>Maxime

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-24 14:42               ` Icenowy Zheng
@ 2018-07-25 12:19                 ` Maxime Ripard
  2018-07-25 12:20                   ` Icenowy Zheng
  0 siblings, 1 reply; 16+ messages in thread
From: Maxime Ripard @ 2018-07-25 12:19 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 2748 bytes --]

On Tue, Jul 24, 2018 at 10:42:32PM +0800, Icenowy Zheng wrote:
> 
> 
> 于 2018年7月24日 GMT+08:00 下午10:41:51, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
> >On Tue, Jul 24, 2018 at 10:37:51AM +0800, Chen-Yu Tsai wrote:
> >> On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io>
> >wrote:
> >> >
> >> >
> >> > 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org> 写到:
> >> >>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng <icenowy@aosc.io>
> >> >>wrote:
> >> >>>
> >> >>>
> >> >>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai <wens@csie.org>
> >写到:
> >> >>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng <icenowy@aosc.io>
> >> >>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.
> >> >>
> >> >>Cool. Then I can put away my RTL module for now. :)
> >> >
> >> > P.S. SDIO is auto detectable, and for BCM chips, the OOB interrupt
> >> > is only a bonus function and it can fall back to standard in-band
> >> > interrupt (which doesn't need special binding, and is currently
> >> > used by mainline r8723bs driver.)
> >> 
> >> Correct. With BT you'll have serdev device nodes with different
> >> compatibles. Then you'll have to resort to overlays, and you'd
> >probably
> >> end up adding WiFi OOB interrupt bits as well.
> >> 
> >> So the question remaining is: should we enable the MMC part, along
> >> with power sequencing and regulator supplies, by default? Thinking
> >> more about it, I'm actually OK with it. The board connectors are
> >> clearly marked as being for a WiFi+BT module. The whole space on
> >> the board is surrounded by a box in silkscreen. Sorry for the
> >> initial nack.
> >> 
> >> Maxime, any thoughts?
> >
> >If there's a need for an overlay anyway, there's no real reason to
> >enable it by default, especially if not everything is there.
> 
> Everything is there, for model B support.

Except BT?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B
  2018-07-25 12:19                 ` Maxime Ripard
@ 2018-07-25 12:20                   ` Icenowy Zheng
  0 siblings, 0 replies; 16+ messages in thread
From: Icenowy Zheng @ 2018-07-25 12:20 UTC (permalink / raw)
  To: maxime.ripard, Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi



于 2018年7月25日 GMT+08:00 下午8:19:47, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>On Tue, Jul 24, 2018 at 10:42:32PM +0800, Icenowy Zheng wrote:
>> 
>> 
>> 于 2018年7月24日 GMT+08:00 下午10:41:51, Maxime Ripard
><maxime.ripard@bootlin.com> 写到:
>> >On Tue, Jul 24, 2018 at 10:37:51AM +0800, Chen-Yu Tsai wrote:
>> >> On Tue, Jul 24, 2018 at 10:28 AM, Icenowy Zheng <icenowy@aosc.io>
>> >wrote:
>> >> >
>> >> >
>> >> > 于 2018年7月24日 GMT+08:00 上午10:26:02, Chen-Yu Tsai <wens@csie.org>
>写到:
>> >> >>On Tue, Jul 24, 2018 at 10:23 AM, Icenowy Zheng
><icenowy@aosc.io>
>> >> >>wrote:
>> >> >>>
>> >> >>>
>> >> >>> 于 2018年7月24日 GMT+08:00 上午10:21:59, Chen-Yu Tsai
><wens@csie.org>
>> >写到:
>> >> >>>>On Tue, Jul 24, 2018 at 9:15 AM, Icenowy Zheng
><icenowy@aosc.io>
>> >> >>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.
>> >> >>
>> >> >>Cool. Then I can put away my RTL module for now. :)
>> >> >
>> >> > P.S. SDIO is auto detectable, and for BCM chips, the OOB
>interrupt
>> >> > is only a bonus function and it can fall back to standard
>in-band
>> >> > interrupt (which doesn't need special binding, and is currently
>> >> > used by mainline r8723bs driver.)
>> >> 
>> >> Correct. With BT you'll have serdev device nodes with different
>> >> compatibles. Then you'll have to resort to overlays, and you'd
>> >probably
>> >> end up adding WiFi OOB interrupt bits as well.
>> >> 
>> >> So the question remaining is: should we enable the MMC part, along
>> >> with power sequencing and regulator supplies, by default? Thinking
>> >> more about it, I'm actually OK with it. The board connectors are
>> >> clearly marked as being for a WiFi+BT module. The whole space on
>> >> the board is surrounded by a box in silkscreen. Sorry for the
>> >> initial nack.
>> >> 
>> >> Maxime, any thoughts?
>> >
>> >If there's a need for an overlay anyway, there's no real reason to
>> >enable it by default, especially if not everything is there.
>> 
>> Everything is there, for model B support.
>
>Except BT?

Yes, not checked BT yet.

>
>Maxime

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-07-25 12:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-07-24  1:15 ` [PATCH 2/3] arm64: allwinner: dts: h6: add pinmux for MMC1 Icenowy Zheng
2018-07-24  8:56   ` Maxime Ripard
2018-07-24  8:57     ` Icenowy Zheng
2018-07-24  1:15 ` [PATCH 3/3] arm64: allwinner: dts: h6: add Wi-Fi support for Pine H64 model A/B Icenowy Zheng
2018-07-24  2:21   ` Chen-Yu Tsai
2018-07-24  2:23     ` Icenowy Zheng
2018-07-24  2:26       ` [linux-sunxi] " Chen-Yu Tsai
2018-07-24  2:28         ` Icenowy Zheng
2018-07-24  2:37           ` Chen-Yu Tsai
2018-07-24  2:39             ` Icenowy Zheng
2018-07-24 14:41             ` Maxime Ripard
2018-07-24 14:42               ` Icenowy Zheng
2018-07-25 12:19                 ` Maxime Ripard
2018-07-25 12:20                   ` Icenowy Zheng

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).