xref: /linux/Documentation/devicetree/bindings/iio/st,st-sensors.yaml (revision 9c15db92a8e56bcde0f58064ac1adc28c0579b51)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/st,st-sensors.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectronics MEMS sensors
8
9description: |
10  Note that whilst this covers many STMicro MEMs sensors, some more complex
11  IMUs need their own bindings.
12  The STMicroelectronics sensor devices are pretty straight-forward I2C or
13  SPI devices, all sharing the same device tree descriptions no matter what
14  type of sensor it is.
15
16maintainers:
17  - Denis Ciocca <denis.ciocca@st.com>
18
19properties:
20  compatible:
21    description: |
22      Some values are deprecated.
23      st,lis3lv02d (deprecated, use st,lis3lv02dl-accel)
24      st,lis302dl-spi (deprecated, use st,lis3lv02dl-accel)
25    enum:
26        # Accelerometers
27      - st,lis3lv02d
28      - st,lis302dl-spi
29      - st,lis3lv02dl-accel
30      - st,lsm303dlh-accel
31      - st,lsm303dlhc-accel
32      - st,lis3dh-accel
33      - st,lsm330d-accel
34      - st,lsm330dl-accel
35      - st,lsm330dlc-accel
36      - st,lis331dl-accel
37      - st,lis331dlh-accel
38      - st,lsm303dl-accel
39      - st,lsm303dlm-accel
40      - st,lsm330-accel
41      - st,lsm303agr-accel
42      - st,lis2dh12-accel
43      - st,h3lis331dl-accel
44      - st,lng2dm-accel
45      - st,lis3l02dq
46      - st,lis2dw12
47      - st,lis3dhh
48      - st,lis3de
49      - st,lis2de12
50      - st,lis2hh12
51        # Gyroscopes
52      - st,l3g4200d-gyro
53      - st,lsm330d-gyro
54      - st,lsm330dl-gyro
55      - st,lsm330dlc-gyro
56      - st,l3gd20-gyro
57      - st,l3gd20h-gyro
58      - st,l3g4is-gyro
59      - st,lsm330-gyro
60      - st,lsm9ds0-gyro
61        # Magnetometers
62      - st,lsm303agr-magn
63      - st,lsm303dlh-magn
64      - st,lsm303dlhc-magn
65      - st,lsm303dlm-magn
66      - st,lis3mdl-magn
67      - st,lis2mdl
68      - st,lsm9ds1-magn
69      - st,iis2mdc
70        # Pressure sensors
71      - st,lps001wp-press
72      - st,lps25h-press
73      - st,lps331ap-press
74      - st,lps22hb-press
75      - st,lps33hw
76      - st,lps35hw
77      - st,lps22hh
78
79  reg:
80    maxItems: 1
81
82  interrupts:
83    minItems: 1
84
85  vdd-supply: true
86  vddio-supply: true
87
88  st,drdy-int-pin:
89    $ref: /schemas/types.yaml#/definitions/uint32
90    description:
91      Some sensors have multiple possible pins via which they can provide
92      a data ready interrupt.  This selects which one.
93    enum:
94      - 1
95      - 2
96
97  drive-open-drain:
98    $ref: /schemas/types.yaml#/definitions/flag
99    description: |
100      The interrupt/data ready line will be configured as open drain, which
101      is useful if several sensors share the same interrupt line.
102
103required:
104  - compatible
105  - reg
106
107additionalProperties: false
108
109examples:
110  - |
111    #include <dt-bindings/interrupt-controller/irq.h>
112    i2c {
113        #address-cells = <1>;
114        #size-cells = <0>;
115        accelerometer@1d {
116            compatible = "st,lis3lv02dl-accel";
117            reg = <0x1d>;
118            interrupt-parent = <&gpio2>;
119            interrupts = <18 IRQ_TYPE_EDGE_RISING>;
120            pinctrl-0 = <&lis3lv02dl_nhk_mode>;
121            pinctrl-names = "default";
122        };
123    };
124...
125