TX2 J120 MPU 9250 Kernel Driver

Hi,

The J120 board has an IMU device MPU9250. I can run the RTIMULib user space application successfully, however I was wondering if there was a kernel driver available that I could use.

I noticed in the kernel sources there are I2C drivers existing provided by both invensense (inv_mpu) and invidia (nvi_mpu), neither of which compile.

Any help appreciated.

Marc

Sorry for the late answer. At some later point, if we still use that MPU, we also use the J120/J140 boards from Auvidea, I would look into backporting the driver form here:

(or any newer version).

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/iio/imu/inv_mpu6050?h=v4.14.120&id=0c8f492dd7ddf0dd381fa63b76066c0966d8dd73

It looks like 9150 works basically exactly the same (commitwise), but since the ID is different it would be considered unsupported by the driver.

Also I have not check the interrupt support or if it does interrupt timestamping (would be nice), but at least it supports device-tree (the 4.4 version does not and is missing the more recent INV MPUs). I have not worked with the IIO/IMU subsystem so far, so I don’t know how easy it would be to us, but of course better latency and a common interface is always better ;)

But If I were you I would begin there, since the driver is in mainline I would not use any other.

Regards,

Markus

Ah. Saw one in the l4t too, but have not checked that one yet:

http://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=tree;f=drivers/iio/imu/inv_mpu;h=122d40906d8efe10ee38a5cc48d2d42f58b6d140;hb=abdd7b918fcc8cc956f02afaea891010100a90aa

So I don’t know where this one is coming from

the other driver with the 6050 is the older one from mainline.

Regrds

MPU-9250 on J120 is connected via SPI bus, not I2C. Also, its location is not temperature/vibration isolated, nor RF shielded.

-albertr