Path: blob/main/sys/contrib/device-tree/Bindings/iio/st,st-sensors.yaml
48377 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,lis2mdl68- st,lis3mdl-magn69- st,lsm303agr-magn70- st,lsm303c-magn71- st,lsm303dlh-magn72- st,lsm303dlhc-magn73- st,lsm303dlm-magn74- st,lsm9ds1-magn75- description: STMicroelectronics Pressure Sensors76enum:77- st,lps001wp-press78- st,lps22df79- st,lps22hb-press80- st,lps22hh81- st,lps25h-press82- st,lps331ap-press83- st,lps33hw84- st,lps35hw85- description: IMUs86enum:87- st,lsm303d-imu88- st,lsm9ds0-imu89- description: Deprecated bindings90enum:91- st,lis302dl-spi92- st,lis3lv02d93deprecated: true9495reg:96maxItems: 19798interrupts:99description: interrupt line(s) connected to the DRDY line(s) and/or the100Inertial interrupt lines INT1 and INT2 if these exist. This means up to101three interrupts, and the DRDY must be the first one if it exists on102the package. The trigger edge of the interrupts is sometimes software103configurable in the hardware so the operating system should parse this104flag and set up the trigger edge as indicated in the device tree.105minItems: 1106maxItems: 2107108vdd-supply: true109vddio-supply: true110111st,drdy-int-pin:112description: the pin on the package that will be used to signal113"data ready" (valid values 1 or 2). This property is not configurable114on all sensors.115$ref: /schemas/types.yaml#/definitions/uint32116enum: [1, 2]117118drive-open-drain:119$ref: /schemas/types.yaml#/definitions/flag120description: the interrupt/data ready line will be configured121as open drain, which is useful if several sensors share the same122interrupt line. (This binding is taken from pinctrl.)123124mount-matrix:125description: an optional 3x3 mounting rotation matrix.126127allOf:128- if:129properties:130compatible:131enum:132# These have no interrupts133- st,lps001wp134then:135properties:136interrupts: false137st,drdy-int-pin: false138drive-open-drain: false139140- if:141properties:142compatible:143enum:144# These have only DRDY145- st,lis2mdl146- st,lis3l02dq147- st,lis3lv02dl-accel148- st,lps22df149- st,lps22hb-press150- st,lps22hh151- st,lps25h-press152- st,lps33hw153- st,lps35hw154- st,lsm303agr-magn155- st,lsm303dlh-magn156- st,lsm303dlhc-magn157- st,lsm303dlm-magn158then:159properties:160interrupts:161maxItems: 1162st,drdy-int-pin: false163164required:165- compatible166- reg167168additionalProperties: false169170examples:171- |172#include <dt-bindings/interrupt-controller/irq.h>173i2c {174#address-cells = <1>;175#size-cells = <0>;176177accelerometer@1c {178compatible = "st,lis331dl-accel";179reg = <0x1c>;180st,drdy-int-pin = <1>;181vdd-supply = <&ldo1>;182vddio-supply = <&ldo2>;183interrupt-parent = <&gpio>;184interrupts = <18 IRQ_TYPE_EDGE_RISING>, <19 IRQ_TYPE_EDGE_RISING>;185};186};187spi {188#address-cells = <1>;189#size-cells = <0>;190num-cs = <1>;191192l3g4200d: gyroscope@0 {193compatible = "st,l3g4200d-gyro";194st,drdy-int-pin = <2>;195reg = <0>;196vdd-supply = <&vcc_io>;197vddio-supply = <&vcc_io>;198};199};200...201202203