USB gets disconnected on entering suspend mode and delays resuming in imx6slevk

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

USB gets disconnected on entering suspend mode and delays resuming in imx6slevk

832 Views
sujay1
Contributor V

I'm using an imx6slevk board with yocto bsp, I've configured power button single press to enter suspend mode in systemd.

I notice from the logs that every time the board enters suspend mode the usb hub gets disconnected and while resuming it causes a delay to resume normal operation.

Here is the log I got while exiting suspend mode.

Suspended for 4.944 seconds


PM: resume of devices complete after 80.627 msecs
imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
imx-spdif sound-spdif: snd_soc_register_card failed: -517
PM: resume devices took 0.080 seconds
Restarting tasks ...
done.
usb 2-1: new high-speed USB device number 4 using ci_hdrc
usb 2-1: device no response, device descriptor read/64, error -71
usb 2-1: device no response, device descriptor read/64, error -71
usb usb2-port1: attempt power cycle
usb 2-1: new high-speed USB device number 5 using ci_hdrc
usb 2-1: device no response, device descriptor read/64, error -71
usb 2-1: device no response, device descriptor read/64, error -71
usb usb2-port1: unable to enumerate USB device

How can I prevent usb from getting disconnected when the device is suspended?

Labels (1)
2 Replies

724 Views
igorpadykov
NXP Employee
NXP Employee

Hi Sujay

one can look at ERR004535 USB: USB suspend and resume flow clarifications

Chip Errata for the i.MX 6SoloLite - Errata

and change usb driver so PHY was not put into Low Power Suspend mode,

allowing more faster wake up times.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

724 Views
sujay1
Contributor V

Hi Igor

Thanks for the reply.

According to the document I'm to 

1. Set the PORTSC1.PHCD bit
2. Set all bits in the USBPHY_PWD register
3. Set the USBPHY_CTRL.CLKGATE bit

in order to enter low power mode.

I found the driver file in drivers/usb/phy/phy-mxs-usb.c 

where in the function mxs_phy_shutdown(...) 

I commented

writel(0xffffffff, phy->io_priv + HW_USBPHY_PWD);
writel(BM_USBPHY_CTRL_CLKGATE, phy->io_priv + HW_USBPHY_CTRL_SET);

Is that how we do it or am I supposed to pass a different value to those registers?

0 Kudos