dt-bindings: iio: accel: bma255: Add interrupt-names
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / iio / accel / bosch,bma255.yaml
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
7 title: Bosch BMA255 and Similar Accelerometers
8
9 maintainers:
10   - Linus Walleij <linus.walleij@linaro.org>
11   - Stephan Gerhold <stephan@gerhold.net>
12
13 description:
14   3 axis accelerometers with varying range and I2C or SPI
15   4-wire interface.
16
17 properties:
18   compatible:
19     enum:
20       # bmc150-accel driver in Linux
21       - bosch,bma222
22       - bosch,bma222e
23       - bosch,bma250e
24       - bosch,bma253
25       - bosch,bma254
26       - bosch,bma255
27       - bosch,bma280
28       - bosch,bmc150_accel
29       - bosch,bmi055_accel
30
31       # bma180 driver in Linux
32       - bosch,bma023
33       - bosch,bma150
34       - bosch,bma180
35       - bosch,bma250
36       - bosch,smb380
37
38   reg:
39     maxItems: 1
40
41   vdd-supply: true
42   vddio-supply: true
43
44   interrupts:
45     minItems: 1
46     maxItems: 2
47     description: |
48       Without interrupt-names, the first interrupt listed must be the one
49       connected to the INT1 pin, the second (optional) interrupt listed must be
50       the one connected to the INT2 pin (if available). The type should be
51       IRQ_TYPE_EDGE_RISING.
52
53   interrupt-names:
54     minItems: 1
55     maxItems: 2
56     items:
57       enum:
58         - INT1
59         - INT2
60
61   mount-matrix:
62     description: an optional 3x3 mounting rotation matrix.
63
64   spi-max-frequency:
65     maximum: 10000000
66
67 required:
68   - compatible
69   - reg
70
71 additionalProperties: false
72
73 examples:
74   - |
75     #include <dt-bindings/interrupt-controller/irq.h>
76     i2c {
77         #address-cells = <1>;
78         #size-cells = <0>;
79         accelerometer@8 {
80             compatible = "bosch,bma222";
81             reg = <0x08>;
82             vddio-supply = <&vddio>;
83             vdd-supply = <&vdd>;
84             interrupts = <57 IRQ_TYPE_EDGE_RISING>;
85             interrupt-names = "INT1";
86         };
87     };
88   - |
89     # include <dt-bindings/interrupt-controller/irq.h>
90     spi {
91         #address-cells = <1>;
92         #size-cells = <0>;
93         accel@0 {
94             compatible = "bosch,bma222";
95             reg = <0>;
96             spi-max-frequency = <10000000>;
97         };
98     };
99 ...