All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs
@ 2020-04-13  6:24 ` Jernej Skrabec
  0 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

This series adds missing nodes for OrangePi Lite2 and One Plus and
fixes USB OTG mode to host because there is no way to toggle VBUS
power supply on/off.

The only remaining board specific functionality not enabled is USB3
on OrangePi Lite2, but for that USB connector power supply support
has to be added to driver first.

Please take a look.

Best regards,
Jernej

Jernej Skrabec (2):
  arm64: dts: allwinner: h6: orangepi: Add gpio power supply
  arm64: dts: allwinner: h6: orangepi: Disable OTG mode

Sebastian Meyer (1):
  arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module

 .../allwinner/sun50i-h6-orangepi-lite2.dts    | 65 +++++++++++++++++++
 .../dts/allwinner/sun50i-h6-orangepi.dtsi     | 17 ++++-
 2 files changed, 81 insertions(+), 1 deletion(-)

-- 
2.26.0


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

* [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs
@ 2020-04-13  6:24 ` Jernej Skrabec
  0 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: devicetree, linux-sunxi, robh+dt, linux-kernel, linux-arm-kernel

This series adds missing nodes for OrangePi Lite2 and One Plus and
fixes USB OTG mode to host because there is no way to toggle VBUS
power supply on/off.

The only remaining board specific functionality not enabled is USB3
on OrangePi Lite2, but for that USB connector power supply support
has to be added to driver first.

Please take a look.

Best regards,
Jernej

Jernej Skrabec (2):
  arm64: dts: allwinner: h6: orangepi: Add gpio power supply
  arm64: dts: allwinner: h6: orangepi: Disable OTG mode

Sebastian Meyer (1):
  arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module

 .../allwinner/sun50i-h6-orangepi-lite2.dts    | 65 +++++++++++++++++++
 .../dts/allwinner/sun50i-h6-orangepi.dtsi     | 17 ++++-
 2 files changed, 81 insertions(+), 1 deletion(-)

-- 
2.26.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/3] arm64: dts: allwinner: h6: orangepi: Add gpio power supply
  2020-04-13  6:24 ` Jernej Skrabec
@ 2020-04-13  6:24   ` Jernej Skrabec
  -1 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

OrangePi Lite2 and One Plus have GPIO ports powered by same power
supplies. Add them in common DT.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 9287976c4a50..f1be3dd558ca 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -106,6 +106,12 @@ &ohci3 {
 	status = "okay";
 };
 
+&pio {
+	vcc-pc-supply = <&reg_bldo2>;
+	vcc-pd-supply = <&reg_cldo1>;
+	vcc-pg-supply = <&reg_aldo1>;
+};
+
 &r_i2c {
 	status = "okay";
 
@@ -230,6 +236,10 @@ &r_ir {
 	status = "okay";
 };
 
+&r_pio {
+	vcc-pm-supply = <&reg_bldo3>;
+};
+
 &rtc {
 	clocks = <&ext_osc32k>;
 };
-- 
2.26.0


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

* [PATCH 1/3] arm64: dts: allwinner: h6: orangepi: Add gpio power supply
@ 2020-04-13  6:24   ` Jernej Skrabec
  0 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: devicetree, linux-sunxi, robh+dt, linux-kernel, linux-arm-kernel

OrangePi Lite2 and One Plus have GPIO ports powered by same power
supplies. Add them in common DT.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 9287976c4a50..f1be3dd558ca 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -106,6 +106,12 @@ &ohci3 {
 	status = "okay";
 };
 
+&pio {
+	vcc-pc-supply = <&reg_bldo2>;
+	vcc-pd-supply = <&reg_cldo1>;
+	vcc-pg-supply = <&reg_aldo1>;
+};
+
 &r_i2c {
 	status = "okay";
 
@@ -230,6 +236,10 @@ &r_ir {
 	status = "okay";
 };
 
+&r_pio {
+	vcc-pm-supply = <&reg_bldo3>;
+};
+
 &rtc {
 	clocks = <&ext_osc32k>;
 };
-- 
2.26.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] arm64: dts: allwinner: h6: orangepi: Disable OTG mode
  2020-04-13  6:24 ` Jernej Skrabec
@ 2020-04-13  6:24   ` Jernej Skrabec
  -1 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

As can be seen from OrangePi Lite 2 and One Plus schematics, VBUS pin on
USB OTG port is directly connected to 5 V power supply. This mean that
OTG port can safely operate only in host mode, even though these two
boards have ID pin connected.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index f1be3dd558ca..ebc120a9232f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -251,7 +251,12 @@ &uart0 {
 };
 
 &usb2otg {
-	dr_mode = "otg";
+	/*
+	 * OrangePi Lite 2 and One Plus, where this DT is used, don't
+	 * have a controllable VBUS even though they do have an ID pin.
+	 * Using it as anything but a USB host is unsafe.
+	 */
+	dr_mode = "host";
 	status = "okay";
 };
 
-- 
2.26.0


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

* [PATCH 2/3] arm64: dts: allwinner: h6: orangepi: Disable OTG mode
@ 2020-04-13  6:24   ` Jernej Skrabec
  0 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: devicetree, linux-sunxi, robh+dt, linux-kernel, linux-arm-kernel

As can be seen from OrangePi Lite 2 and One Plus schematics, VBUS pin on
USB OTG port is directly connected to 5 V power supply. This mean that
OTG port can safely operate only in host mode, even though these two
boards have ID pin connected.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index f1be3dd558ca..ebc120a9232f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -251,7 +251,12 @@ &uart0 {
 };
 
 &usb2otg {
-	dr_mode = "otg";
+	/*
+	 * OrangePi Lite 2 and One Plus, where this DT is used, don't
+	 * have a controllable VBUS even though they do have an ID pin.
+	 * Using it as anything but a USB host is unsafe.
+	 */
+	dr_mode = "host";
 	status = "okay";
 };
 
-- 
2.26.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module
  2020-04-13  6:24 ` Jernej Skrabec
@ 2020-04-13  6:24   ` Jernej Skrabec
  -1 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi,
	Sebastian Meyer

From: Sebastian Meyer <git-commit@mailhell.seb7.de>

OrangePi Lite2 has AP6255 BT+WIFI combo chip. Add support for it.

Signed-off-by: Sebastian Meyer <git-commit@mailhell.seb7.de>
[merged BT and WIFI patches and updated commit message]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 .../allwinner/sun50i-h6-orangepi-lite2.dts    | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
index e7ca75c0d0f7..e8770858b5d0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
@@ -6,4 +6,69 @@
 / {
 	model = "OrangePi Lite2";
 	compatible = "xunlong,orangepi-lite2", "allwinner,sun50i-h6";
+
+	aliases {
+		serial1 = &uart1; /* BT-UART */
+	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&rtc 1>;
+		clock-names = "ext_clock";
+		reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+		post-power-on-delay-ms = <200>;
+	};
+};
+
+&mmc1 {
+	vmmc-supply = <&reg_cldo2>;
+	vqmmc-supply = <&reg_bldo3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	brcm: sdio-wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&r_pio>;
+		interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>;	/* PM0 */
+		interrupt-names = "host-wake";
+	};
+};
+
+&reg_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;
+};
+
+&reg_cldo3 {
+	/*
+	 * This regulator is connected with CLDO2.
+	 * See the comments for CLDO2.
+	 */
+	regulator-always-on;
+};
+
+/* There's the BT part of the AP6255 connected to that UART */
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm4345c5";
+		clocks = <&rtc 1>;
+		clock-names = "lpo";
+		device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+		host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+		shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+		max-speed = <1500000>;
+	};
 };
-- 
2.26.0


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

* [PATCH 3/3] arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module
@ 2020-04-13  6:24   ` Jernej Skrabec
  0 siblings, 0 replies; 10+ messages in thread
From: Jernej Skrabec @ 2020-04-13  6:24 UTC (permalink / raw)
  To: mripard, wens
  Cc: devicetree, Sebastian Meyer, linux-kernel, linux-sunxi, robh+dt,
	linux-arm-kernel

From: Sebastian Meyer <git-commit@mailhell.seb7.de>

OrangePi Lite2 has AP6255 BT+WIFI combo chip. Add support for it.

Signed-off-by: Sebastian Meyer <git-commit@mailhell.seb7.de>
[merged BT and WIFI patches and updated commit message]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 .../allwinner/sun50i-h6-orangepi-lite2.dts    | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
index e7ca75c0d0f7..e8770858b5d0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts
@@ -6,4 +6,69 @@
 / {
 	model = "OrangePi Lite2";
 	compatible = "xunlong,orangepi-lite2", "allwinner,sun50i-h6";
+
+	aliases {
+		serial1 = &uart1; /* BT-UART */
+	};
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&rtc 1>;
+		clock-names = "ext_clock";
+		reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+		post-power-on-delay-ms = <200>;
+	};
+};
+
+&mmc1 {
+	vmmc-supply = <&reg_cldo2>;
+	vqmmc-supply = <&reg_bldo3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	brcm: sdio-wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&r_pio>;
+		interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>;	/* PM0 */
+		interrupt-names = "host-wake";
+	};
+};
+
+&reg_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;
+};
+
+&reg_cldo3 {
+	/*
+	 * This regulator is connected with CLDO2.
+	 * See the comments for CLDO2.
+	 */
+	regulator-always-on;
+};
+
+/* There's the BT part of the AP6255 connected to that UART */
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm4345c5";
+		clocks = <&rtc 1>;
+		clock-names = "lpo";
+		device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+		host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+		shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+		max-speed = <1500000>;
+	};
 };
-- 
2.26.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs
  2020-04-13  6:24 ` Jernej Skrabec
@ 2020-04-14  7:34   ` Maxime Ripard
  -1 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-04-14  7:34 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, robh+dt, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

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

On Mon, Apr 13, 2020 at 08:24:30AM +0200, Jernej Skrabec wrote:
> This series adds missing nodes for OrangePi Lite2 and One Plus and
> fixes USB OTG mode to host because there is no way to toggle VBUS
> power supply on/off.
>
> The only remaining board specific functionality not enabled is USB3
> on OrangePi Lite2, but for that USB connector power supply support
> has to be added to driver first.
>
> Please take a look.

Applied all three, thanks!
Maxime

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

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

* Re: [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs
@ 2020-04-14  7:34   ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2020-04-14  7:34 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: devicetree, wens, linux-kernel, linux-sunxi, robh+dt, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 459 bytes --]

On Mon, Apr 13, 2020 at 08:24:30AM +0200, Jernej Skrabec wrote:
> This series adds missing nodes for OrangePi Lite2 and One Plus and
> fixes USB OTG mode to host because there is no way to toggle VBUS
> power supply on/off.
>
> The only remaining board specific functionality not enabled is USB3
> on OrangePi Lite2, but for that USB connector power supply support
> has to be added to driver first.
>
> Please take a look.

Applied all three, thanks!
Maxime

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-04-14  7:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13  6:24 [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs Jernej Skrabec
2020-04-13  6:24 ` Jernej Skrabec
2020-04-13  6:24 ` [PATCH 1/3] arm64: dts: allwinner: h6: orangepi: Add gpio power supply Jernej Skrabec
2020-04-13  6:24   ` Jernej Skrabec
2020-04-13  6:24 ` [PATCH 2/3] arm64: dts: allwinner: h6: orangepi: Disable OTG mode Jernej Skrabec
2020-04-13  6:24   ` Jernej Skrabec
2020-04-13  6:24 ` [PATCH 3/3] arm64: allwinner: h6: orangepi-lite2: Support BT+WIFI combo module Jernej Skrabec
2020-04-13  6:24   ` Jernej Skrabec
2020-04-14  7:34 ` [PATCH 0/3] arm64: dts: allwinner: h6: OrangePi Lite2 and One Plus DTs Maxime Ripard
2020-04-14  7:34   ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.