diff mbox series

[v2,3/3] arm64: dts: hisilicon: Add usb mux hub for hikey960

Message ID b1ea71426ecf21bbfd598a6bf7951d884fcc5e1a.1630498020.git.mchehab+huawei@kernel.org (mailing list archive)
State New, archived
Headers show
Series Make USB ports to work on HiKey960/970 | expand

Commit Message

Mauro Carvalho Chehab Sept. 1, 2021, 12:23 p.m. UTC
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(-)

Comments

John Stultz Sept. 1, 2021, 7:31 p.m. UTC | #1
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
diff mbox series

Patch

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 {