cancel
Showing results for 
Search instead for 
Did you mean: 

[ 120.369992] dwc2 49000000.usb-otg: Overcurrent change detected

ASkri.1
Senior

Hi!

After starting custom board there are a lot of similar messages in dmesg (10 per second):

[ 200.480616] dwc2 49000000.usb-otg: Overcurrent change detected

....

[ 203.598775] dwc2 49000000.usb-otg: Overcurrent change detected

USB is not working. LED on USB2514B-AEZC hub blinking several times per sec.

What is the reason for this message and how to debug this?

USB_OTG circuit have no visible hardware problems.

Thank you in advance

Looking forward for your reply

1 ACCEPTED SOLUTION

Accepted Solutions

There was no hardware issues. But there was a mix of two kind of problems - first wrong DT for USB. Second here:

https://community.st.com/s/question/0D53W000016lFbVSAU/usb2514-usb-hub-cant-connect-highspeed-devices

Wrong value for USB bias resistor.

Thank you for your support :)

View solution in original post

7 REPLIES 7
PatrickF
ST Employee

Hi,

strange behavior as USB2514 is an USB hub (so, connected to USBH) and the log message is for OTG. Maybe some mixed-up in the DT.

could you share your HW schematics around :

  • USBH (USB_DP1/DM1 pins) + USB hub (USB2514B-AEZC)
  • OTG (I assume USB_DP2/DM2, VBUS, ID)
  • VBUS generation for OTG (when in host mode)
  • STPMIC1 (if any)

could you share also your uBoot device tree.

See also

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ASkri.1
Senior

Hi, Patrick!

Thank you very much for quick reply. There are nothing special in the schematic - mostly copy-pasted from ST's reference boards:

USB_HUB connected to USB_DM1 (USB1_N pin of MCU) and USB_DP1 (USB1_P pin of MCU) pins:

0693W00000F9xROQAZ.pngOTG connector connected just to USB2_P and USB2_N connector. And currently disconnected.

OTG_VBUS (OSBO_VBUS pin of MCU) currently not connected

VBUS pin of OTG connector connected directly to 5V system power input and used to power target board.

I also suspect problems with DT because I definitely remember, that there was no problems with USB recently

with less customized images on the same board.

Please find attached DT files for my project.

PatrickF
ST Employee

Hi,

If your 5V is directly connected to OTG_VBUS pin of STPMIC1, maybe there is some conflict if STPMIC1 OTG_VBUS supply is enabled simultaneously (can explain the over-current detection by STPMIC1).

As you supply your board from OTG connector VBUS, I assume you are in 'peripheral only' on OTG with MicroB connector (similar to STM32MP157F-EV1, i.e. no Type-C nor STUSB1600 as for STM32MP157F-DK2) .

Could you try to add in &usbotg_hs node the two following lines (not 100% sure it is valid for ecosystem v3.0)

dr_mode = "peripheral";
role-switch-default-mode = "peripheral"; 

Note that supplying an MPU board from the USB (without battery in the product, aka 'BUS powered') will likely never pass USB standard certification (many issues linked to power limits during connection, boot time, etc...).

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hi, Patrick! Thank you very much for your patience. OTG_VBUS pin of STPMIC1 is not connected at all. It is connected to an unconnected pin of the interface connector. Yes, this is "peripheral only" mode for OTG, so it is normal USB Micro B connector, no USB-C and STUSB1600 Replying to your note, USB connector here is for debug purposes only. I will try to change DT files according to your suggestion, and send reply you you ASAP. Thank you for your support. �?р, 22 �?ент. 2021 г. в 15:22, ST Community :
Hi, Patrick! Finally I have assembled a new image with your settings recommended. There are following symptoms: 1. dwc2 49000000.usb-otg: Overcurrent change detected message disappeared; 2. LED connected to pin 28 (SUSP_IND/L_PWR/NON_REM0) of USB2514B-AEZC flashed once during boot; 3. There are following dmesg related to usb: [ 0.085494] usbcore: registered new interface driver usbfs [ 0.085573] usbcore: registered new interface driver hub [ 0.085640] usbcore: registered new device driver usb [ 1.337401] usbcore: registered new interface driver pegasus [ 1.337472] usbcore: registered new interface driver asix [ 1.337539] usbcore: registered new interface driver ax88179_178a [ 1.337594] usbcore: registered new interface driver cdc_ether [ 1.337663] usbcore: registered new interface driver smsc75xx [ 1.337749] usbcore: registered new interface driver smsc95xx [ 1.337804] usbcore: registered new interface driver net1080 [ 1.337857] usbcore: registered new interface driver cdc_subset [ 1.337916] usbcore: registered new interface driver zaurus [ 1.337995] usbcore: registered new interface driver cdc_ncm [ 1.340633] usbcore: registered new interface driver usb-storage [ 1.350773] usbcore: registered new interface driver usbhid [ 1.350790] usbhid: USB HID core driver [ 2.782499] vdd_usb: supplied by vin [ 2.901488] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0 [ 2.907161] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator [ 2.915061] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator [ 2.922375] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 2.933408] ehci-platform 5800d000.usbh-ehci: EHCI Host Controller [ 2.939252] ehci-platform 5800d000.usbh-ehci: new USB bus registered, assigned bus number 1 [ 2.947130] ehci-platform 5800d000.usbh-ehci: irq 58, io mem 0x5800d000 [ 2.979916] ehci-platform 5800d000.usbh-ehci: USB 2.0 started, EHCI 1.00 [ 3.016811] ohci-platform 5800c000.usbh-ohci: Generic Platform OHCI controller [ 3.022743] ohci-platform 5800c000.usbh-ohci: new USB bus registered, assigned bus number 2 [ 3.038483] ohci-platform 5800c000.usbh-ohci: irq 54, io mem 0x5800c000 [ 3.379938] usb 1-1: new high-speed USB device number 2 using ehci-platform [ 33.129861] usb33: supplied by vdd_usb 4. After inserting any USB device to USB2514B-AEZC's USB hub port LED flashes ones with following message in dmesg: [ 1391.980161] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad? [ 1392.890165] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad? [ 1392.895427] usb 1-1-port1: attempt power cycle [ 1394.140294] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad? [ 1395.050286] usb 1-1-port1: Cannot enable. Maybe the USB cable is bad? [ 1395.055548] usb 1-1-port1: unable to enumerate USB device And that's all. I'm 99'9% sure that there are no hardware issues here. Thank you in advance Looking forward for your reply �?р, 22 �?ент. 2021 г. в 15:47, Andrew Skripnikov :

Would you pull high the reset-pin of USB2514B ?

There was no hardware issues. But there was a mix of two kind of problems - first wrong DT for USB. Second here:

https://community.st.com/s/question/0D53W000016lFbVSAU/usb2514-usb-hub-cant-connect-highspeed-devices

Wrong value for USB bias resistor.

Thank you for your support :)