Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v8 0/9] input: Add support for the Qualcomm PMI8998 and PM660 haptics
@ 2026-11-30  0:13 David Heidelberg via B4 Relay
  2026-11-30  0:13 ` [PATCH v8 1/9] dt-bindings: input: Add Qualcomm PMI8998 / " David Heidelberg via B4 Relay
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-30  0:13 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Lee Jones, Stephen Boyd, Bjorn Andersson, Konrad Dybcio,
	Abel Vesa, David Heidelberg
  Cc: David Collins, Subbaraman Narayanamurthy, Kamal Wadhwa,
	Fenglin Wu, Casey Connolly, linux-arm-msm, linux-input,
	devicetree, linux-kernel, mfd, phone-devel

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@oss.qualcomm.com/
[2] https://lore.kernel.org/linux-input/7dc6b68a-db8d-490a-89aa-596d70d2638c@oss.qualcomm.com/

---
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@connolly.tech/

---
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@ixit.cz>



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-11-30 16:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  0:13 [PATCH v8 0/9] input: Add support for the Qualcomm PMI8998 and PM660 haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 1/9] dt-bindings: input: Add Qualcomm PMI8998 / " David Heidelberg via B4 Relay
2026-11-30  0:22   ` sashiko-bot
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 2/9] dt-bindings: mfd: qcom,spmi-pmic: Allow the PMI8998 haptics child node David Heidelberg via B4 Relay
2026-11-30 13:59   ` Rob Herring (Arm)
2026-11-30  0:13 ` [PATCH v8 3/9] Input: qcom-pmi8998-haptics - Add Qualcomm PMI8998 haptics driver David Heidelberg via B4 Relay
2026-11-30  0:26   ` sashiko-bot
2026-11-30  9:33   ` Uwe Kleine-König
2026-11-30 10:36   ` Alexey Minnekhanov
2026-11-30 11:36     ` Uwe Kleine-König
2026-11-30 15:21   ` Andrey Derkach
2026-11-30 16:11     ` David Heidelberg
2026-11-30 16:16       ` Andrey Derkach
2026-11-30 16:26         ` Andrey Derkach
2026-11-30  0:13 ` [PATCH v8 4/9] arm64: dts: qcom: pmi8998: Add haptics node David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 5/9] arm64: dts: qcom: sdm845-oneplus: Enable haptics David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 6/9] arm64: dts: qcom: sdm845-xiaomi-beryllium: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 7/9] arm64: dts: qcom: sdm845-shift-axolotl: " David Heidelberg via B4 Relay
2026-11-30  0:13 ` [PATCH v8 8/9] arm64: dts: qcom: pm660: Add haptics node David Heidelberg via B4 Relay
2026-11-30 15:21   ` Andrey Derkach
2026-11-30  0:13 ` [PATCH v8 9/9] arm64: dts: qcom: sdm660-xiaomi-lavender: Enable haptics David Heidelberg via B4 Relay
2026-11-30 10:38   ` Alexey Minnekhanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox