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 # Pressure sensors 70 - st,lps001wp-press 71 - st,lps25h-press 72 - st,lps331ap-press 73 - st,lps22hb-press 74 - st,lps33hw 75 - st,lps35hw 76 - st,lps22hh 77 78 reg: 79 maxItems: 1 80 81 interrupts: 82 minItems: 1 83 84 vdd-supply: true 85 vddio-supply: true 86 87 st,drdy-int-pin: 88 $ref: /schemas/types.yaml#/definitions/uint32 89 description: 90 Some sensors have multiple possible pins via which they can provide 91 a data ready interrupt. This selects which one. 92 enum: 93 - 1 94 - 2 95 96 drive-open-drain: 97 $ref: /schemas/types.yaml#/definitions/flag 98 description: | 99 The interrupt/data ready line will be configured as open drain, which 100 is useful if several sensors share the same interrupt line. 101 102required: 103 - compatible 104 - reg 105 106additionalProperties: false 107 108examples: 109 - | 110 #include <dt-bindings/interrupt-controller/irq.h> 111 i2c { 112 #address-cells = <1>; 113 #size-cells = <0>; 114 accelerometer@1d { 115 compatible = "st,lis3lv02dl-accel"; 116 reg = <0x1d>; 117 interrupt-parent = <&gpio2>; 118 interrupts = <18 IRQ_TYPE_EDGE_RISING>; 119 pinctrl-0 = <&lis3lv02dl_nhk_mode>; 120 pinctrl-names = "default"; 121 }; 122 }; 123... 124