Thanks.
1. I believe you forgot to add 5 to the final result, so the pin is 29.
2. I'm using Armbian and there's no
/sys/class/gpio directory (no sysfs for gpio), so the only way to access gpio is to use
gpiod tool. It's miserable, I know

Long story short - I've found a way to read the status of the key.
First - this button is defined in device overlay as
button@1 located in
gpio-keys section. Its label is
K1 which pointed me to the wrong direction because in the doc
K1 is Power button and User button is named
K5. I realized that this definition in dtb is actually for User button only because of the successful test (see below).
Second - every time I was trying to read the state of the button using
gpioget, I was getting the message that the resource is busy and cannot be read. Well... I've tried a lot of different things, rebooted the server dozen of times and then... YES

I could read the state ONLY after unloading
gpio_keys kernel module:
Code: Select all
sudo rmmod gpio_keys
while true; do sudo gpioget gpio0 29; sleep 1; done
1
1
...
1
0 <--- key pressed
0
...
0
1 <--- key released
1 - key released
0 - key pressed (and hold)
I wonder if there is any other method of getting the state without removing kernel module but rather to make use of them... From CLI at least...