Hello everyone,

I am working on an i.MX6S (Solo, not SoloLite or SoloX) 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.

I have already studied several sources including
- https://www.spinics.net/lists/linux-usb/msg135943.html (Wakeup from USB on 
mx6 in this mailing list) and
- https://community.nxp.com/thread/446856#comments (i.MX6SX - Wake up from Stop 
mode with USB at NXP).
All of the describe to pipe "enabled" into the correct wakeup-file 
corresponding to the correct device and piping "mem" (or freeze/standby) into 
the file "/sys/power/state".

The system goes into standby wthout problems and can be woken up by its 
wake-button, which is enabled by default as 
"/sys/devices/soc0/gpio-keys/power/wakeup".
After enabling 
"/sys/devices/soc0/soc/2000000.aips-bus/2000000.spba-bus/2020000.serial/tty/ttymxc0/power/wakeup",
 I was also able to wake it up by sending any serial input.

But I didn't manage so far to wake it up by plugging in an USB-Stick or an 
USB-Keyboard or pressing a key on that keyboard when it's already plugged in 
(which creates a new device with wakeup capability, I did also enable).
Most sources describe enabling the wakeup capability of several usb-devices to 
make it work - so I simply enabled all of them by
"for i in $(find /sys/devices/soc0/ -name wakeup);do echo enabled > $i;done"
which enables the following devices:
"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"
(the first one was already enabled, of course).

After doing so, The system didn't wake up from standby or freeze, but woke up 
immediately from "mem" state. (The LEDs just flickered, no "Suspended for *.* 
seconds" message was given. The time given in "PM: noirq resume of devices 
complete after *.* msecs" was significantly shorter (266 vs 10 msecs).)
I found that this immediate wakeup is caused by 
"/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/power/wakeup" - disabling 
it stopped the board from immediately waking up from mem state.
This immediate-wakeup-device also wakes the system when nothing is plugged in.

A reply by Peter Chen (https://www.spinics.net/lists/linux-usb/msg135994.html) 
to the mailing list thread I've referenced above also tells me, that enabling 
the wakeup capability of a device should stop it from powering down when 
entering any standby state (it needs to be powered to wake the system). I am 
not totally sure, but I think my USB Ports are still being powered down on 
entering standby, even after enabling their wakeup.
I think so because the LED of my USB Stick and the NumLock LED of my Keyboard 
turn off in freeze/mem/standby, but I haven't measured the voltage of the ports 
yet.

Do you have any idea how I can make the Wakeup_On_USB_Device_Plug_In work?
And do you have any idea what are my mistakes or the problems with the system?
The most references I can find about usb wakeup problems are related to the 
mx6sx (SoloX) or mx6sl (SoloLite) cpu.

Best regards
and thanks in advance,
Ralf

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to