However, I was not able to configure the UART for wake up as the following path does not exist in the rootfs. Would like to know how to fix it?
Please note that the article you are refering to is not applicable for Apalis iMX6. Have a look at this article for information on available tty ports on Apalis iMX6. To enable wakeup via UART port:
# echo enabled > /sys/class/tty/ttymxc0/power/wakeup
Also, I was not able to find any info on how to configure the ethernet to detect a wake-on-lan (magic packet) signal. I am using the wakeonlan utility from Ubuntu host to send the magic packet to the eval board.
By default wake-on-lan is not enabled, one will need to enable it in device tree. Have a look at the device tree bindings documentation here. You can try enabling wake-on-lan support, changes required to enable wake-on-lan:
diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index b621e8b..26c4e40 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -281,6 +281,7 @@
phy-handle = <ðphy>;
phy-reset-duration = <10>;
phy-reset-gpios = <&gpio1 25 1>;
+ fsl,magic-packet;
status = "okay";
mdio {
Also by default in userspace the wake-on-lan is disabled, to enable the wake-on-lan run:
# ethtool -s eth0 wol g
To enable the eth0 as wakeup source:
# echo enabled > /sys/class/net/eth0/power/wakeup
Tested using ‘etherwake’ tool.
root@apalis-imx6:~# echo mem > /sys/power/state
[ 1075.714184] mxc_sdc_fb fb.20: 640x480 h_sync,r,l: 96,16,48 v_sync,l,u: 2,10,33 pixclock=25174000 Hz
[ 1075.759690] PM: Syncing filesystems ...
[ 1075.911921] done.
[ 1075.919630] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 1075.930513] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1076.103283] PM: suspend of devices complete after 158.399 msecs
[ 1076.109286] PM: suspend devices took 0.170 seconds
[ 1076.114742] PM: late suspend of devices complete after 0.638 msecs
[ 1076.121830] PM: noirq suspend of devices complete after 0.838 msecs
[ 1076.128153] Disabling non-boot CPUs ...
[ 1076.133044] CPU1: shutdown
[ 1076.137375] CPU2: shutdown
[ 1076.141485] CPU3: shutdown
Sending magic-packet using ‘etherwake’:
$ sudo etherwake -i enp12s0 -D 00:14:2D:4B:16:03
The target station address is 0:14:2d:4b:16:3.
Packet is 00 14 2d 4b 16 03 00 14 2d 4b 16 03 08 42 ff ff ff ff ff ff 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03 00 14 2d 4b 16 03.
Sendto worked ! 116.
On target:
[ 1076.145037] Enabling non-boot CPUs ...
[ 1076.149403] CPU1: Booted secondary processor
[ 1076.149740] CPU1 is up
[ 1076.156984] CPU2: Booted secondary processor
[ 1076.157323] CPU2 is up
[ 1076.164485] CPU3: Booted secondary processor
[ 1076.164911] CPU3 is up
[ 1076.172112] PM: noirq resume of devices complete after 0.494 msecs
[ 1076.179174] PM: early resume of devices complete after 0.547 msecs
[ 1076.189938] mxc_sdc_fb fb.22: 800x480 h_sync,r,l: 20,60,40 v_sync,l,u: 10,10,10 pixclock=27000000 Hz
[ 1076.221409] mxc_sdc_fb fb.23: 640x350 h_sync,r,l: 64,32,96 v_sync,l,u: 3,32,60 pixclock=31500000 Hz
[ 1076.365174] PM: resume of devices complete after 179.727 msecs
[ 1076.374574] PM: resume devices took 0.190 seconds
[ 1076.381866] Restarting tasks ... done.
root@apalis-imx6:~# [ 1076.536719] ata1: SATA link down (SStatus 0 SControl 300)
[ 1077.257890] libphy: 2188000.ethernet:07 - Link is Up - 1000/Full