/
st_asm330lhhx.txt
79 lines (62 loc) · 2.55 KB
/
st_asm330lhhx.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
* st_asm330lhhx driver for imu MEMS sensors
Required properties for all bus drivers:
- compatible: must be one of:
"st,asm330lhh"
"st,asm330lhhx"
Required properties for the i2c bindings:
- reg: i2c slave address
Required properties for the spi bindings:
- reg: the chipselect index
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless
constrained by external circuitry
Optional properties for all bus drivers:
- vdd-supply: an optional regulator that needs to be on to provide
VDD power to the sensor.
- vddio-supply: an optional regulator that needs to be on to provide
the VDD IO power to the sensor.
- st,int-pin: the pin on the package that will be used to signal
"data ready" (valid values: 1 or 2, default: 1).
- st,mlc-int-pin: the pin on the package that will be used to signal
MLC/FSM event (valid values: 1 for int pin 1, 2 for
int pin 2 or 3 for both int pin, default: st,int-pin).
- mount-matrix: mount rotation matrix.
Refer to iio/mount-matrix.txt for details.
- interrupts: interrupt mapping for IRQ. It should be configured
with flags IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_LEVEL_LOW.
Refer to interrupt-controller/interrupts.txt for
generic interrupt client node bindings.
- st,module_id: module identifier.
This is used by user-space to identify which devices
are part of the same module (particularly important for
supporting multiple sensors of the same type).
- wakeup-source: https://www.kernel.org/doc/Documentation/devicetree/bindings/power/wakeup-source.txt
Example for an spi asm330lhh device node:
asm330lhh-imu@0 {
compatible = "st,asm330lhh";
reg = <0x0>;
spi-max-frequency = <1000000>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
vddio-supply = <&sensors_vddio>;
vdd-supply = <&sensors_vdd>;
st,int-pin = <1>;
st,mlc-int-pin = <2>;
st,module_id = <1>;
mount-matrix = "1", "0", "0",
"0", "1", "0",
"0", "0", "1";
};
Example for an i2c asm330lhhx device node (SA0 pulled down):
asm330lhhx-imu@0x6a {
compatible = "st,asm330lhhx";
reg = <0x6a>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
vddio-supply = <&sensors_vddio>;
vdd-supply = <&sensors_vdd>;
st,int-pin = <1>;
st,mlc-int-pin = <2>;
mount-matrix = "1", "0", "0",
"0", "1", "0",
"0", "0", "1";
};