AnsweredAssumed Answered

Wakeup from USB on i.MX6S

Question asked by ralf2 on Feb 19, 2018
Latest reply on Feb 20, 2018 by ralf2

I am new to this community, so HI EVERYONE .

 

I am working on an i.MX6S (Solo, without X or Lite) attached to a module attached to a carrier board. It's running Yocto 2.2.3.

 

I am trying to wake it up from one of the available standby states (freeze/mem/standby) by plugging in an USB Device.

 

To do so, I have tried to simply enable all available wakeup devices by executing

"for i in $(find /sys/devices/soc0/ -name wakeup);do echo enabled > $i;done", which should enable 

"find /sys/devices/soc0/ -name wakeup
/sys/devices/soc0/gpio-keys/power/wakeup
/sys/devices/soc0/soc/1ffc000.pcie/pci0000:00/0000:00:00.0/power/wakeup
/sys/devices/soc0/soc/2000000.aips-bus/20c9000.usbphy/power/wakeup
/sys/devices/soc0/soc/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup
/sys/devices/soc0/soc/2000000.aips-bus/20ca000.usbphy/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/21f4000.serial/tty/ttymxc4/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/21ec000.serial/tty/ttymxc2/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/21e8000.serial/tty/ttymxc1/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/21f0000.serial/tty/ttymxc3/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184000.usb/power/wakeup
/sys/devices/soc0/soc/2100000.aips-bus/2184000.usb/ci_hdrc.0/power/wakeup" (first one has already been enabled by default, it's the board's wake button)

 

This is the method I've found in several documents** about wakeup on linux in general or, more specific, on Yocto on i.MX6.

But for some reason, it doesn't wake up from freeze or standby when I plug in/out an usb stick or keyboard or press a button on that keybard whose additional wakeup devices I've enabled previously (it adds some on connect).

For "mem" the behaviour is strange: As long as "/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/power/wakeup" is enabled, the board doesn't go asleep (for a noteworthy time). The LEDs just flicker and no "Suspended for *.* seconds" message is given. Also if no external usb devices are connected.

Wakeup_on_serial_Input on the other hand works as expected after "echo enabled > /sys/devices/soc0/soc/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup", from freeze/mem/standby.

 

Do you have any idea what's my mistake or what is wrong and how I can make Wakeup_On_USB_Device_Plug_In work?

 

Best regards,

Ralf

 

** The most promising documents were https://community.nxp.com/thread/446856#comments including an i.MX Reference Manual and testing scripts for wake on usb that do the same as I do, and Wakeup from USB on mx6 — Linux USB , a technician of our board/module supplier sent to me. Both basically describe to echo-pipe "enabled" into the wakeup files of several devices.

Outcomes