I can successfully suspend my Apalis IMX8 board and resume after a timeout using these commands:
echo +5 > /sys/class/rtc/rtc1/wakealarm; echo deep > /sys/power/mem_sleep; echo mem > /sys/power/state
(as described in Suspend/Resume (Linux)).
The described command is actually meant for the Verdin iMX8 mini - but also works for the Apalis iMX8.
I would additionally like it to resume when there is UART activity on ttyACM0.
I was checking the commands on the web site and it looks like there is a possibility using this command:
echo enabled > /sys/class/tty/ttymxc0/power/wakeup;
After trying it out, it looks like this is specifically for the Verdin iMX8 mini. There is no directory /sys/class/tty/ttymxc0 on the Apalis board. Also there is no file called “wakeup” in the folder /sys/class/tty/ttyACM0/power/.
In short: Is there any possibility to resume from UART (ttyACM0) on the Apalis iMX8?