Appendix · reference

GPIO keys (power, ring, privacy switches)

Discrete buttons routed through gpiokeys(4).

Identity

PartPower button + ring-indicator key + 6 hardware kill switches
RoleDiscrete-GPIO input events to evdev
Bus / addressgpiokeys(4) — FDT-described GPIO inputs
GPIO / IRQPower key on PMIC IRQ line; ring indicator on dedicated GPIO; privacy switches are passive (cut signal traces, no software pin)
Datasheetnone — discrete switches
Pine64 wikiPinePhone Pro Hardware
Schematicsheets 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

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