GNU Linux-libre 6.1.90-gnu
[releases.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,bmc156_accel
30       - bosch,bmi055_accel
31
32       # bma180 driver in Linux
33       - bosch,bma023
34       - bosch,bma150
35       - bosch,bma180
36       - bosch,bma250
37       - bosch,smb380
38
39   reg:
40     maxItems: 1
41
42   vdd-supply: true
43   vddio-supply: true
44
45   interrupts:
46     minItems: 1
47     maxItems: 2
48     description: |
49       Without interrupt-names, the first interrupt listed must be the one
50       connected to the INT1 pin, the second (optional) interrupt listed must be
51       the one connected to the INT2 pin (if available). The type should be
52       IRQ_TYPE_EDGE_RISING.
53
54       BMC156 does not have an INT1 pin, therefore the first interrupt pin is
55       always treated as INT2.
56
57   interrupt-names:
58     minItems: 1
59     maxItems: 2
60     items:
61       enum:
62         - INT1
63         - INT2
64
65   mount-matrix:
66     description: an optional 3x3 mounting rotation matrix.
67
68   spi-max-frequency:
69     maximum: 10000000
70
71 required:
72   - compatible
73   - reg
74
75 allOf:
76   - $ref: /schemas/spi/spi-peripheral-props.yaml#
77
78 unevaluatedProperties: false
79
80 examples:
81   - |
82     #include <dt-bindings/interrupt-controller/irq.h>
83     i2c {
84         #address-cells = <1>;
85         #size-cells = <0>;
86         accelerometer@8 {
87             compatible = "bosch,bma222";
88             reg = <0x08>;
89             vddio-supply = <&vddio>;
90             vdd-supply = <&vdd>;
91             interrupts = <57 IRQ_TYPE_EDGE_RISING>;
92             interrupt-names = "INT1";
93         };
94     };
95   - |
96     #include <dt-bindings/interrupt-controller/irq.h>
97     i2c {
98         #address-cells = <1>;
99         #size-cells = <0>;
100         accelerometer@10 {
101             compatible = "bosch,bmc156_accel";
102             reg = <0x10>;
103             vddio-supply = <&vddio>;
104             vdd-supply = <&vdd>;
105             interrupts = <116 IRQ_TYPE_EDGE_RISING>;
106             interrupt-names = "INT2";
107         };
108     };
109   - |
110     # include <dt-bindings/interrupt-controller/irq.h>
111     spi {
112         #address-cells = <1>;
113         #size-cells = <0>;
114         accel@0 {
115             compatible = "bosch,bma222";
116             reg = <0>;
117             spi-max-frequency = <10000000>;
118         };
119     };
120 ...