Skip to content

Commit 6f8e286

Browse files
dts: bindings: sensor: Add invensense icm42670 properties
Add the power mode, accel and gyro filtering options, and apex features. Add -p and -s compatible. Signed-off-by: Aurelie Fontaine <[email protected]>
1 parent fcbf0ee commit 6f8e286

File tree

5 files changed

+124
-21
lines changed

5 files changed

+124
-21
lines changed

dts/bindings/sensor/invensense,icm42670.yaml

Lines changed: 103 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) 2024 TDK Invensense
12
# Copyright (c) 2022 Esco Medical ApS
23
# Copyright (c) 2020 TDK Invensense
34
# SPDX-License-Identifier: Apache-2.0
@@ -22,17 +23,18 @@ properties:
2223
Maps to ACCEL_ODR field in ACCEL_CONFIG0 setting
2324
Power-on reset value is 800.
2425
enum:
25-
- 1
26-
- 3
27-
- 6
28-
- 12
29-
- 25
30-
- 50
31-
- 100
32-
- 200
33-
- 400
34-
- 800
26+
- 0
3527
- 1600
28+
- 800
29+
- 400
30+
- 200
31+
- 100
32+
- 50
33+
- 25
34+
- 12
35+
- 6
36+
- 3
37+
- 1
3638

3739
gyro-hz:
3840
type: int
@@ -42,14 +44,29 @@ properties:
4244
Maps to GYRO_ODR field in GYRO_CONFIG0 setting
4345
Power-on reset value is 800.
4446
enum:
45-
- 12
46-
- 25
47-
- 50
48-
- 100
49-
- 200
50-
- 400
51-
- 800
47+
- 0
5248
- 1600
49+
- 800
50+
- 400
51+
- 200
52+
- 100
53+
- 50
54+
- 25
55+
- 12
56+
57+
power-mode:
58+
type: string
59+
default: "low-noise"
60+
description: |
61+
Power mode.
62+
Low power mode is allowed for accelerometer sensor only from
63+
1.5625Hz to 400Hz.
64+
The default is chosen to support both accelerometer and
65+
gyroscope sensors.
66+
enum:
67+
- "low-noise"
68+
- "low-power"
69+
5370

5471
accel-fs:
5572
type: int
@@ -64,6 +81,40 @@ properties:
6481
- 4
6582
- 2
6683

84+
accel-avg:
85+
type: int
86+
default: 32
87+
description: |
88+
Averaging filter setting to create accelerometer output
89+
in accelerometer low power mode.
90+
Maps to ACCEL_UI_AVG field in ACCEL_CONFIG1 setting.
91+
The default corresponds to the reset value of the register field.
92+
enum:
93+
- 2
94+
- 4
95+
- 8
96+
- 16
97+
- 32
98+
- 64
99+
100+
accel-filt-bw-hz:
101+
type: int
102+
default: 180
103+
description: |
104+
Accelerometer low pass filter bandwidth frequency (Unit - Hz).
105+
Maps to ACCEL_UI_FILT_BW field in ACCEL_CONFIG1 setting.
106+
The default corresponds to the reset value of the register field.
107+
enum:
108+
- 0
109+
- 180
110+
- 121
111+
- 73
112+
- 53
113+
- 34
114+
- 25
115+
- 16
116+
117+
67118
gyro-fs:
68119
type: int
69120
required: true
@@ -76,3 +127,38 @@ properties:
76127
- 1000
77128
- 500
78129
- 250
130+
131+
gyro-filt-bw-hz:
132+
type: int
133+
default: 180
134+
description: |
135+
Gyroscope low pass filter bandwidth frequency (Unit - Hz).
136+
Maps to GYRO_UI_FILT_BW field in GYRO_CONFIG1 setting.
137+
The default corresponds to the reset value of the register field.
138+
enum:
139+
- 0
140+
- 180
141+
- 121
142+
- 73
143+
- 53
144+
- 34
145+
- 25
146+
- 16
147+
148+
apex:
149+
type: string
150+
default: "none"
151+
description: |
152+
APEX (Advanced Pedometer and Event Detection) features. It consists of:
153+
* Pedometer: Tracks step count, and provide details such as the cadence and
154+
the estimated activity type (Walk, Run, Unknown).
155+
* Tilt Detection: Detects the Tilt when tilting the board with an angle of
156+
30 degrees or more held for 4 seconds.
157+
* Wake on Motion (WoM): Detects motion per axis exceeding 195 mg threshold.
158+
* Significant Motion Detector (SMD): Detects when the user has moved significantly.
159+
enum:
160+
- "none"
161+
- "pedometer"
162+
- "tilt"
163+
- "smd"
164+
- "wom"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
description: ICM-42670 motion tracking device
4+
description: ICM-42670-P motion tracking device
55

6-
compatible: "invensense,icm42670"
6+
compatible: "invensense,icm42670p"
77

88
include: [i2c-device.yaml, "invensense,icm42670.yaml"]

dts/bindings/sensor/invensense,icm42670-spi.yaml renamed to dts/bindings/sensor/invensense,icm42670p-spi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright (c) 2020 TDK Invensense
33
# SPDX-License-Identifier: Apache-2.0
44

5-
description: ICM-42670 motion tracking device
5+
description: ICM-42670-P motion tracking device
66

7-
compatible: "invensense,icm42670"
7+
compatible: "invensense,icm42670p"
88

99
include: [spi-device.yaml, "invensense,icm42670.yaml"]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: ICM-42670-S motion tracking device
5+
6+
compatible: "invensense,icm42670s"
7+
8+
include: [i2c-device.yaml, "invensense,icm42670.yaml"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2022 Esco Medical ApS
2+
# Copyright (c) 2020 TDK Invensense
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
description: ICM-42670-S motion tracking device
6+
7+
compatible: "invensense,icm42670s"
8+
9+
include: [spi-device.yaml, "invensense,icm42670.yaml"]

0 commit comments

Comments
 (0)