Skip to contentSkip to conversation

rk3399: Restore broken USB3 DTS description.

PATCH New Christoph Muellner 4 participants 7 messages May 7, 2019 – Jul 26, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rk3399: Restore broken USB3 DTS description.

This is a partial revert of commit 0a09f2f1173d ("rockchip: Adjust rk3399 device tree to be closer to linux").

Harmonizing the rk3399.dtsi with the one from Linux is a good idea. However, this is only true if the information within that file can be used by U-Boot. Before the named commit USB3 was working fine, after the commit USB3 was broken on all RK3399 boards.

This commit reverts the USB3 changes to the original ones, which provide the required information for the corresponding drivers in the U-Boot tree.

---

 arch/arm/dts/rk3399.dtsi | 88 ++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 56 deletions(-)
arch/arm/dts/rk3399.dtsi +32 -56
index b53e41b4dc..823d459957 100644
@@ -349,69 +349,45 @@
 		status = "disabled";
 	};
 
-	usbdrd3_0: dwc3_typec0: usb at fe800000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>,
-			 <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG0>;
-		reset-names = "usb3-otg";
+	dwc3_typec0: usb at fe800000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe800000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_0: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe800000 0x0 0x100000>;
-			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy0_otg>, <&tcphy0_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy0 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff7c0000 0x0 0x40000>;
 		};
 	};
 
-	dwc3_typec1: usbdrd3_1: usb at fe900000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>,
-			 <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG1>;
-		reset-names = "usb3-otg";
+	dwc3_typec1: usb at fe900000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe900000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_1: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe900000 0x0 0x100000>;
-			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy1_otg>, <&tcphy1_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy1 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff800000 0x0 0x40000>;
 		};
 	};
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 rk3399: gru: Fix DTS compilation issues.

A previous commit changed the USB3 node names, which breaks compilation of the gru DTS files.

This patch addresses this issue by fixing the referenced node names.

---

 arch/arm/dts/rk3399-gru-chromebook.dtsi | 7 +------
 arch/arm/dts/rk3399-gru.dtsi            | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)
arch/arm/dts/rk3399-gru-chromebook.dtsi +1 -6
index c6495adcca..3edb9f51fa 100644
@@ -348,16 +348,11 @@ ap_i2c_tp: &i2c5 {
 	status = "okay";
 };
 
-&usbdrd3_1 {
+&dwc3_typec1 {
 	status = "okay";
 	extcon = <&usbc_extcon1>;
 };
 
-&usbdrd_dwc3_1 {
-	status = "okay";
-	dr_mode = "host";
-};
-
 &pinctrl {
 	discrete-regulators {
 		pp1500_en: pp1500-en {
arch/arm/dts/rk3399-gru.dtsi +1 -6
index ca0fc391b2..9f8760078f 100644
@@ -636,16 +636,11 @@ ap_i2c_audio: &i2c8 {
 	status = "okay";
 };
 
-&usbdrd3_0 {
+&dwc3_typec0 {
 	status = "okay";
 	extcon = <&usbc_extcon0>;
 };
 
-&usbdrd_dwc3_0 {
-	status = "okay";
-	dr_mode = "host";
-};
-
 &vopb {
 	status = "okay";
 };
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 rk3399: gru: Fix DTS compilation issues.

Quoted 4 lines · Christoph Muellner

A previous commit changed the USB3 node names, which breaks compilation of the gru DTS files.

Quoted 8 lines

This patch addresses this issue by fixing the referenced node names.

---

 arch/arm/dts/rk3399-gru-chromebook.dtsi | 7 +------
 arch/arm/dts/rk3399-gru.dtsi            | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

Could you add a Fixes: line so we know which commit broke it?

#3 lore raw

PATCH 1/2 rk3399: Restore broken USB3 DTS description.

In reply to Christoph Muellner
Quoted 6 lines

From: Christoph Muellner <[email protected]>
Date: Tue, 7 May 2019 10:49:13 +0200

This is a partial revert of commit 0a09f2f1173d ("rockchip: Adjust rk3399 device tree to be closer to linux").

Quoted 7 lines

Harmonizing the rk3399.dtsi with the one from Linux is a good idea. However, this is only true if the information within that file can be used by U-Boot. Before the named commit USB3 was working fine, after the commit USB3 was broken on all RK3399 boards.

This commit reverts the USB3 changes to the original ones, which provide the required information for the corresponding drivers in the U-Boot tree.

Hi Christoph,

Can't this be fixed by adding "rockchip,rk3399-dwc3" to dwc3_glue_ids list in drivers/usb/dwc3/dwc3-generic.c?

Cheers,

Mark

Quoted 119 lines

---

 arch/arm/dts/rk3399.dtsi | 88 ++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 56 deletions(-)
arch/arm/dts/rk3399.dtsi +32 -56
index b53e41b4dc..823d459957 100644
@@ -349,69 +349,45 @@
 		status = "disabled";
 	};
 
-	usbdrd3_0: dwc3_typec0: usb at fe800000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>,
-			 <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG0>;
-		reset-names = "usb3-otg";
+	dwc3_typec0: usb at fe800000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe800000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_0: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe800000 0x0 0x100000>;
-			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy0_otg>, <&tcphy0_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy0 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff7c0000 0x0 0x40000>;
 		};
 	};
 
-	dwc3_typec1: usbdrd3_1: usb at fe900000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>,
-			 <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG1>;
-		reset-names = "usb3-otg";
+	dwc3_typec1: usb at fe900000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe900000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_1: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe900000 0x0 0x100000>;
-			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy1_otg>, <&tcphy1_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy1 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff800000 0x0 0x40000>;
 		};
 	};
 
Signature · 6 lines
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
#4 lore raw

PATCH 1/2 rk3399: Restore broken USB3 DTS description.

In reply to Christoph Muellner
Quoted 8 lines · Christoph Muellner

This is a partial revert of commit 0a09f2f1173d ("rockchip: Adjust rk3399 device tree to be closer to linux").

Harmonizing the rk3399.dtsi with the one from Linux is a good idea. However, this is only true if the information within that file can be used by U-Boot. Before the named commit USB3 was working fine, after the commit USB3 was broken on all RK3399 boards.

Quoted 4 lines

This commit reverts the USB3 changes to the original ones, which provide the required information for the corresponding drivers in the U-Boot tree.

Yes, USB dts node is different from Linux now, and I thinks there are patches
on the list are still working on sync with Linux, we have to make it work first
before sync everything with Linux.

Thanks,
- Kever

Quoted 111 lines

---

 arch/arm/dts/rk3399.dtsi | 88 ++++++++++++++++++------------------------------
 1 file changed, 32 insertions(+), 56 deletions(-)
arch/arm/dts/rk3399.dtsi +32 -56
index b53e41b4dc..823d459957 100644
@@ -349,69 +349,45 @@
 		status = "disabled";
 	};
 
-	usbdrd3_0: dwc3_typec0: usb at fe800000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>,
-			 <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG0>;
-		reset-names = "usb3-otg";
+	dwc3_typec0: usb at fe800000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe800000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_0: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe800000 0x0 0x100000>;
-			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy0_otg>, <&tcphy0_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy0 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff7c0000 0x0 0x40000>;
 		};
 	};
 
-	dwc3_typec1: usbdrd3_1: usb at fe900000 {
-		compatible = "rockchip,rk3399-dwc3";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-		clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>,
-			 <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_RKSOC_AXI_PERF>,
-			 <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-		clock-names = "ref_clk", "suspend_clk",
-			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
-			      "aclk_usb3", "grf_clk";
-		resets = <&cru SRST_A_USB3_OTG1>;
-		reset-names = "usb3-otg";
+	dwc3_typec1: usb at fe900000 {
+		compatible = "rockchip,rk3399-xhci";
+		reg = <0x0 0xfe900000 0x0 0x100000>;
 		status = "disabled";
+		snps,dis-enblslpm-quirk;
+		snps,phyif-utmi-bits = <16>;
+		snps,dis-u2-freeclk-exists-quirk;
+		snps,dis-u2-susphy-quirk;
 
-		usbdrd_dwc3_1: dwc3 {
-			compatible = "snps,dwc3";
-			reg = <0x0 0xfe900000 0x0 0x100000>;
-			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-			dr_mode = "otg";
-			phys = <&u2phy1_otg>, <&tcphy1_usb3>;
-			phy-names = "usb2-phy", "usb3-phy";
-			phy_type = "utmi_wide";
-			snps,dis_enblslpm_quirk;
-			snps,dis-u2-freeclk-exists-quirk;
-			snps,dis_u2_susphy_quirk;
-			snps,dis-del-phy-power-chg-quirk;
-			snps,dis-tx-ipgap-linecheck-quirk;
-			power-domains = <&power RK3399_PD_USB3>;
-			status = "disabled";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		hub {
+			compatible = "usb-hub";
+			usb,device-class = <USB_CLASS_HUB>;
+		};
+		typec_phy1 {
+			compatible = "rockchip,rk3399-usb3-phy";
+			reg = <0x0 0xff800000 0x0 0x40000>;
 		};
 	};
 
#5 lore raw

PATCH 1/2 rk3399: Restore broken USB3 DTS description.

Hi Chris,

Could you help to check if this patch still needed after patches from Mark:
c908d46f3a rockchip: xhci: Remove RK3399 support
062790f461 usb: xhci-dwc3: Add USB2 PHY configuration aaa8d6b149 usb: dwc3-of-simple: Add support for RK3399

Thanks,
- Kever

Quoted 151 lines · Kever Yang <[email protected]> 于2019年5月27日周一 下午2:47写道:
Quoted 10 lines · Christoph Muellner

This is a partial revert of commit 0a09f2f1173d ("rockchip: Adjust rk3399 device tree to be closer to linux").

Harmonizing the rk3399.dtsi with the one from Linux is a good idea. However, this is only true if the information within that file can be used by U-Boot. Before the named commit USB3 was working fine, after the commit USB3 was broken on all RK3399 boards.

This commit reverts the USB3 changes to the original ones, which provide the required information for the corresponding drivers in the U-Boot

tree.

Quoted 2 lines
Signed-off-by Christoph Muellner <

christoph.muellner at theobroma-systems.com>
Yes, USB dts node is different from Linux now, and I thinks there are patches
on the list are still working on sync with Linux, we have to make it work first
before sync everything with Linux.

Thanks,
- Kever

Quoted 3 lines

---

 arch/arm/dts/rk3399.dtsi | 88

++++++++++++++++++------------------------------

Quoted 7 lines
 1 file changed, 32 insertions(+), 56 deletions(-)
arch/arm/dts/rk3399.dtsi +0 -0
index b53e41b4dc..823d459957 100644

arch/arm/dts/rk3399.dtsi line 357

Quoted 9 lines
arch/arm/dts/rk3399.dtsi +0 -6
@@ -349,69 +349,45 @@
              status = "disabled";
      };
 
-     usbdrd3_0: dwc3_typec0: usb at fe800000 {
-             compatible = "rockchip,rk3399-dwc3";
-             #address-cells = <2>;
-             #size-cells = <2>;
-             ranges;
-             clocks = <&cru SCLK_USB3OTG0_REF>, <&cru

SCLK_USB3OTG0_SUSPEND>,

arch/arm/dts/rk3399.dtsi line 358

Quoted 1 line
arch/arm/dts/rk3399.dtsi +0 -1
-                      <&cru ACLK_USB3OTG0>, <&cru

ACLK_USB3_RKSOC_AXI_PERF>,

Quoted 38 lines
arch/arm/dts/rk3399.dtsi +15 -21
-                      <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-             clock-names = "ref_clk", "suspend_clk",
-                           "bus_clk", "aclk_usb3_rksoc_axi_perf",
-                           "aclk_usb3", "grf_clk";
-             resets = <&cru SRST_A_USB3_OTG0>;
-             reset-names = "usb3-otg";
+     dwc3_typec0: usb at fe800000 {
+             compatible = "rockchip,rk3399-xhci";
+             reg = <0x0 0xfe800000 0x0 0x100000>;
              status = "disabled";
+             snps,dis-enblslpm-quirk;
+             snps,phyif-utmi-bits = <16>;
+             snps,dis-u2-freeclk-exists-quirk;
+             snps,dis-u2-susphy-quirk;
 
-             usbdrd_dwc3_0: dwc3 {
-                     compatible = "snps,dwc3";
-                     reg = <0x0 0xfe800000 0x0 0x100000>;
-                     interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
-                     dr_mode = "otg";
-                     phys = <&u2phy0_otg>, <&tcphy0_usb3>;
-                     phy-names = "usb2-phy", "usb3-phy";
-                     phy_type = "utmi_wide";
-                     snps,dis_enblslpm_quirk;
-                     snps,dis-u2-freeclk-exists-quirk;
-                     snps,dis_u2_susphy_quirk;
-                     snps,dis-del-phy-power-chg-quirk;
-                     snps,dis-tx-ipgap-linecheck-quirk;
-                     power-domains = <&power RK3399_PD_USB3>;
-                     status = "disabled";
+             #address-cells = <2>;
+             #size-cells = <2>;
+             hub {
+                     compatible = "usb-hub";
+                     usb,device-class = <USB_CLASS_HUB>;
+             };
+             typec_phy0 {
+                     compatible = "rockchip,rk3399-usb3-phy";

arch/arm/dts/rk3399.dtsi

Quoted 10 lines
arch/arm/dts/rk3399.dtsi +1 -6
+                     reg = <0x0 0xff7c0000 0x0 0x40000>;
              };
      };
 
-     dwc3_typec1: usbdrd3_1: usb at fe900000 {
-             compatible = "rockchip,rk3399-dwc3";
-             #address-cells = <2>;
-             #size-cells = <2>;
-             ranges;
-             clocks = <&cru SCLK_USB3OTG1_REF>, <&cru

SCLK_USB3OTG1_SUSPEND>,

arch/arm/dts/rk3399.dtsi line 391

Quoted 1 line
arch/arm/dts/rk3399.dtsi +0 -1
-                      <&cru ACLK_USB3OTG1>, <&cru

ACLK_USB3_RKSOC_AXI_PERF>,

Quoted 32 lines
arch/arm/dts/rk3399.dtsi +9 -21
-                      <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-             clock-names = "ref_clk", "suspend_clk",
-                           "bus_clk", "aclk_usb3_rksoc_axi_perf",
-                           "aclk_usb3", "grf_clk";
-             resets = <&cru SRST_A_USB3_OTG1>;
-             reset-names = "usb3-otg";
+     dwc3_typec1: usb at fe900000 {
+             compatible = "rockchip,rk3399-xhci";
+             reg = <0x0 0xfe900000 0x0 0x100000>;
              status = "disabled";
+             snps,dis-enblslpm-quirk;
+             snps,phyif-utmi-bits = <16>;
+             snps,dis-u2-freeclk-exists-quirk;
+             snps,dis-u2-susphy-quirk;
 
-             usbdrd_dwc3_1: dwc3 {
-                     compatible = "snps,dwc3";
-                     reg = <0x0 0xfe900000 0x0 0x100000>;
-                     interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-                     dr_mode = "otg";
-                     phys = <&u2phy1_otg>, <&tcphy1_usb3>;
-                     phy-names = "usb2-phy", "usb3-phy";
-                     phy_type = "utmi_wide";
-                     snps,dis_enblslpm_quirk;
-                     snps,dis-u2-freeclk-exists-quirk;
-                     snps,dis_u2_susphy_quirk;
-                     snps,dis-del-phy-power-chg-quirk;
-                     snps,dis-tx-ipgap-linecheck-quirk;
-                     power-domains = <&power RK3399_PD_USB3>;
-                     status = "disabled";
+             #address-cells = <2>;
+             #size-cells = <2>;

arch/arm/dts/rk3399.dtsi line 393

Quoted 10 lines
arch/arm/dts/rk3399.dtsi +7 -0
+             hub {
+                     compatible = "usb-hub";
+                     usb,device-class = <USB_CLASS_HUB>;
+             };
+             typec_phy1 {
+                     compatible = "rockchip,rk3399-usb3-phy";
+                     reg = <0x0 0xff800000 0x0 0x40000>;
              };
      };
 

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#6 lore raw

PATCH 1/2 rk3399: Restore broken USB3 DTS description.

Quoted 5 lines

From: Kever Yang <[email protected]>
Date: Fri, 26 Jul 2019 17:51:34 +0800

Hi Chris,

Quoted 7 lines

Could you help to check if this patch still needed after patches from Mark:
c908d46f3a rockchip: xhci: Remove RK3399 support
062790f461 usb: xhci-dwc3: Add USB2 PHY configuration aaa8d6b149 usb: dwc3-of-simple: Add support for RK3399

Thanks,
- Kever

Hi Kever,

This patch is no longer needed (and applying it now would break usb3 support).

Cheers,

Mark

Quoted 157 lines
Quoted 146 lines · Kever Yang <[email protected]> 于2019年5月27日周一 下午2:47写道:
Quoted 10 lines · Christoph Muellner

This is a partial revert of commit 0a09f2f1173d ("rockchip: Adjust rk3399 device tree to be closer to linux").

Harmonizing the rk3399.dtsi with the one from Linux is a good idea. However, this is only true if the information within that file can be used by U-Boot. Before the named commit USB3 was working fine, after the commit USB3 was broken on all RK3399 boards.

This commit reverts the USB3 changes to the original ones, which provide the required information for the corresponding drivers in the U-Boot

tree.

Quoted 2 lines
Signed-off-by Christoph Muellner <

christoph.muellner at theobroma-systems.com>
Yes, USB dts node is different from Linux now, and I thinks there are patches
on the list are still working on sync with Linux, we have to make it work first
before sync everything with Linux.

Thanks,
- Kever

Quoted 3 lines

---

 arch/arm/dts/rk3399.dtsi | 88

++++++++++++++++++------------------------------

Quoted 7 lines
 1 file changed, 32 insertions(+), 56 deletions(-)
arch/arm/dts/rk3399.dtsi +0 -0
index b53e41b4dc..823d459957 100644

arch/arm/dts/rk3399.dtsi line 357

Quoted 9 lines
arch/arm/dts/rk3399.dtsi +0 -6
@@ -349,69 +349,45 @@
              status = "disabled";
      };
 
-     usbdrd3_0: dwc3_typec0: usb at fe800000 {
-             compatible = "rockchip,rk3399-dwc3";
-             #address-cells = <2>;
-             #size-cells = <2>;
-             ranges;
-             clocks = <&cru SCLK_USB3OTG0_REF>, <&cru

SCLK_USB3OTG0_SUSPEND>,

arch/arm/dts/rk3399.dtsi line 358

Quoted 1 line
arch/arm/dts/rk3399.dtsi +0 -1
-                      <&cru ACLK_USB3OTG0>, <&cru

ACLK_USB3_RKSOC_AXI_PERF>,

Quoted 38 lines
arch/arm/dts/rk3399.dtsi +15 -21
-                      <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-             clock-names = "ref_clk", "suspend_clk",
-                           "bus_clk", "aclk_usb3_rksoc_axi_perf",
-                           "aclk_usb3", "grf_clk";
-             resets = <&cru SRST_A_USB3_OTG0>;
-             reset-names = "usb3-otg";
+     dwc3_typec0: usb at fe800000 {
+             compatible = "rockchip,rk3399-xhci";
+             reg = <0x0 0xfe800000 0x0 0x100000>;
              status = "disabled";
+             snps,dis-enblslpm-quirk;
+             snps,phyif-utmi-bits = <16>;
+             snps,dis-u2-freeclk-exists-quirk;
+             snps,dis-u2-susphy-quirk;
 
-             usbdrd_dwc3_0: dwc3 {
-                     compatible = "snps,dwc3";
-                     reg = <0x0 0xfe800000 0x0 0x100000>;
-                     interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
-                     dr_mode = "otg";
-                     phys = <&u2phy0_otg>, <&tcphy0_usb3>;
-                     phy-names = "usb2-phy", "usb3-phy";
-                     phy_type = "utmi_wide";
-                     snps,dis_enblslpm_quirk;
-                     snps,dis-u2-freeclk-exists-quirk;
-                     snps,dis_u2_susphy_quirk;
-                     snps,dis-del-phy-power-chg-quirk;
-                     snps,dis-tx-ipgap-linecheck-quirk;
-                     power-domains = <&power RK3399_PD_USB3>;
-                     status = "disabled";
+             #address-cells = <2>;
+             #size-cells = <2>;
+             hub {
+                     compatible = "usb-hub";
+                     usb,device-class = <USB_CLASS_HUB>;
+             };
+             typec_phy0 {
+                     compatible = "rockchip,rk3399-usb3-phy";

arch/arm/dts/rk3399.dtsi

Quoted 10 lines
arch/arm/dts/rk3399.dtsi +1 -6
+                     reg = <0x0 0xff7c0000 0x0 0x40000>;
              };
      };
 
-     dwc3_typec1: usbdrd3_1: usb at fe900000 {
-             compatible = "rockchip,rk3399-dwc3";
-             #address-cells = <2>;
-             #size-cells = <2>;
-             ranges;
-             clocks = <&cru SCLK_USB3OTG1_REF>, <&cru

SCLK_USB3OTG1_SUSPEND>,

arch/arm/dts/rk3399.dtsi line 391

Quoted 1 line
arch/arm/dts/rk3399.dtsi +0 -1
-                      <&cru ACLK_USB3OTG1>, <&cru

ACLK_USB3_RKSOC_AXI_PERF>,

Quoted 32 lines
arch/arm/dts/rk3399.dtsi +9 -21
-                      <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>;
-             clock-names = "ref_clk", "suspend_clk",
-                           "bus_clk", "aclk_usb3_rksoc_axi_perf",
-                           "aclk_usb3", "grf_clk";
-             resets = <&cru SRST_A_USB3_OTG1>;
-             reset-names = "usb3-otg";
+     dwc3_typec1: usb at fe900000 {
+             compatible = "rockchip,rk3399-xhci";
+             reg = <0x0 0xfe900000 0x0 0x100000>;
              status = "disabled";
+             snps,dis-enblslpm-quirk;
+             snps,phyif-utmi-bits = <16>;
+             snps,dis-u2-freeclk-exists-quirk;
+             snps,dis-u2-susphy-quirk;
 
-             usbdrd_dwc3_1: dwc3 {
-                     compatible = "snps,dwc3";
-                     reg = <0x0 0xfe900000 0x0 0x100000>;
-                     interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
-                     dr_mode = "otg";
-                     phys = <&u2phy1_otg>, <&tcphy1_usb3>;
-                     phy-names = "usb2-phy", "usb3-phy";
-                     phy_type = "utmi_wide";
-                     snps,dis_enblslpm_quirk;
-                     snps,dis-u2-freeclk-exists-quirk;
-                     snps,dis_u2_susphy_quirk;
-                     snps,dis-del-phy-power-chg-quirk;
-                     snps,dis-tx-ipgap-linecheck-quirk;
-                     power-domains = <&power RK3399_PD_USB3>;
-                     status = "disabled";
+             #address-cells = <2>;
+             #size-cells = <2>;

arch/arm/dts/rk3399.dtsi line 393

Quoted 10 lines
arch/arm/dts/rk3399.dtsi +7 -0
+             hub {
+                     compatible = "usb-hub";
+                     usb,device-class = <USB_CLASS_HUB>;
+             };
+             typec_phy1 {
+                     compatible = "rockchip,rk3399-usb3-phy";
+                     reg = <0x0 0xff800000 0x0 0x40000>;
              };
      };
 
Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot