Skip to contentSkip to conversation

arm64: rockchip: dts: sapphire: Fix USB3 Type-C.

PATCH Superseded Vicente Bergas 2 participants 4 messages Jun 15, 2019 – Jun 27, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: rockchip: dts: sapphire: Fix USB3 Type-C.

Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in:
1.- The memory stick LED lights on and kernel reports:

[    4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4
[    5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 GB/1.87 GiB)
[    5.906860] sd 0:0:0:0: [sdb] Write Protect is off
[    5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00
[    5.909122] sd 0:0:0:0: [sdb] No Caching mode page found
[    5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[    5.951585]  sdb: sdb1
[    5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk
2.- 4 seconds later the memory stick LED lights off and kernel reports:
[    9.082822] phy phy-ff770000.syscon:[email protected]: charger = USB_DCP_CHARGER
3.- After a minute the kernel reports:
[   71.666761] usb 5-1: USB disconnect, device number 2

It has been checked that, although the LED is off, VBUS is present.

If, instead, the dr_mode is changed to host and the phy-supply changed accordingly, then it works. It has only been tested in host mode.

---

Hi Heiko,
before i did test:
a.- applying only the first part of the patch: reg-always-on b.- applying the full patch
but did not test:
c.- applying only the last part of the patch, as you suggest Now i have tested (c) and it also works, so, here is v2.

Thanks for reviewing!

Regards,
Vicenç.

arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0 -0
index 04623e52ac5d..72000a7b666f 100644
@@ -565,12 +566,11 @@
	status = "okay";

	u2phy0_otg: otg-port {
-		phy-supply = <&vcc5v0_typec0>;
		status = "okay";
	};

	u2phy0_host: host-port {
-		phy-supply = <&vcc5v0_host>;
+		phy-supply = <&vcc5v0_typec0>;
		status = "okay";
	};
};

@@ -620,7 +620,7 @@

&usbdrd_dwc3_0 {
	status = "okay";

- dr_mode = "otg";
+ dr_mode = "host";
};

&usbdrd3_1 {

Signature · 7 lines
2.21.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

A message that is not in the archive (sent off-list or not yet received): 4b759fa0-8fe9-4686-b5a7-b7a4e4564419-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

Hi Vicente,

Am Samstag, 15. Juni 2019, 02:31:01 CEST schrieb Vicente Bergas:

Quoted 19 lines

Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in:
1.- The memory stick LED lights on and kernel reports:

[    4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4
[    5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 
GB/1.87 GiB)
[    5.906860] sd 0:0:0:0: [sdb] Write Protect is off
[    5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00
[    5.909122] sd 0:0:0:0: [sdb] No Caching mode page found
[    5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[    5.951585]  sdb: sdb1
[    5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk
2.- 4 seconds later the memory stick LED lights off and kernel reports:
[    9.082822] phy phy-ff770000.syscon:[email protected]: charger = 
USB_DCP_CHARGER
3.- After a minute the kernel reports:
[   71.666761] usb 5-1: USB disconnect, device number 2
Quoted 6 lines

It has been checked that, although the LED is off, VBUS is present.

If, instead, the dr_mode is changed to host and the phy-supply changed accordingly, then it works. It has only been tested in host mode.

"git am" complains about the patch being broken in "line 21", so I guess your Google mailer somehow mangled the patch.

Can you resend in a fixed way please (maybe with git send-email)?

Thanks
Heiko

Quoted 44 lines

---

Hi Heiko,
before i did test:
a.- applying only the first part of the patch: reg-always-on b.- applying the full patch
but did not test:
c.- applying only the last part of the patch, as you suggest
Now i have tested (c) and it also works, so, here is v2.

Thanks for reviewing!

Regards,
Vicenç.

arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +2 -3
index 04623e52ac5d..72000a7b666f 100644
@@ -565,12 +566,11 @@
 	status = "okay";
 
 	u2phy0_otg: otg-port {
-		phy-supply = <&vcc5v0_typec0>;
 		status = "okay";
 	};
 
 	u2phy0_host: host-port {
-		phy-supply = <&vcc5v0_host>;
+		phy-supply = <&vcc5v0_typec0>;
 		status = "okay";
 	};
 };
@@ -620,7 +620,7 @@
 
 &usbdrd_dwc3_0 {
 	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
 };
 
 &usbdrd3_1 {
#3 lore raw

PATCH v2 1/1 arm64: rockchip: dts: sapphire: Fix USB3 Type-C.

Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in:
1.- The memory stick LED lights on and kernel reports:

[    4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4
[    5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 GB/1.87 GiB)
[    5.906860] sd 0:0:0:0: [sdb] Write Protect is off
[    5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00
[    5.909122] sd 0:0:0:0: [sdb] No Caching mode page found
[    5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[    5.951585]  sdb: sdb1
[    5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk
2.- 4 seconds later the memory stick LED lights off and kernel reports:
[    9.082822] phy phy-ff770000.syscon:[email protected]: charger = USB_DCP_CHARGER
3.- After a minute the kernel reports:
[   71.666761] usb 5-1: USB disconnect, device number 2

It has been checked that, although the LED is off, VBUS is present.

If, instead, the dr_mode is changed to host and the phy-supply changed accordingly, then it works. It has only been tested in host mode.

---
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Quoted 9 lines · Heiko Stuebner

Hi Vicente,

Am Samstag, 15. Juni 2019, 02:31:01 CEST schrieb Vicente Bergas:

Quoted 5 lines

Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in:
1.- The memory stick LED lights on and kernel reports: ...

Quoted 4 lines

"git am" complains about the patch being broken in "line 21", so I guess your Google mailer somehow mangled the patch.

Can you resend in a fixed way please (maybe with git send-email)?

Resent, sorry for the inconvenience.

Quoted 2 lines

Thanks
Heiko

arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +2 -3
index 04623e52ac5d..1bc1579674e5 100644
@@ -565,12 +565,11 @@
 	status = "okay";
 
 	u2phy0_otg: otg-port {
-		phy-supply = <&vcc5v0_typec0>;
 		status = "okay";
 	};
 
 	u2phy0_host: host-port {
-		phy-supply = <&vcc5v0_host>;
+		phy-supply = <&vcc5v0_typec0>;
 		status = "okay";
 	};
 };
@@ -620,7 +619,7 @@
 
 &usbdrd_dwc3_0 {
 	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
 };
 
 &usbdrd3_1 {
Signature · 1 line
2.22.0

A message that is not in the archive (sent off-list or not yet received): 20190627131228.5223-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#5 lore raw

Am Donnerstag, 27. Juni 2019, 15:12:28 CEST schrieb Vicente Bergas:

Quoted 17 lines

Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in:
1.- The memory stick LED lights on and kernel reports:

[    4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4
[    5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 GB/1.87 GiB)
[    5.906860] sd 0:0:0:0: [sdb] Write Protect is off
[    5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00
[    5.909122] sd 0:0:0:0: [sdb] No Caching mode page found
[    5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through
[    5.951585]  sdb: sdb1
[    5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk
2.- 4 seconds later the memory stick LED lights off and kernel reports:
[    9.082822] phy phy-ff770000.syscon:[email protected]: charger = USB_DCP_CHARGER
3.- After a minute the kernel reports:
[   71.666761] usb 5-1: USB disconnect, device number 2
Quoted 6 lines

It has been checked that, although the LED is off, VBUS is present.

If, instead, the dr_mode is changed to host and the phy-supply changed accordingly, then it works. It has only been tested in host mode.

applied for 5.3

Thanks
Heiko