Appendix · reference

Rockchip SARADC

On-die successive-approximation ADC — drives the volume buttons via adc-keys.

The Rockchip SARADC path is a 10-bit successive-approximation ADC. On the PinePhone Pro it reads the volume-button resistor divider on channel

  1. On PineTab2 the imported Linux DTS uses RK3566/RK3568 SARADC channel 0 for the same VOL+ / VOL- role. Both halves of that path — the SARADC provider and the adc-keys consumer — are local to this tree.

Identity

PropertyValue
BlockRK3399 / RK356x SARADC
MMIO basePPP: 0xff100000; PineTab2: inherited RK356x fe720000
Channels6 (10-bit each)
Reference1.8 V (RK_SARADC_DEFAULT_VREF_UV = 1800000)
Clock rate1 MHz (RK_SARADC_CLK_RATE)
DTS compatiblerockchip,rk3399-saradc, rockchip,rk3568-saradc
Linux driverdrivers/iio/adc/rockchip_saradc.c

PinePhone Pro channel map:

ChannelFunction
1Volume button divider (VOL+ / VOL-)
othersUnused on PPP

PineTab2 channel map:

ChannelFunction
0Volume button divider (VOL+ / VOL-)

Live capture from KEY_VOLUMEUP / KEY_VOLUMEDOWN:

PressVoltage
VOLUMEUP0–21 mV
VOLUMEDOWN0.30–0.63 V
Idle (no press)≈1.79 V

Driver

● working

Two cooperating drivers live under our overlay:

The whole stack is local because mainline FreeBSD has no SARADC ADC framework consumer to plug into; we wired the two-driver pair against each other directly via a kobj method rather than waiting for an in-tree IIO/ADC abstraction.

Bring-up started in 32e626d Add PPP SARADC volume keys and refresh status docs . The PineTab2 speculative step adds the RK3568-compatible provider match and richer rk_adc_keys debug sysctls so the tablet’s channel-0 ladder can be verified without guesswork.

Verification

# Sway volume OSD reacts to VOL+ / VOL-, and:
sysctl dev.rk_saradc.0
sysctl dev.rk_adc_keys.0

The OSD path is documented in the Status essay; volume buttons are listed there as one of the resolved input items.

Open work