How to detect that power button is pressed down

I’d like to know how to detect that the power button is pressed down in software, for example,
in bootloader, such that the bootloader can go into fastboot(update) mode if pressing down is detected.

Hi xuzhongxing,

This may help you:wink:

1 Like

Thank you numbqq. I’m looking at it.

PS: where can I find documentation explaining the semantics of GPIOAO_2. The datasheet of amlogic s912 just does not have any explanations on these things.

I think I found the power key -> GPIOAO_2 corresponding information from the khadas vim2 schematic graph.