NXP iMX8MP: recover from USB over-current condition

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NXP iMX8MP: recover from USB over-current condition

331 Views
pierluigi_p
Contributor V

Dear NXP support,

is there any known SW way to recover from USB over-current condition ?

Trying the following suggestions does not help

https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line

Thanks

Best Regards

Pier

Labels (2)
Tags (2)
0 Kudos
Reply
7 Replies

241 Views
Shay1
Contributor I

thank you
Where can I find the memory map to locate the memory addresses for these registers? Thank you

0 Kudos
Reply

225 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You can find that information on reference manual.

Best regards.

0 Kudos
Reply

307 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

To reset any USB device/module, one can refer to section 4.9.8 How to Close the USB Child Device Power from Linux reference manual.

echo auto > /sys/bus/usb/devices/1-1/power/control //close the power

echo on > /sys/bus/usb/devices/1-1/power/control //re-enable the device

Best regards.

0 Kudos
Reply

281 Views
Shay1
Contributor I

Hi, Thank you for your response.

 

The problem is that once the usb is "dead", this command no longer works.

(file not found).

 

The only thing that helps at that point is to use the reboot command.

 

Thanks

0 Kudos
Reply

267 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Maybe could be helpful control the device using the "Global USB2 PHY Configuration Register (GUSB2PHYCFG)" by setting and resetting bit 31[PHYSOFTRST] or use USB Command Register (USBCMD) bit7[LHCRST].

The next 2 registers bits are able to put USB in reset mode.

- Global USB 3.0 PIPE Control Register (GUSB3PIPECTL) bit31[PHYSoftRst].

- Global Core Control Register (GCTL) bit11[CORESOFTRESET] .

Also, there is a PHY control register in the section "11.2.5.2 USB3_GLUE register descriptions". You can use "PHY Controller 1 (PHY_CTRL1)" register bit0 [PHY_RESET].

It is not recommended to change this bitfields "manually", since these bits are all interdependent and changing any of the bits we can expect a change in other bits depending on that.

It is prefer to take a reference of the predefined sequence that should be followed to reset or power the USB. Please refer to "Table 11-3. Power-On or Soft Reset Register Initialization" of reference manual for that sequence.

Best regards.

0 Kudos
Reply

107 Views
Shay1
Contributor I

Hi,

I looked at PORTSC_20 before and after this issue occurred.
It changed from 0x00000E03 to 0x0C000EE1

It seems that enabled/disabled bit for usb port was turned off.
Also Wake on Overcurrent Enable and Wake on Disconnect Enable changed from 0 to 1.

(Also link state bits 5,6,7 changed from 0 to 1.

Could you please help me better understand the cause for this issue, given this new information I discovered?
Thank you

0 Kudos
Reply

116 Views
Shay1
Contributor I

Hi, Thank you for your elaborate response.

I have tried all the resets you suggested.

They indeed reset the USB when it's functional, but still nothing helps me recover from this "Dead" USB scenario, except for reboot. Reset does nothing when USB is "Dead".
In fact, one of the times I used the reset command, one of the USBs became "Dead" (disappeared from lsusb completely), and only worked again after reboot.

Do you have any further ideas or suggestions for solutions / workarounds for this issue, other than complete reboot?

 

Thank you

0 Kudos
Reply