[PATCH v2 6/7] arm64: dts: hisilicon: Add usb mux hub for hikey970

Mauro Carvalho Chehab mchehab at kernel.org
Fri Dec 17 02:12:50 PST 2021


From: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>

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 at kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---

See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1639735742.git.mchehab@kernel.org/

 .../boot/dts/hisilicon/hi3670-hikey970.dts    | 23 +++++++++++++++++++
 arch/arm64/boot/dts/hisilicon/hi3670.dtsi     | 10 ++++----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
index 60594db07041..95ca49f1e455 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
@@ -53,6 +53,29 @@ wlan_en: wlan-en-1-8v {
 		startup-delay-us = <70000>;
 		enable-active-high;
 	};
+
+	usb-hub {
+		compatible = "hisilicon,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 at 0 {
+				reg = <0>;
+				remote-endpoint = <&dwc3_role_switch>;
+			};
+			hikey_usb_ep1: endpoint at 1 {
+				reg = <1>;
+				remote-endpoint = <&rt1711h_ep>;
+			};
+		};
+	};
 };
 
 /*
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
index b47654b50139..486dc93ab47b 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
@@ -915,7 +915,7 @@ usb31_misc_rst: usb31_misc_rst_controller {
 			hisi,rst-syscon = <&usb3_otg_bc>;
 		};
 
-		usb3: hisi_dwc3 {
+		usb3: dwc3 {
 			compatible = "hisilicon,hi3670-dwc3";
 			#address-cells = <2>;
 			#size-cells = <2>;
@@ -925,10 +925,10 @@ usb3: hisi_dwc3 {
 				  <&crg_ctrl HI3670_HCLK_GATE_USB3OTG>,
 				  <&crg_ctrl HI3670_CLK_GATE_USB3OTG_REF>,
 				  <&crg_ctrl HI3670_ACLK_GATE_USB3DVFS>;
-			clock-names = "clk_gate_abb_usb",
-				      "hclk_gate_usb3otg",
-				      "clk_gate_usb3otg_ref",
-				      "aclk_gate_usb3dvfs";
+			clock-names = "abb",
+				      "hclk",
+				      "ref",
+				      "aclk";
 
 			assigned-clocks = <&crg_ctrl HI3670_ACLK_GATE_USB3DVFS>;
 			assigned-clock-rates = <238000000>;
-- 
2.33.1




More information about the linux-arm-kernel mailing list