Wake On Lan on Apalis TK1

Now that LP1 is supported on Apalis TK1 (on the toradex_tk1_l4t_r21.5-next branch), I am trying to get the TK1 to wake up using a magic packet (Wake-on-LAN). I was told that hardware wise it should work on the Apalis TK1.

On the software side, ethtool shows that WOL is indeed supported, and defaults to the waking up on magic packet g.

ubuntu@tegra-ubuntu:~$ sudo ethtool eth0
Settings for eth0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	...
	Supports Wake-on: pumbg
	       Wake-on: g
ubuntu@tegra-ubuntu:~$

Then I putting the TK1 into LP1

cd /sys/power
echo lp1 > suspend/mode
echo mem > state

I try to send the magic packet from another machine using wakeonlan <MAC ADDRESS> , but the TK1 doesn’t seem to wake up.

I am wondering if I’m missing a step. Does the wakeup pin connected to the Intel I210 have to be configured to enable it to wakeup the TK1 before putting it into LP1?

Please try with this patch

Thanks @dominik.tx. It work!