[RFC PATCH v1 0/2] iio: imu: Add support for QST QMI8658C
From: NanamiKite
Date: Fri Dec 04 2026 - 03:56:34 EST
This series adds a DT binding and an initial I2C driver for the QST
QMI8658C 6-axis IMU (3-axis accelerometer, 3-axis gyroscope, and
temperature sensor).
Right now it only covers direct sysfs reads, scale/ODR settings,
mount-matrix, and vdd/vddio supplies. Triggers, FIFO, interrupts, and
runtime PM can come later once the basic layout looks reasonable.
A few things I'd like feedback on:
- Keeping both accel and gyro enabled for now: the chip uses different
ODR tables for the same aODR register values depending on whether the
gyro is on or off. Leaving it in 6DOF mode keeps the ODR table simple
for an initial driver, or would you rather see separate modes from
the start?
- Regulator startup delay: the datasheet lists t0 = 150 ms from power
up. Should probe() sleep after enabling supplies before reading
WHO_AM_I, in case a board actually switches them off?
- Chip IDs: my QMI8658C module returns WHO_AM_I = 0x05 and
REVISION_ID = 0x7b (rev 0.9 datasheet says 0x79). The driver warns on
an unexpected WHO_AM_I rather than failing probe, and only logs
REVISION_ID at dbg level.
Compile-tested against linux-next (next-20261203) with W=1 C=1 and
dt_binding_check (dtschema 2026.9), and tested on a Raspberry Pi 4B
(i2c1, 0x6b) running 6.1.21-v8+ with a small local build shim for
cleanup.h/array_size.h/.probe_new (driver source itself is untouched).
Accel readings give ~9.64 m/s^2 at rest, switching +/-2g to +/-4g halves
the raw values as expected, temp reads ~19.2 C, and 3 unbind/bind cycles
come back clean (which caught that SensorDisable needs to be cleared
before writing RESET, otherwise the reset fires late and wipes CTRL1
back to 0x20).
NanamiKite (2):
dt-bindings: iio: imu: Add QST QMI8658C
iio: imu: Add driver for QST QMI8658C
.../bindings/iio/imu/qstcorp,qmi8658c.yaml | 71 ++
MAINTAINERS | 7 +
drivers/iio/imu/Kconfig | 12 +
drivers/iio/imu/Makefile | 2 +
drivers/iio/imu/qmi8658.c | 622 ++++++++++++++++++
5 files changed, 714 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/imu/qstcorp,qmi8658c.yaml
create mode 100644 drivers/iio/imu/qmi8658.c
--
2.56.1