Identity
| Part | Power button + ring-indicator key + 6 hardware kill switches |
| Role | Discrete-GPIO input events to evdev |
| Bus / address | gpiokeys(4) — FDT-described GPIO inputs |
| GPIO / IRQ | Power key on PMIC IRQ line; ring indicator on dedicated GPIO; privacy switches are passive (cut signal traces, no software pin) |
| Datasheet | none — discrete switches |
| Pine64 wiki | PinePhone Pro Hardware |
| Schematic | sheets 12–14 (kill switch network + power key) |
Status — ● working
The power button generates KEY_POWER and the ring-indicator pin generates KEY_WAKEUP through evdev; both are picked up by Sway and Hyprland. omfreebdy’s Sway config binds XF86PowerOff to the screen-toggle script, so a single press blanks the panel and a second press wakes it. The ring-indicator key has no userland policy yet — it shows up in evtest but no action is bound.
The six hardware kill switches (modem, WiFi, microphone, cameras front/rear, headphone-jack/UART) are listed for completeness but have no software representation: each one is a physical switch on the back-cover sticker that breaks the relevant power or signal trace upstream of the SoC. Switch #6 (UART/headphone) must be ON for serial console to work — the labels on the case are inverted from how you’d expect, ON = enabled.
Driver
- Our tree:
patches/sys/dev/gpio/gpiokeys_codes.c.patch— adds the Linux-style keycode entries (KEY_POWER,KEY_WAKEUP, etc.) that FreeBSD’s stock table is missing, so the FDTlinux,code = <KEY_POWER>properties resolve correctly. - Linux mainline:
drivers/input/keyboard/gpio_keys.c - FreeBSD upstream:
sys/dev/gpio/gpiokeys.c
gpiokeys(4) walks the FDT for gpio-keys compatible nodes and registers an evdev device per child node. The PinePhone Pro DTS has two such children — a power-key node consuming the RK818 PMIC’s PWRON IRQ and a ring-indicator node on a discrete GPIO. Each child carries a linux,code cell that selects the evdev keycode; our gpiokeys_codes.c patch fills in the table entries those property values index into.
The PineTab2 reuses the same FDT parent for two switch-style inputs,
but those nodes carry linux,input-type = <EV_SW> instead of the
default EV_KEY. That tablet-specific path is tracked separately in
PineTab2 GPIO switches.
Open work
- Decide what userland policy fires on
KEY_WAKEUPfrom the ring indicator — currently it lights upevtestand does nothing else. - Long-press handling for
KEY_POWER(force shutdown / reset menu) is not wired; today only screen toggle is bound.
Related
- Where we are now — current status snapshot, including the omfreebdy
XF86PowerOffbinding. - ADC keys (volume buttons) — sibling input subsystem for volume, on a different physical path.
- Hardware reference — full chip manifest.