linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Make USB ports to work on HiKey960/970
@ 2021-09-01 12:23 Mauro Carvalho Chehab
  2021-09-01 12:23 ` [PATCH v2 2/3] arm64: dts: hisilicon: Add usb mux hub for hikey970 Mauro Carvalho Chehab
  2021-09-01 12:23 ` [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960 Mauro Carvalho Chehab
  0 siblings, 2 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-01 12:23 UTC (permalink / raw)
  To: Rob Herring, John Stultz
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel

Hi Rob,

It follows a second version for the patch adding a DT schema needed to
power on and to use the integrated USB HUB found on HiKey 960 and
Hikey 970 boards.

The entire series, which contains the remaining patches to support
PCI and USB on HiKey970, and USB on HiKey960 is at:
    https://github.com/mchehab/linux/commits/linux-next

John,

The primary reason why I added the HiKey960/970 bindings on
this series is because the Hikey960 one came from your tree:
 https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey960-mainline-WIP&id=fac6d20f0fee01eaaca36a8c52a44c741c6cbe78

Yet, you forgot to add your SoB there. Could you please reply to
such patch with your SoB ?

Thanks!
Mauro

---

v2:
 - changed the compatible strings to better reflect the names;
 - dropped the GPIO pin for Hikey960 power supply. It should
   use, instead, a regulator;
 - changed the names of the two gpio properties to better
   reflect that they're gpio;
 - use "-" instead of "_" at the DT property names;
 - Added DTS patches.
	
John Stultz (1):
  arm64: dts: hisilicon: Add usb mux hub for hikey960

Mauro Carvalho Chehab (1):
  arm64: dts: hisilicon: Add usb mux hub for hikey970

Yu Chen (1):
  dt-bindings: misc: add schema for USB hub on Kirin devices

 .../bindings/misc/hisilicon,hikey-usb.yaml    | 108 ++++++++++++++++++
 .../boot/dts/hisilicon/hi3660-hikey960.dts    |  35 +++++-
 .../boot/dts/hisilicon/hi3670-hikey970.dts    |  24 ++++
 3 files changed, 165 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml

-- 
2.31.1



_______________________________________________
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] 4+ messages in thread

* [PATCH v2 2/3] arm64: dts: hisilicon: Add usb mux hub for hikey970
  2021-09-01 12:23 [PATCH v2 0/3] Make USB ports to work on HiKey960/970 Mauro Carvalho Chehab
@ 2021-09-01 12:23 ` Mauro Carvalho Chehab
  2021-09-01 12:23 ` [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960 Mauro Carvalho Chehab
  1 sibling, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-01 12:23 UTC (permalink / raw)
  To: Rob Herring, John Stultz
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Rob Herring,
	Wei Xu, devicetree, linux-arm-kernel, linux-kernel

Add dt bindings for Kirin 970 USB HUB. Such board comes with an
integrated USB HUB provided via a TI TUSB8041 4-port USB 3.0 hub.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .../boot/dts/hisilicon/hi3670-hikey970.dts    | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
index 60594db07041..8502814d33e7 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
@@ -53,6 +53,30 @@ wlan_en: wlan-en-1-8v {
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	hikey_usbhub: hikey_usbhub {
+		compatible = "hisilicon,kirin970_hikey_usbhub";
+
+		typec-vbus-gpios = <&gpio26 1 0>;
+		otg-switch-gpios = <&gpio4 2 0>;
+		hub-reset-en-gpios = <&gpio0 3 0>;
+		hub-vdd-supply = <&ldo17>;
+		usb-role-switch;
+
+		port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hikey_usb_ep0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&dwc3_role_switch>;
+			};
+			hikey_usb_ep1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&rt1711h_ep>;
+			};
+		};
+	};
 };
 
 /*
-- 
2.31.1


_______________________________________________
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] 4+ messages in thread

* [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960
  2021-09-01 12:23 [PATCH v2 0/3] Make USB ports to work on HiKey960/970 Mauro Carvalho Chehab
  2021-09-01 12:23 ` [PATCH v2 2/3] arm64: dts: hisilicon: Add usb mux hub for hikey970 Mauro Carvalho Chehab
@ 2021-09-01 12:23 ` Mauro Carvalho Chehab
  2021-09-01 19:31   ` John Stultz
  1 sibling, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-01 12:23 UTC (permalink / raw)
  To: Rob Herring, John Stultz
  Cc: linuxarm, mauro.chehab, Rob Herring, Wei Xu, devicetree,
	linux-arm-kernel, linux-kernel, Mauro Carvalho Chehab

From: John Stultz <john.stultz@linaro.org>

Add dt bindings for Kirin 960 USB HUB. Such board comes with an
integrated USB HUB provided via a Microchip USB5734 4-port high-speed
hub controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .../boot/dts/hisilicon/hi3660-hikey960.dts    | 35 +++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index f68580dc87d8..cc38d4f961ee 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
@@ -191,12 +191,43 @@ wlan_en: wlan-en-1-8v {
 		enable-active-high;
 	};
 
+	usb_hub: hub-vdd {
+		compatible = "regulator-fixed";
+		regulator-name = "hub-vdd";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+	};
+
 	firmware {
 		optee {
 			compatible = "linaro,optee-tz";
 			method = "smc";
 		};
 	};
+
+	hisi_hikey_usb: hisi_hikey_usb {
+		compatible = "hisilicon,hikey960-usbhub";
+		typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>;
+		otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>;
+		hub-vdd33-en-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+		hub-vdd-supply = <&usb_hub>;
+		usb-role-switch;
+
+		port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hikey_usb_ep0: endpoint@0 {
+				reg = <0>;
+				remote-endpoint = <&dwc3_role_switch>;
+			};
+			hikey_usb_ep1: endpoint@1 {
+				reg = <1>;
+				remote-endpoint = <&rt1711h_ep>;
+			};
+		};
+	};
 };
 
 /*
@@ -564,7 +595,7 @@ port {
 
 			rt1711h_ep: endpoint@0 {
 				reg = <0>;
-				remote-endpoint = <&dwc3_role_switch>;
+				remote-endpoint = <&hikey_usb_ep1>;
 			};
 		};
 	};
@@ -686,7 +717,7 @@ port {
 		#size-cells = <0>;
 		dwc3_role_switch: endpoint@0 {
 			reg = <0>;
-			remote-endpoint = <&rt1711h_ep>;
+			remote-endpoint = <&hikey_usb_ep0>;
 		};
 
 		dwc3_ss: endpoint@1 {
-- 
2.31.1


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960
  2021-09-01 12:23 ` [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960 Mauro Carvalho Chehab
@ 2021-09-01 19:31   ` John Stultz
  0 siblings, 0 replies; 4+ messages in thread
From: John Stultz @ 2021-09-01 19:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Rob Herring, linuxarm, mauro.chehab, Rob Herring, Wei Xu,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, lkml

On Wed, Sep 1, 2021 at 5:23 AM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> From: John Stultz <john.stultz@linaro.org>
>

My apologies for not writing a proper patch description & s-o-b on the
commit you pulled this from!
I had split it out from an earlier patch that was sent upstream and
didn't get to cleaning it up.

> Add dt bindings for Kirin 960 USB HUB. Such board comes with an
> integrated USB HUB provided via a Microchip USB5734 4-port high-speed
> hub controller.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Feel free to add:
  Signed-off-by: John Stultz <john.stultz@linaro.org>
to the patch.

Thanks for continuing to push this upstream!
-john

_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2021-09-01 19:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 12:23 [PATCH v2 0/3] Make USB ports to work on HiKey960/970 Mauro Carvalho Chehab
2021-09-01 12:23 ` [PATCH v2 2/3] arm64: dts: hisilicon: Add usb mux hub for hikey970 Mauro Carvalho Chehab
2021-09-01 12:23 ` [PATCH v2 3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960 Mauro Carvalho Chehab
2021-09-01 19:31   ` John Stultz

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