Path: blob/master/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/st,st-sensors.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: STMicroelectronics MEMS sensors78description: The STMicroelectronics sensor devices are pretty straight-forward9I2C or SPI devices, all sharing the same device tree descriptions no matter10what type of sensor it is.11Note that whilst this covers many STMicro MEMs sensors, some more complex12IMUs need their own bindings.1314maintainers:15- Denis Ciocca <denis.ciocca@st.com>16- Linus Walleij <linus.walleij@linaro.org>1718properties:19compatible:20oneOf:21- description: STMicroelectronics Accelerometers22enum:23- st,h3lis331dl-accel24- st,lis2de1225- st,lis2dw1226- st,lis2hh1227- st,lis2dh12-accel28- st,lis2ds1229- st,lis302dl30- st,lis331dl-accel31- st,lis331dlh-accel32- st,lis3de33- st,lis3dh-accel34- st,lis3dhh35- st,lis3l02dq36- st,lis3lv02dl-accel37- st,lng2dm-accel38- st,lsm303agr-accel39- st,lsm303c-accel40- st,lsm303dl-accel41- st,lsm303dlh-accel42- st,lsm303dlhc-accel43- st,lsm303dlm-accel44- st,lsm330-accel45- st,lsm330d-accel46- st,lsm330dl-accel47- st,lsm330dlc-accel48- items:49- const: st,iis328dq50- const: st,h3lis331dl-accel51- description: Silan Accelerometers52enum:53- silan,sc7a2054- description: STMicroelectronics Gyroscopes55enum:56- st,l3g4200d-gyro57- st,l3g4is-gyro58- st,l3gd20-gyro59- st,l3gd20h-gyro60- st,lsm330-gyro61- st,lsm330d-gyro62- st,lsm330dl-gyro63- st,lsm330dlc-gyro64- st,lsm9ds0-gyro65- description: STMicroelectronics Magnetometers66enum:67- st,iis2mdc68- st,lis2mdl69- st,lis3mdl-magn70- st,lsm303agr-magn71- st,lsm303c-magn72- st,lsm303dlh-magn73- st,lsm303dlhc-magn74- st,lsm303dlm-magn75- st,lsm9ds1-magn76- description: STMicroelectronics Pressure Sensors77enum:78- st,lps001wp-press79- st,lps22df80- st,lps22hb-press81- st,lps22hh82- st,lps25h-press83- st,lps331ap-press84- st,lps33hw85- st,lps35hw86- description: IMUs87enum:88- st,lsm303d-imu89- st,lsm9ds0-imu90- description: Deprecated bindings91enum:92- st,lis302dl-spi93- st,lis3lv02d94deprecated: true9596reg:97maxItems: 19899interrupts:100description: interrupt line(s) connected to the DRDY line(s) and/or the101Inertial interrupt lines INT1 and INT2 if these exist. This means up to102three interrupts, and the DRDY must be the first one if it exists on103the package. The trigger edge of the interrupts is sometimes software104configurable in the hardware so the operating system should parse this105flag and set up the trigger edge as indicated in the device tree.106minItems: 1107maxItems: 2108109vdd-supply: true110vddio-supply: true111112st,drdy-int-pin:113description: the pin on the package that will be used to signal114"data ready" (valid values 1 or 2). This property is not configurable115on all sensors.116$ref: /schemas/types.yaml#/definitions/uint32117enum: [1, 2]118119drive-open-drain:120$ref: /schemas/types.yaml#/definitions/flag121description: the interrupt/data ready line will be configured122as open drain, which is useful if several sensors share the same123interrupt line. (This binding is taken from pinctrl.)124125mount-matrix:126description: an optional 3x3 mounting rotation matrix.127128allOf:129- if:130properties:131compatible:132enum:133# These have no interrupts134- st,lps001wp135then:136properties:137interrupts: false138st,drdy-int-pin: false139drive-open-drain: false140141- if:142properties:143compatible:144enum:145# These have only DRDY146- st,lis2mdl147- st,lis3l02dq148- st,lis3lv02dl-accel149- st,lps22df150- st,lps22hb-press151- st,lps22hh152- st,lps25h-press153- st,lps33hw154- st,lps35hw155- st,lsm303agr-magn156- st,lsm303dlh-magn157- st,lsm303dlhc-magn158- st,lsm303dlm-magn159then:160properties:161interrupts:162maxItems: 1163st,drdy-int-pin: false164165required:166- compatible167- reg168169additionalProperties: false170171examples:172- |173#include <dt-bindings/interrupt-controller/irq.h>174i2c {175#address-cells = <1>;176#size-cells = <0>;177178accelerometer@1c {179compatible = "st,lis331dl-accel";180reg = <0x1c>;181st,drdy-int-pin = <1>;182vdd-supply = <&ldo1>;183vddio-supply = <&ldo2>;184interrupt-parent = <&gpio>;185interrupts = <18 IRQ_TYPE_EDGE_RISING>, <19 IRQ_TYPE_EDGE_RISING>;186};187};188spi {189#address-cells = <1>;190#size-cells = <0>;191num-cs = <1>;192193l3g4200d: gyroscope@0 {194compatible = "st,l3g4200d-gyro";195st,drdy-int-pin = <2>;196reg = <0>;197vdd-supply = <&vcc_io>;198vddio-supply = <&vcc_io>;199};200};201...202203204