[PATCH v8 0/9] input: Add support for the Qualcomm PMI8998 and PM660 haptics
From: David Heidelberg via B4 Relay
Date: Sun Nov 29 2026 - 19:14:19 EST
The series adds a driver for the haptics module found in the Qualcomm
PMI8998 and PM660 PMICs, used together with SDM845 and SDM660 in phones
such as the OnePlus 6 and 6T, Xiaomi Poco F1, SHIFT6mq and Xiaomi Redmi
Note 7, and enables it on those boards.
The driver supports both linear resonant actuators (LRA) and eccentric
rotating mass (ERM) motors via the input force-feedback framework,
allowing userspace to upload and play FF_RUMBLE, FF_CONSTANT and
FF_PERIODIC (FF_SINE and FF_CUSTOM) effects and modulate drive strength
via FF_GAIN. Rumble, constant and sine effects use the board's
configured play mode (direct or buffer), with the drive voltage scaling
the amplitude of the waveform. A custom effect carries up to eight
samples, matching the module's 8-sample waveform buffer, and is played
in buffer mode.
For LRA actuators, the haptics module measures the resonance while it is
driven. The measured drive period is read back from the hardware and
used to track resonance drift caused by temperature and actuator aging.
The actuator type, play mode, waveform shape, brake pattern, waveform
and sample repeat counts, sample play rate and auto-resonance detection
options are configured from the device tree, matching the vendor driver.
This is not the hardware handled by the qcom-spmi-haptics driver for
PMIH0108 [1]. That one drives the HAP530_HV module of PMIH0108, which has
separate CFG and PTN register blocks, an 8 KB PCM FIFO and a 50 mV VMAX
step. PMI8998 and PM660 have a single register block at 0xc000, an
8-sample waveform buffer, a 116 mV VMAX step and a different
auto-resonance and fault interface; several register offsets even collide
with different meanings. Fenglin Wu confirmed that the new driver is not
meant to cover it [2], so the compatible strings qcom,pmi8998-haptics and
qcom,pm660-haptics are used on their own, without a qcom,spmi-haptics
fallback, and the qcom,spmi-pmic schema is taught to accept either
haptics binding.
This continues Casey Connolly's v7 series from 2022.
[1] https://lore.kernel.org/linux-input/20260828-qcom-spmi-haptics-v7-0-0367b3ac2e1e@xxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/linux-input/7dc6b68a-db8d-490a-89aa-596d70d2638c@xxxxxxxxxxxxxxxx/
---
Changes in v8:
- Complete rework, no longer memory-less, supports multiple modes, ERM support, etc.
- Link to v7: https://lore.kernel.org/all/20221015172915.1436236-1-caleb@xxxxxxxxxxxxx/
---
David Heidelberg (9):
dt-bindings: input: Add Qualcomm PMI8998 / PM660 haptics
dt-bindings: mfd: qcom,spmi-pmic: Allow the PMI8998 haptics child node
Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver
arm64: dts: qcom: pmi8998: Add haptics node
arm64: dts: qcom: sdm845-oneplus: Enable haptics
arm64: dts: qcom: sdm845-xiaomi-beryllium: Enable haptics
arm64: dts: qcom: sdm845-shift-axolotl: Enable haptics
arm64: dts: qcom: pm660: Add haptics node
arm64: dts: qcom: sdm660-xiaomi-lavender: Enable haptics
.../bindings/input/qcom,pmi8998-haptics.yaml | 256 +++
.../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 4 +-
MAINTAINERS | 9 +
arch/arm64/boot/dts/qcom/pm660.dtsi | 11 +
arch/arm64/boot/dts/qcom/pmi8998.dtsi | 11 +
.../arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 11 +
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 16 +
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts | 13 +
.../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi | 13 +
drivers/input/misc/Kconfig | 13 +
drivers/input/misc/Makefile | 1 +
drivers/input/misc/qcom-pmi8998-haptics.c | 2025 ++++++++++++++++++++
include/dt-bindings/input/qcom,haptics.h | 46 +
13 files changed, 2428 insertions(+), 1 deletion(-)
---
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
change-id: 20260909-qcom-pmi8998-haptics-c46c81e00fe0
Best regards,
--
David Heidelberg <david@xxxxxxx>