xref: /freebsd/sys/contrib/device-tree/Bindings/iio/accel/bosch,bma255.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Bosch BMA255 and Similar Accelerometers
8
9maintainers:
10  - Linus Walleij <linus.walleij@linaro.org>
11
12description:
13  3 axis accelerometers with varying range and I2C or SPI
14  4-wire interface.
15
16properties:
17  compatible:
18    enum:
19      - bosch,bmc150_accel
20      - bosch,bmi055_accel
21      - bosch,bma253
22      - bosch,bma254
23      - bosch,bma255
24      - bosch,bma250e
25      - bosch,bma222
26      - bosch,bma222e
27      - bosch,bma280
28
29  reg:
30    maxItems: 1
31
32  vdd-supply: true
33  vddio-supply: true
34
35  interrupts:
36    minItems: 1
37    maxItems: 2
38    description: |
39      The first interrupt listed must be the one connected to the INT1 pin,
40      the second (optional) interrupt listed must be the one connected to the
41      INT2 pin (if available).
42
43  mount-matrix:
44    description: an optional 3x3 mounting rotation matrix.
45
46  spi-max-frequency:
47    maximum: 10000000
48
49required:
50  - compatible
51  - reg
52
53additionalProperties: false
54
55examples:
56  - |
57    #include <dt-bindings/interrupt-controller/irq.h>
58    i2c {
59        #address-cells = <1>;
60        #size-cells = <0>;
61        accelerometer@8 {
62            compatible = "bosch,bma222";
63            reg = <0x08>;
64            vddio-supply = <&vddio>;
65            vdd-supply = <&vdd>;
66            interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
67        };
68    };
69  - |
70    # include <dt-bindings/interrupt-controller/irq.h>
71    spi {
72        #address-cells = <1>;
73        #size-cells = <0>;
74        accel@0 {
75            compatible = "bosch,bma222";
76            reg = <0>;
77            spi-max-frequency = <10000000>;
78        };
79    };
80...
81