Skip to contentSkip to conversation

Chipidea: TI-NSPIRE USB OTG hardware does not support high speed and must connect at full speed

PATCH In review Daniel Tang 2 participants 3 messages Jan 4, 2015 – Jan 9, 2015

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

PATCH 1/2 Chipidea: TI-NSPIRE USB OTG hardware does not support high speed and must connect at full speed

---
 drivers/usb/chipidea/ci_hdrc_zevio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_zevio.c +1 -1
index d976fc1..1264de5 100644
@@ -18,7 +18,7 @@
 
 static struct ci_hdrc_platform_data ci_hdrc_zevio_platdata = {
 	.name			= "ci_hdrc_zevio",
-	.flags			= CI_HDRC_REGS_SHARED,
+	.flags			= CI_HDRC_REGS_SHARED | CI_HDRC_FORCE_FULLSPEED,
 	.capoffset		= DEF_CAPOFFSET,
 };
 
Signature · 1 line
2.1.3
#1 lore raw

PATCH 2/2 Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data

PORTSC_PFSC is not set on entering host mode which means the USB OTG controller will attempt to enumerate USB devices at high speed even when the CI_HDRC_FORCE_FULLSPEED flag is set in the platform data.

This patch ensures it is set right before host mode operations begin if needed.

---
 drivers/usb/chipidea/host.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/chipidea/host.c +3 -0
index c1694cf..f106d25 100644
@@ -132,6 +132,9 @@ static int host_start(struct ci_hdrc *ci)
 	if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
 		hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
 
+	if (ci->platdata->flags & CI_HDRC_FORCE_FULLSPEED)
+		hw_write(ci, OP_PORTSC, PORTSC_PFSC, PORTSC_PFSC);
+
 	return ret;
 
 put_hcd:
Signature · 1 line
2.1.3
#2 lore raw

Re: [PATCH 2/2] Chipidea: Set connect-at-fullspeed bit when entering host mode if CI_HDRC_FORCE_FULLSPEED is set in the platform data

Quoted 28 lines · Daniel Tang

PORTSC_PFSC is not set on entering host mode which means the USB OTG controller will attempt to enumerate USB devices at high speed even when the CI_HDRC_FORCE_FULLSPEED flag is set in the platform data.

This patch ensures it is set right before host mode operations begin if needed.

---
 drivers/usb/chipidea/host.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/chipidea/host.c +3 -0
index c1694cf..f106d25 100644
@@ -132,6 +132,9 @@ static int host_start(struct ci_hdrc *ci)
 	if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
 		hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
 
+	if (ci->platdata->flags & CI_HDRC_FORCE_FULLSPEED)
+		hw_write(ci, OP_PORTSC, PORTSC_PFSC, PORTSC_PFSC);
+
 	return ret;
 
 put_hcd:
Signature · 1 line
2.1.3

looks ok, will push

Signature · 2 lines
Best Regards,
Peter Chen