[PATCH v2 0/5] Add Invensense ICM42607

Chris Morgan macromorgan at hotmail.com
Tue Mar 24 08:25:18 PDT 2026


On Thu, Mar 19, 2026 at 04:31:50PM -0500, Chris Morgan wrote:
> On Thu, Mar 19, 2026 at 07:55:19PM +0000, Jean-Baptiste Maneyrol wrote:
> > >
> > >________________________________________
> > >From: Chris Morgan <macroalpha82 at gmail.com>
> > >Sent: Thursday, March 19, 2026 19:29
> > >To: linux-iio at vger.kernel.org <linux-iio at vger.kernel.org>
> > >Cc: andy at kernel.org <andy at kernel.org>; nuno.sa at analog.com <nuno.sa at analog.com>; dlechner at baylibre.com <dlechner at baylibre.com>; jic23 at kernel.org <jic23 at kernel.org>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol at tdk.com>; linux-rockchip at lists.infradead.org <linux-rockchip at lists.infradead.org>; devicetree at vger.kernel.org <devicetree at vger.kernel.org>; heiko at sntech.de <heiko at sntech.de>; conor+dt at kernel.org <conor+dt at kernel.org>; krzk+dt at kernel.org <krzk+dt at kernel.org>; robh at kernel.org <robh at kernel.org>; andriy.shevchenko at intel.com <andriy.shevchenko at intel.com>; Chris Morgan <macromorgan at hotmail.com>
> > >Subject: [PATCH v2 0/5] Add Invensense ICM42607
> > > 
> > >From: Chris Morgan <macromorgan@ hotmail. com> Add support for the ICM42607 IMU. This sensor shares the same functionality but a different register layout with the existing ICM42600. This driver should work with the ICM42607 and ICM42607P
> > >ZjQcmQRYFpfptBannerStart
> > >This Message Is From an Untrusted Sender
> > >You have not previously corresponded with this sender.
> > > 
> > >ZjQcmQRYFpfptBannerEnd
> > >From: Chris Morgan <macromorgan at hotmail.com>
> > >
> > >Add support for the ICM42607 IMU. This sensor shares the same
> > >functionality but a different register layout with the existing
> > >ICM42600.
> > >
> > >This driver should work with the ICM42607 and ICM42607P over both I2C
> > >and SPI, however only the ICM42607P over I2C could be tested.
> > >
> > >Changes Since V1:
> > > - Instead of creating a new driver, merged with the existing inv_icm42600
> > >   driver. This necessitated adding some code to the existing driver to
> > >   permit using a different register layout for the same functionality.
> > > - Split changes up a bit more to decrease the size of the individual
> > >   patches. Note that patch 0004 is still pretty hefty; if I need to split
> > >   further I may need to create some temporary stub functions.
> > > - Used guard() and PM_RUNTIME_ACQUIRE_AUTOSUSPEND() on the new functions
> > >   per Jonathan's recommendations.
> > >
> > >Chris Morgan (5):
> > >  dt-bindings: iio: imu: add icm42607
> > >  iio: imu: inv_icm42600: Add support for using alternate registers
> > >  iio: imu: inv_icm42600: Add registers for icm42607
> > >  iio: imu: inv_icm42600: Add support for icm42607
> > >  arm64: dts: rockchip: Add icm42607p IMU for RG-DS
> > >
> > > .../bindings/iio/imu/invensense,icm42600.yaml |   4 +
> > > .../dts/rockchip/rk3568-anbernic-rg-ds.dts    |  20 +-
> > > drivers/iio/imu/inv_icm42600/inv_icm42600.h   | 333 +++++++-
> > > .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 497 ++++++++++-
> > > .../imu/inv_icm42600/inv_icm42600_buffer.c    | 240 +++++-
> > > .../imu/inv_icm42600/inv_icm42600_buffer.h    |   5 +
> > > .../iio/imu/inv_icm42600/inv_icm42600_core.c  | 795 +++++++++++++++---
> > > .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  | 379 ++++++++-
> > > .../iio/imu/inv_icm42600/inv_icm42600_i2c.c   |  53 +-
> > > .../iio/imu/inv_icm42600/inv_icm42600_spi.c   |  59 +-
> > > .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  64 ++
> > > .../iio/imu/inv_icm42600/inv_icm42600_temp.h  |   4 +
> > > 12 files changed, 2289 insertions(+), 164 deletions(-)
> > >
> > >-- 
> > >2.43.0
> > >
> > >
> > 
> > Hello Chris,
> > 
> > thanks for the patch, but beware that there is a major difference between this
> > chip and inv_icm42600 chips family that is preventing to have a common driver.
> > 
> > inv_icm42600 chips are using direct register access with bank while icm42607
> > chip is using indirect register access using IREG specific registers. Some
> > registers cannot be read/write directly and requires programming specific
> > registers. The mechanism is similar to the one in inv_icm45600 driver, you can
> > have a look in this driver.
> 
> I didn't see anything in the datasheet for the 42607P in regards to the IREG,
> but I did see something in the 42607C. That said, near as I can tell from the
> drivers that I used as a reference from the Rockchip and Lineage trees this driver
> doesn't access anything from those registers.
> 
> Still, I'll defer to you on what you think is best. As long as I can use my
> accelerometer that's all I care about.

So closer looking at the 42607-C datasheet, it looks like they have MREG banks, is
that what you're talking about?

If so I can either remove this and create a new driver (as I did with V1),
or I can just keep the 42607P in this driver since it does appear to use only
direct register access.

Let me know what you think so I can rewrite and resubmit it. I'll try to better
break it up this time too by seeing if I can make temp, gyro, and accel functions
all with different commits.

Thank you,
Chris

> 
> > 
> > Using the same driver is not possible I think, since register access is different.
> > 
> > And there are also more differences between the 2 chip families that is making
> > a common driver quite difficult to do.
> > 
> > Thanks,
> > JB
> 
> Chris



More information about the Linux-rockchip mailing list