Regarding wakeup source, here is a summary for HiKey:
UART and USB wakeup are not possible for HiKey. Their wakeup logic
was blocked by Hi6220 MCU in silicon way. MCU firmware cannot
workaround it either. We didn’t see any way to change that.
Good news is: GPIO pins on HiKey Low-speed expansion port can be
used as wakeup source. You need to run these scripts to enable that.
See below. To wakeup the board, just give some voltage jitter to
any of these GPIOs.
== to wakeup by GPIO:
/* 488: GPIO2_0, 490: GPIO2_2, /
/ 492: GPIO2_4, 495: GPIO2_7 /
/ GPIO2_1, GPIO2_3 busy */
echo 488 > /sys/class/gpio/export
echo 490 > /sys/class/gpio/export
echo 492 > /sys/class/gpio/export
echo 495 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio488/direction
echo both > /sys/class/gpio/gpio488/edge
echo in > /sys/class/gpio/gpio490/direction
echo both > /sys/class/gpio/gpio490/edge
echo in > /sys/class/gpio/gpio492/direction
echo both > /sys/class/gpio/gpio492/edge
echo in > /sys/class/gpio/gpio495/direction
echo both > /sys/class/gpio/gpio495/edge