How to make RockPis sleep and wake up via GPIO

How to make RockPis sleep and wake up via GPIO