Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Bosch BMA255 and Similar Accelerometers
0008 
0009 maintainers:
0010   - Linus Walleij <linus.walleij@linaro.org>
0011   - Stephan Gerhold <stephan@gerhold.net>
0012 
0013 description:
0014   3 axis accelerometers with varying range and I2C or SPI
0015   4-wire interface.
0016 
0017 properties:
0018   compatible:
0019     enum:
0020       # bmc150-accel driver in Linux
0021       - bosch,bma222
0022       - bosch,bma222e
0023       - bosch,bma250e
0024       - bosch,bma253
0025       - bosch,bma254
0026       - bosch,bma255
0027       - bosch,bma280
0028       - bosch,bmc150_accel
0029       - bosch,bmc156_accel
0030       - bosch,bmi055_accel
0031 
0032       # bma180 driver in Linux
0033       - bosch,bma023
0034       - bosch,bma150
0035       - bosch,bma180
0036       - bosch,bma250
0037       - bosch,smb380
0038 
0039   reg:
0040     maxItems: 1
0041 
0042   vdd-supply: true
0043   vddio-supply: true
0044 
0045   interrupts:
0046     minItems: 1
0047     maxItems: 2
0048     description: |
0049       Without interrupt-names, the first interrupt listed must be the one
0050       connected to the INT1 pin, the second (optional) interrupt listed must be
0051       the one connected to the INT2 pin (if available). The type should be
0052       IRQ_TYPE_EDGE_RISING.
0053 
0054       BMC156 does not have an INT1 pin, therefore the first interrupt pin is
0055       always treated as INT2.
0056 
0057   interrupt-names:
0058     minItems: 1
0059     maxItems: 2
0060     items:
0061       enum:
0062         - INT1
0063         - INT2
0064 
0065   mount-matrix:
0066     description: an optional 3x3 mounting rotation matrix.
0067 
0068   spi-max-frequency:
0069     maximum: 10000000
0070 
0071 required:
0072   - compatible
0073   - reg
0074 
0075 additionalProperties: false
0076 
0077 examples:
0078   - |
0079     #include <dt-bindings/interrupt-controller/irq.h>
0080     i2c {
0081         #address-cells = <1>;
0082         #size-cells = <0>;
0083         accelerometer@8 {
0084             compatible = "bosch,bma222";
0085             reg = <0x08>;
0086             vddio-supply = <&vddio>;
0087             vdd-supply = <&vdd>;
0088             interrupts = <57 IRQ_TYPE_EDGE_RISING>;
0089             interrupt-names = "INT1";
0090         };
0091     };
0092   - |
0093     #include <dt-bindings/interrupt-controller/irq.h>
0094     i2c {
0095         #address-cells = <1>;
0096         #size-cells = <0>;
0097         accelerometer@10 {
0098             compatible = "bosch,bmc156_accel";
0099             reg = <0x10>;
0100             vddio-supply = <&vddio>;
0101             vdd-supply = <&vdd>;
0102             interrupts = <116 IRQ_TYPE_EDGE_RISING>;
0103             interrupt-names = "INT2";
0104         };
0105     };
0106   - |
0107     # include <dt-bindings/interrupt-controller/irq.h>
0108     spi {
0109         #address-cells = <1>;
0110         #size-cells = <0>;
0111         accel@0 {
0112             compatible = "bosch,bma222";
0113             reg = <0>;
0114             spi-max-frequency = <10000000>;
0115         };
0116     };
0117 ...