linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus
@ 2017-08-30  3:01 Philipp Rossak
  2017-08-30  3:01 ` [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller Philipp Rossak
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

This Patchseries enables the IR controller and the dwmac-sun8i
on the Friendlyarm Nanopi M1 and Friendlyarm Nanopi M1 Plus boards.
On the Nanopi M1 Plus additionally the BT/Wifi module is activated.

Philipp Rossak (7):
  ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller
  ARM: dts: sun8i: h3: nanopi-m1-plus: Enable IR controller
  ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus
  ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus
  ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1
  ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins
  ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus

 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 80 +++++++++++++++++++++++++++
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts      | 17 ++++++
 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |  5 ++
 3 files changed, 102 insertions(+)

-- 
2.7.4

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

* [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-08-30 14:49   ` Maxime Ripard
  2017-08-30  3:01 ` [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: " Philipp Rossak
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The Nanopi M1 has an onboard IR receiver.
This enables the onboard IR receiver subnode.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
index ec63d10..3a2ccdb 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
@@ -55,6 +55,12 @@
 	status = "okay";
 };
 
+&ir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ir_pins_a>;
+	status = "okay";
+};
+
 &ohci1 {
 	status = "okay";
 };
-- 
2.7.4

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

* [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: Enable IR controller
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
  2017-08-30  3:01 ` [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-08-30 14:50   ` Maxime Ripard
  2017-08-30  3:01 ` [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus Philipp Rossak
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The Nanopi M1 Plus has an onboard IR receiver.
This enables the onboard IR receiver subnode.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
index 8ddd1b2..ece275b 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -55,6 +55,12 @@
 	status = "okay";
 };
 
+&ir {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ir_pins_a>;
+	status = "okay";
+};
+
 &ohci1 {
 	status = "okay";
 };
-- 
2.7.4

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

* [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
  2017-08-30  3:01 ` [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller Philipp Rossak
  2017-08-30  3:01 ` [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: " Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-08-30  8:27   ` Chen-Yu Tsai
  2017-08-30  3:01 ` [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on " Philipp Rossak
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The dwmac-sun8i hardware is present on the Nanopi M1 Plus.
It uses an external PHY.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 32 +++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
index ece275b..b9c6c27 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -45,6 +45,20 @@
 / {
 	model = "FriendlyArm NanoPi M1 Plus";
 	compatible = "friendlyarm,nanopi-m1-plus", "allwinner,sun8i-h3";
+
+	aliases {
+		ethernet0 = &emac;
+	};
+
+	reg_gmac_3v3: gmac-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "gmac-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <100000>;
+		enable-active-high;
+		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &ehci1 {
@@ -55,12 +69,30 @@
 	status = "okay";
 };
 
+&emac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emac_rgmii_pins>;
+	phy-supply = <&reg_gmac_3v3>;
+	phy-handle = <&ext_rgmii_phy>;
+	phy-mode = "rgmii";
+
+	allwinner,leds-active-low;
+	status = "okay";
+};
+
 &ir {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ir_pins_a>;
 	status = "okay";
 };
 
+&mdio {
+	ext_rgmii_phy: ethernet-phy at 1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+	};
+};
+
 &ohci1 {
 	status = "okay";
 };
-- 
2.7.4

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

* [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
                   ` (2 preceding siblings ...)
  2017-08-30  3:01 ` [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-08-30 14:52   ` Maxime Ripard
  2017-08-30  3:01 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Philipp Rossak
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The WiFi side of the AP6212 WiFi/BT combo module is connected to
mmc1. There are also GPIOs for enable and interrupts.

Enable WiFi on this board by enabling mmc1 and adding the power
sequencing clocks and GPIO, as well as the chip's interrupt line.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 35 +++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
index b9c6c27..3054308 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -48,6 +48,7 @@
 
 	aliases {
 		ethernet0 = &emac;
+		ethernet1 = &ap6212;
 	};
 
 	reg_gmac_3v3: gmac-3v3 {
@@ -59,6 +60,14 @@
 		enable-active-high;
 		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
 	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_en_npi_m1p>;
+		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+	};
+
 };
 
 &ehci1 {
@@ -93,6 +102,25 @@
 	};
 };
 
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc3v3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	ap6212: sdio_wifi at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
+		interrupt-names = "host-wake";
+	};
+};
+
 &ohci1 {
 	status = "okay";
 };
@@ -100,3 +128,10 @@
 &ohci2 {
 	status = "okay";
 };
+
+&r_pio {
+	wifi_en_npi_m1p: wifi_en_pin {
+		pins = "PL7";
+		function = "gpio_out";
+	};
+};
-- 
2.7.4

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

* [PATCH 5/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
                   ` (3 preceding siblings ...)
  2017-08-30  3:01 ` [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on " Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-08-30  3:01 ` [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins Philipp Rossak
  2017-08-30  3:01 ` [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus Philipp Rossak
  6 siblings, 0 replies; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The dwmac-sun8i hardware is present on the Nanopi M1.
It uses the internal PHY.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
index 3a2ccdb..c77fbca 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts
@@ -45,6 +45,10 @@
 / {
 	model = "FriendlyArm NanoPi M1";
 	compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+	aliases {
+		ethernet0 = &emac;
+	};
 };
 
 &ehci1 {
@@ -55,6 +59,13 @@
 	status = "okay";
 };
 
+&emac {
+	phy-handle = <&int_mii_phy>;
+	phy-mode = "mii";
+	allwinner,leds-active-low;
+	status = "okay";
+};
+
 &ir {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ir_pins_a>;
-- 
2.7.4

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

* [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
                   ` (4 preceding siblings ...)
  2017-08-30  3:01 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-09-01 12:59   ` Maxime Ripard
  2017-08-30  3:01 ` [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus Philipp Rossak
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

This node adds the definition for the UART3 RTS and CTS Pins

That makes it able to use UART3 with RTS and CTS.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index d38282b..7f750ef 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -381,6 +381,11 @@
 				pins = "PA13", "PA14";
 				function = "uart3";
 			};
+
+			uart3_rts_cts_pins: uart3_rts_cts {
+				pins = "PA15", "PA16";
+				function = "uart3";
+			};
 		};
 
 		timer at 01c20c00 {
-- 
2.7.4

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

* [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus
  2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
                   ` (5 preceding siblings ...)
  2017-08-30  3:01 ` [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins Philipp Rossak
@ 2017-08-30  3:01 ` Philipp Rossak
  2017-09-01 12:59   ` Maxime Ripard
  6 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30  3:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Philipp Rossak <embed3d@gmail.com>

The BT side of the AP6212 WiFi/BT combo module is connected to
uart3.

Enable BT on this board by enabling uart3 with using additionally
the cts and rts pins.

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
index 3054308..8c12419 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
@@ -49,6 +49,7 @@
 	aliases {
 		ethernet0 = &emac;
 		ethernet1 = &ap6212;
+		serial1 = &uart3;
 	};
 
 	reg_gmac_3v3: gmac-3v3 {
@@ -135,3 +136,9 @@
 		function = "gpio_out";
 	};
 };
+
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
+	status = "okay";
+};
-- 
2.7.4

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

* [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus
  2017-08-30  3:01 ` [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus Philipp Rossak
@ 2017-08-30  8:27   ` Chen-Yu Tsai
  0 siblings, 0 replies; 16+ messages in thread
From: Chen-Yu Tsai @ 2017-08-30  8:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 11:01 AM, Philipp Rossak <embed3d@gmail.com> wrote:
> From: Philipp Rossak <embed3d@gmail.com>
>
> The dwmac-sun8i hardware is present on the Nanopi M1 Plus.

Support for this has been reverted. Please send this once it has
been added again.

ChenYu

> It uses an external PHY.
>
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

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

* [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller
  2017-08-30  3:01 ` [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller Philipp Rossak
@ 2017-08-30 14:49   ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2017-08-30 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 05:01:04AM +0200, Philipp Rossak wrote:
> From: Philipp Rossak <embed3d@gmail.com>
> 
> The Nanopi M1 has an onboard IR receiver.
> This enables the onboard IR receiver subnode.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

Queued for 4.15, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170830/fd692770/attachment.sig>

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

* [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: Enable IR controller
  2017-08-30  3:01 ` [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: " Philipp Rossak
@ 2017-08-30 14:50   ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2017-08-30 14:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 05:01:05AM +0200, Philipp Rossak wrote:
> From: Philipp Rossak <embed3d@gmail.com>
> 
> The Nanopi M1 Plus has an onboard IR receiver.
> This enables the onboard IR receiver subnode.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

Queued for 4.15, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170830/4bf12397/attachment.sig>

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

* [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus
  2017-08-30  3:01 ` [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on " Philipp Rossak
@ 2017-08-30 14:52   ` Maxime Ripard
  2017-08-30 21:51     ` Philipp Rossak
  0 siblings, 1 reply; 16+ messages in thread
From: Maxime Ripard @ 2017-08-30 14:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Aug 30, 2017 at 05:01:07AM +0200, Philipp Rossak wrote:
> From: Philipp Rossak <embed3d@gmail.com>
> 
> The WiFi side of the AP6212 WiFi/BT combo module is connected to
> mmc1. There are also GPIOs for enable and interrupts.
> 
> Enable WiFi on this board by enabling mmc1 and adding the power
> sequencing clocks and GPIO, as well as the chip's interrupt line.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>
> ---
>  arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 35 +++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> index b9c6c27..3054308 100644
> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> @@ -48,6 +48,7 @@
>  
>  	aliases {
>  		ethernet0 = &emac;
> +		ethernet1 = &ap6212;
>  	};
>  
>  	reg_gmac_3v3: gmac-3v3 {
> @@ -59,6 +60,14 @@
>  		enable-active-high;
>  		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
>  	};
> +
> +	wifi_pwrseq: wifi_pwrseq {
> +		compatible = "mmc-pwrseq-simple";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wifi_en_npi_m1p>;

There's no need for pinctrl nodes when the pin is set to a GPIO.

> +		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> +	};
> +
>  };
>  
>  &ehci1 {
> @@ -93,6 +102,25 @@
>  	};
>  };
>  
> +&mmc1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc1_pins_a>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	vqmmc-supply = <&reg_vcc3v3>;

You don't need vqmmc in this case.

> +	mmc-pwrseq = <&wifi_pwrseq>;
> +	bus-width = <4>;
> +	non-removable;
> +	status = "okay";
> +
> +	ap6212: sdio_wifi at 1 {

You're sure you need a label here?

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170830/2ef1ada8/attachment.sig>

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

* [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus
  2017-08-30 14:52   ` Maxime Ripard
@ 2017-08-30 21:51     ` Philipp Rossak
  2017-09-01 13:00       ` Maxime Ripard
  0 siblings, 1 reply; 16+ messages in thread
From: Philipp Rossak @ 2017-08-30 21:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
thanks for the feedback I will rework the patch.
Should I also update the sun8i-h3-bananapi-m2-plus.dts? It uses also the 
AP6212 and it is done in the same way like in this patch.

Am 30.08.2017 um 16:52 schrieb Maxime Ripard:
> Hi,
> 
> On Wed, Aug 30, 2017 at 05:01:07AM +0200, Philipp Rossak wrote:
>> From: Philipp Rossak <embed3d@gmail.com>
>>
>> The WiFi side of the AP6212 WiFi/BT combo module is connected to
>> mmc1. There are also GPIOs for enable and interrupts.
>>
>> Enable WiFi on this board by enabling mmc1 and adding the power
>> sequencing clocks and GPIO, as well as the chip's interrupt line.
>>
>> Signed-off-by: Philipp Rossak <embed3d@gmail.com>
>> ---
>>   arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 35 +++++++++++++++++++++++++++
>>   1 file changed, 35 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
>> index b9c6c27..3054308 100644
>> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
>> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
>> @@ -48,6 +48,7 @@
>>   
>>   	aliases {
>>   		ethernet0 = &emac;
>> +		ethernet1 = &ap6212;
>>   	};
>>   
>>   	reg_gmac_3v3: gmac-3v3 {
>> @@ -59,6 +60,14 @@
>>   		enable-active-high;
>>   		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
>>   	};
>> +
>> +	wifi_pwrseq: wifi_pwrseq {
>> +		compatible = "mmc-pwrseq-simple";
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&wifi_en_npi_m1p>;
> 
> There's no need for pinctrl nodes when the pin is set to a GPIO.
> 
>> +		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
>> +	};
>> +
>>   };
>>   
>>   &ehci1 {
>> @@ -93,6 +102,25 @@
>>   	};
>>   };
>>   
>> +&mmc1 {
>> +	pinctrl-names = "default";
>> +	pinctrl-0 = <&mmc1_pins_a>;
>> +	vmmc-supply = <&reg_vcc3v3>;
>> +	vqmmc-supply = <&reg_vcc3v3>;
> 
> You don't need vqmmc in this case.
> 
>> +	mmc-pwrseq = <&wifi_pwrseq>;
>> +	bus-width = <4>;
>> +	non-removable;
>> +	status = "okay";
>> +
>> +	ap6212: sdio_wifi at 1 {
> 
> You're sure you need a label here?
> 
> Thanks!
> Maxime
> 

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

* [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins
  2017-08-30  3:01 ` [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins Philipp Rossak
@ 2017-09-01 12:59   ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2017-09-01 12:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 05:01:09AM +0200, Philipp Rossak wrote:
> From: Philipp Rossak <embed3d@gmail.com>
> 
> This node adds the definition for the UART3 RTS and CTS Pins
> 
> That makes it able to use UART3 with RTS and CTS.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

Queued for 4.15, thanks

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170901/95b50807/attachment.sig>

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

* [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus
  2017-08-30  3:01 ` [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus Philipp Rossak
@ 2017-09-01 12:59   ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2017-09-01 12:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 05:01:10AM +0200, Philipp Rossak wrote:
> From: Philipp Rossak <embed3d@gmail.com>
> 
> The BT side of the AP6212 WiFi/BT combo module is connected to
> uart3.
> 
> Enable BT on this board by enabling uart3 with using additionally
> the cts and rts pins.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

I've queued this patch for 4.15, but...

> ---
>  arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> index 3054308..8c12419 100644
> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts
> @@ -49,6 +49,7 @@
>  	aliases {
>  		ethernet0 = &emac;
>  		ethernet1 = &ap6212;
> +		serial1 = &uart3;

You'll also need an alias for serial 0 here. Can you send a follow up
patch to do so?

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170901/015b10e9/attachment-0001.sig>

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

* [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus
  2017-08-30 21:51     ` Philipp Rossak
@ 2017-09-01 13:00       ` Maxime Ripard
  0 siblings, 0 replies; 16+ messages in thread
From: Maxime Ripard @ 2017-09-01 13:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 30, 2017 at 11:51:37PM +0200, Philipp Rossak wrote:
> Hi,
> thanks for the feedback I will rework the patch.
> Should I also update the sun8i-h3-bananapi-m2-plus.dts? It uses also the
> AP6212 and it is done in the same way like in this patch.

Yes, please.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170901/c0d69e5c/attachment.sig>

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

end of thread, other threads:[~2017-09-01 13:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30  3:01 [PATCH 0/7] [DTS] enable hardware for Nanopi M1 & Nanopi M1 Plus Philipp Rossak
2017-08-30  3:01 ` [PATCH 1/7] ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller Philipp Rossak
2017-08-30 14:49   ` Maxime Ripard
2017-08-30  3:01 ` [PATCH 2/7] ARM: dts: sun8i: h3: nanopi-m1-plus: " Philipp Rossak
2017-08-30 14:50   ` Maxime Ripard
2017-08-30  3:01 ` [PATCH 3/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Plus Philipp Rossak
2017-08-30  8:27   ` Chen-Yu Tsai
2017-08-30  3:01 ` [PATCH 4/7] ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on " Philipp Rossak
2017-08-30 14:52   ` Maxime Ripard
2017-08-30 21:51     ` Philipp Rossak
2017-09-01 13:00       ` Maxime Ripard
2017-08-30  3:01 ` [PATCH 5/7] ARM: dts: sun8i: h3: Enable dwmac-sun8i on the Nanopi M1 Philipp Rossak
2017-08-30  3:01 ` [PATCH 6/7] ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins Philipp Rossak
2017-09-01 12:59   ` Maxime Ripard
2017-08-30  3:01 ` [PATCH 7/7] ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus Philipp Rossak
2017-09-01 12:59   ` Maxime Ripard

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