Setup Linux Wake-On-LAN on RK3568 Platform

Forlinx

Apr 23, 2023
107
Joined
Apr 23, 2023
Messages
107
1. GPIO Wake-up


The supported system sleep modes can be viewed with cat /sys/power/state.

file.php


To achieve functionality similar to the 6ul, use the "wake-up" function in ''gpio-keys.c''. Add a GPIO node specifying the wake-up GPIO pin. During sleep, a message indicates only GPIO0 supports wake-up; testing confirmed only GPIO0 can wake up.

file.php


file.php


cat /proc/interrupts indicates that the interrupt for key1 has been successfully registered.

Testing has been conducted to verify that both freeze and mem modes can wake up.

file.php



2. Network Wake-up


Firstly, NIC support for Wake-on-LAN is required. Use the ethtool tool to check NIC information. The default setting for wake-on is ''d'', which means network wake-up is disabled. The ''supports Wake-on'' option is ''ug'', where ''u'' allows any unicast data and ''g'' allows magic packets. The wake-on can be set to ''ug'' for eth0 using the following command: ''ethtool -s eth0 wol ug''.

file.php


file.php


Test for u:

file.php


echo freeze > /sys/power/state//Enter freeze sleep mode

Waking up can be achieved by pinging the IP of this network port in any local area network.

Test for g:

ethtool -s eth0 wol g//Set wake-on to g

At this point, the ping fails, but the mac can be specified through the wol to wake up.

file.php


Testing revealed that Wake-On-LAN is only possible in freeze mode. Observations showed that after entering mem mode, the network LED does not light up; whereas, in freeze mode, the network LED continues to blink normally. This indicates that the PHY (physical layer) is not functioning in mem mode, and therefore, it cannot trigger an interrupt for wake-up.

file.php


file.php


It is also possible that this interrupt pin is connected to gpio3 _ A2.

file.php


 
Top