brintos

brintos / linux-shallow public Read only

0
0
Text · 5.4 KiB · 71c1ee3 Raw
202 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/st,st-sensors.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: STMicroelectronics MEMS sensors8 9description: The STMicroelectronics sensor devices are pretty straight-forward10  I2C or SPI devices, all sharing the same device tree descriptions no matter11  what type of sensor it is.12  Note that whilst this covers many STMicro MEMs sensors, some more complex13  IMUs need their own bindings.14 15maintainers:16  - Denis Ciocca <denis.ciocca@st.com>17  - Linus Walleij <linus.walleij@linaro.org>18 19properties:20  compatible:21    oneOf:22      - description: STMicroelectronics Accelerometers23        enum:24          - st,h3lis331dl-accel25          - st,lis2de1226          - st,lis2dw1227          - st,lis2hh1228          - st,lis2dh12-accel29          - st,lis2ds1230          - st,lis302dl31          - st,lis331dl-accel32          - st,lis331dlh-accel33          - st,lis3de34          - st,lis3dh-accel35          - st,lis3dhh36          - st,lis3l02dq37          - st,lis3lv02dl-accel38          - st,lng2dm-accel39          - st,lsm303agr-accel40          - st,lsm303c-accel41          - st,lsm303dl-accel42          - st,lsm303dlh-accel43          - st,lsm303dlhc-accel44          - st,lsm303dlm-accel45          - st,lsm330-accel46          - st,lsm330d-accel47          - st,lsm330dl-accel48          - st,lsm330dlc-accel49      - items:50          - const: st,iis328dq51          - const: st,h3lis331dl-accel52      - description: Silan Accelerometers53        enum:54          - silan,sc7a2055      - description: STMicroelectronics Gyroscopes56        enum:57          - st,l3g4200d-gyro58          - st,l3g4is-gyro59          - st,l3gd20-gyro60          - st,l3gd20h-gyro61          - st,lsm330-gyro62          - st,lsm330d-gyro63          - st,lsm330dl-gyro64          - st,lsm330dlc-gyro65          - st,lsm9ds0-gyro66      - description: STMicroelectronics Magnetometers67        enum:68          - 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 Sensors77        enum:78          - st,lps001wp-press79          - st,lps22df80          - st,lps22hb-press81          - st,lps22hh82          - st,lps25h-press83          - st,lps331ap-press84          - st,lps33hw85          - st,lps35hw86      - description: IMUs87        enum:88          - st,lsm303d-imu89          - st,lsm9ds0-imu90      - description: Deprecated bindings91        enum:92          - st,lis302dl-spi93          - st,lis3lv02d94        deprecated: true95 96  reg:97    maxItems: 198 99  interrupts:100    description: interrupt line(s) connected to the DRDY line(s) and/or the101      Inertial interrupt lines INT1 and INT2 if these exist. This means up to102      three interrupts, and the DRDY must be the first one if it exists on103      the package. The trigger edge of the interrupts is sometimes software104      configurable in the hardware so the operating system should parse this105      flag and set up the trigger edge as indicated in the device tree.106    minItems: 1107    maxItems: 2108 109  vdd-supply: true110  vddio-supply: true111 112  st,drdy-int-pin:113    description: the pin on the package that will be used to signal114      "data ready" (valid values 1 or 2). This property is not configurable115      on all sensors.116    $ref: /schemas/types.yaml#/definitions/uint32117    enum: [1, 2]118 119  drive-open-drain:120    $ref: /schemas/types.yaml#/definitions/flag121    description: the interrupt/data ready line will be configured122      as open drain, which is useful if several sensors share the same123      interrupt line. (This binding is taken from pinctrl.)124 125  mount-matrix:126    description: an optional 3x3 mounting rotation matrix.127 128allOf:129  - if:130      properties:131        compatible:132          enum:133            # These have no interrupts134            - st,lps001wp135    then:136      properties:137        interrupts: false138        st,drdy-int-pin: false139        drive-open-drain: false140 141  - if:142      properties:143        compatible:144          enum: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-magn159    then:160      properties:161        interrupts:162          maxItems: 1163        st,drdy-int-pin: false164 165required:166  - compatible167  - reg168 169additionalProperties: false170 171examples:172  - |173    #include <dt-bindings/interrupt-controller/irq.h>174    i2c {175      #address-cells = <1>;176      #size-cells = <0>;177 178      accelerometer@1c {179        compatible = "st,lis331dl-accel";180        reg = <0x1c>;181        st,drdy-int-pin = <1>;182        vdd-supply = <&ldo1>;183        vddio-supply = <&ldo2>;184        interrupt-parent = <&gpio>;185        interrupts = <18 IRQ_TYPE_EDGE_RISING>, <19 IRQ_TYPE_EDGE_RISING>;186      };187    };188    spi {189      #address-cells = <1>;190      #size-cells = <0>;191      num-cs = <1>;192 193      l3g4200d: gyroscope@0 {194        compatible = "st,l3g4200d-gyro";195        st,drdy-int-pin = <2>;196        reg = <0>;197        vdd-supply = <&vcc_io>;198        vddio-supply = <&vcc_io>;199      };200    };201...202