NXP iMX8MP: recover from USB over-current condition

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NXP iMX8MP: recover from USB over-current condition

1,365件の閲覧回数
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

ラベル(2)
タグ(2)
0 件の賞賛
返信
13 返答(返信)

242件の閲覧回数
Shay1
Contributor I

can you please share with me the sensitivity of the overcurrent detection?

So that I can design a suitable protection circuit on my side.

 

Thank you

0 件の賞賛
返信

1,275件の閲覧回数
Shay1
Contributor I

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

0 件の賞賛
返信

1,259件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You can find that information on reference manual.

Best regards.

0 件の賞賛
返信

1,341件の閲覧回数
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 件の賞賛
返信

1,315件の閲覧回数
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 件の賞賛
返信

1,301件の閲覧回数
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 件の賞賛
返信

908件の閲覧回数
Shay1
Contributor I
Hi just checking in to see if you have any response to my latest message from a month ago.
Thanks
0 件の賞賛
返信

879件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

As mentioned before is not recommended to change this bitfields "manually" since the initialization should be followed as is on documentation.

The reset process I referred is functional when the USB port is not "dead" let me check if there is a way to do it with the USB totally stopped.

Best regards.

0 件の賞賛
返信

764件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

According to internal team, if you need to perform a reset for USB module, it could be performed with USBCMD.Reset = 1 as is mentioned on reference manual section 11.2.2.10 Reset generation.

Best regards.

0 件の賞賛
返信

654件の閲覧回数
Shay1
Contributor I

Hi,
After reading section 11.2.2.10 - reset generation I have already tried and did not help.
So far only full reboot recovered this issue.

In fact, using these reset methods makes the usb device stop functioning, until a system reboot.
Do you have any further suggestions for me to restore the system from this issue, other than a reboot?

Thank you,

0 件の賞賛
返信

624件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

According to internal team, the expected behavior of over-current condition is disable USB port completely until i.MX reset to avoid any damages in the port.

Best regards.

0 件の賞賛
返信

1,141件の閲覧回数
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 件の賞賛
返信

1,150件の閲覧回数
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 件の賞賛
返信