Jump to content
Electronics-Lab.com Community

Setup Linux Wake-On-LAN on RK3568 Platform


Recommended Posts

1. GPIO Wake-up

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

f_e3686994a73cb877b5601b539050fced&t=png

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.

f_eb62601b03a1f6d4164ac761ada7932e&t=png

f_1be51157cb08e96c7e991b4ddce6a485&t=png

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.

f_162eddf82f5646772ffec137b9739c36&t=png

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''.

f_2d6c010ae8a0385ac915e9fb43a2a81e&t=png

f_d90da1e1633658cae296bf926b0aaef2&t=png

Test for u:

f_5e008d1ba856848bba0ac46c9fc6c6e9&t=png

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.

f_7a707db6fb6d1ab24975e2a0d89aec37&t=png

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.

f_0f0dacfbc589a59ea5a99385e1c9e0fa&t=png

f_7c5d1cc830c27a08445fb59716b02511&t=png

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

f_1a07125418996b9ff950f0f3f36a0330&t=png

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...