Skip to content

sensor: Add ICM42686 Driver Support #92579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions boards/nxp/vmu_rt1170/vmu_rt1170_mimxrt1176_cm7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -243,36 +243,38 @@
};
};

#include <zephyr/dt-bindings/sensor/icm42688.h>
#include <zephyr/dt-bindings/sensor/icm42686.h>

&lpspi1 {
status = "okay";
cs-gpios =<&gpio2 11 GPIO_ACTIVE_LOW>;

icm42688_0: icm42688p0@0 {
compatible = "invensense,icm42688";
icm42686_0: icm42686p0@0 {
compatible = "invensense,icm42686", "invensense,icm4268x";
reg = <0>;
int-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <24000000>;
accel-pwr-mode = <ICM42688_DT_ACCEL_LN>;
accel-odr = <ICM42688_DT_ACCEL_ODR_1000>;
accel-fs = <ICM42688_DT_ACCEL_FS_16>;
gyro-pwr-mode = <ICM42688_DT_GYRO_LN>;
gyro-odr = <ICM42688_DT_GYRO_ODR_1000>;
gyro-fs = <ICM42688_DT_GYRO_FS_2000>;
accel-pwr-mode = <ICM42686_DT_ACCEL_LN>;
accel-odr = <ICM42686_DT_ACCEL_ODR_1000>;
accel-fs = <ICM42686_DT_ACCEL_FS_16>;
gyro-pwr-mode = <ICM42686_DT_GYRO_LN>;
gyro-odr = <ICM42686_DT_GYRO_ODR_1000>;
gyro-fs = <ICM42686_DT_GYRO_FS_2000>;
axis-align-x = <SENSOR_AXIS_ALIGN_DT_Y>;
axis-align-y = <SENSOR_AXIS_ALIGN_DT_X>;
axis-align-z = <SENSOR_AXIS_ALIGN_DT_Z>;
fifo-hires;
};
};

#include <zephyr/dt-bindings/sensor/icm42688.h>

&lpspi2 {
status = "okay";
cs-gpios =<&gpio3 24 GPIO_ACTIVE_LOW>;

icm42688_1: icm42688p1@0 {
compatible = "invensense,icm42688";
icm42688_0: icm42688p0@0 {
compatible = "invensense,icm42688", "invensense,icm4268x";
reg = <0>;
int-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <24000000>;
Expand Down
2 changes: 1 addition & 1 deletion boards/tdk/robokit1/robokit1-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
status = "okay";

icm42688: icm42688p@0 {
compatible = "invensense,icm42688";
compatible = "invensense,icm42688", "invensense,icm4268x";
reg = <0>;
int-gpios = <&pioc 5 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <24000000>;
Expand Down
2 changes: 1 addition & 1 deletion doc/hardware/peripherals/sensor/device_tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ then be used in a boards devicetree to configure a sensor to its initial state.
/* SPI bus options here, not shown */

accel_gyro0: icm42688p@0 {
compatible = "invensense,icm42688";
compatible = "invensense,icm42688", "invensense,icm4268x";
reg = <0>;
int-gpios = <&pioc 6 GPIO_ACTIVE_HIGH>; /* SoC specific pin to select for interrupt line */
spi-max-frequency = <DT_FREQ_M(24)>; /* Maximum SPI bus frequency */
Expand Down
3 changes: 3 additions & 0 deletions doc/releases/migration-guide-4.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ Sensors

* Renamed ``CONFIG_NPM1300_CHARGER`` to :kconfig:option:`CONFIG_NPM13XX_CHARGER`

* Nodes with compatible property :dtcompatible:`invensense,icm42688` now additionally need to also
include :dtcompatible:`invensense,icm4268x` in order to work.

Serial
=======

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/tdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# zephyr-keep-sorted-start
add_subdirectory_ifdef(CONFIG_ICM40627 icm40627)
add_subdirectory_ifdef(CONFIG_ICM42605 icm42605)
add_subdirectory_ifdef(CONFIG_ICM42688 icm42688)
add_subdirectory_ifdef(CONFIG_ICM4268X icm4268x)
add_subdirectory_ifdef(CONFIG_ICM42X70 icm42x70)
add_subdirectory_ifdef(CONFIG_ICM45686 icm45686)
add_subdirectory_ifdef(CONFIG_ICP101XX icp101xx)
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/tdk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# zephyr-keep-sorted-start
source "drivers/sensor/tdk/icm40627/Kconfig"
source "drivers/sensor/tdk/icm42605/Kconfig"
source "drivers/sensor/tdk/icm42688/Kconfig"
source "drivers/sensor/tdk/icm4268x/Kconfig"
source "drivers/sensor/tdk/icm42x70/Kconfig"
source "drivers/sensor/tdk/icm45686/Kconfig"
source "drivers/sensor/tdk/icp101xx/Kconfig"
Expand Down
16 changes: 0 additions & 16 deletions drivers/sensor/tdk/icm42688/CMakeLists.txt

This file was deleted.

Loading