Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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 <linusw@kernel.org>
11 - Stephan Gerhold <stephan@gerhold.net>
12
13description:
14 3 axis accelerometers with varying range and I2C or SPI
15 4-wire interface.
16
17properties:
18 compatible:
19 oneOf:
20 - enum:
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 - bosch,bma023
33 - bosch,bma150
34 - bosch,bma180
35 - bosch,bma250
36 - bosch,smb380
37 - items:
38 - const: bosch,bmx055-accel
39 - const: bosch,bmc150_accel
40
41 reg:
42 maxItems: 1
43
44 vdd-supply: true
45 vddio-supply: true
46
47 interrupts:
48 minItems: 1
49 maxItems: 2
50 description: |
51 Without interrupt-names, the first interrupt listed must be the one
52 connected to the INT1 pin, the second (optional) interrupt listed must be
53 the one connected to the INT2 pin (if available). The type should be
54 IRQ_TYPE_EDGE_RISING.
55
56 BMC156 does not have an INT1 pin, therefore the first interrupt pin is
57 always treated as INT2.
58
59 interrupt-names:
60 minItems: 1
61 maxItems: 2
62 items:
63 enum:
64 - INT1
65 - INT2
66
67 mount-matrix:
68 description: an optional 3x3 mounting rotation matrix.
69
70 spi-max-frequency:
71 maximum: 10000000
72
73required:
74 - compatible
75 - reg
76
77allOf:
78 - $ref: /schemas/spi/spi-peripheral-props.yaml#
79
80unevaluatedProperties: false
81
82examples:
83 - |
84 #include <dt-bindings/interrupt-controller/irq.h>
85 i2c {
86 #address-cells = <1>;
87 #size-cells = <0>;
88 accelerometer@8 {
89 compatible = "bosch,bma222";
90 reg = <0x08>;
91 vddio-supply = <&vddio>;
92 vdd-supply = <&vdd>;
93 interrupts = <57 IRQ_TYPE_EDGE_RISING>;
94 interrupt-names = "INT1";
95 };
96 };
97 - |
98 #include <dt-bindings/interrupt-controller/irq.h>
99 i2c {
100 #address-cells = <1>;
101 #size-cells = <0>;
102 accelerometer@10 {
103 compatible = "bosch,bmc156_accel";
104 reg = <0x10>;
105 vddio-supply = <&vddio>;
106 vdd-supply = <&vdd>;
107 interrupts = <116 IRQ_TYPE_EDGE_RISING>;
108 interrupt-names = "INT2";
109 };
110 };
111 - |
112 spi {
113 #address-cells = <1>;
114 #size-cells = <0>;
115 accel@0 {
116 compatible = "bosch,bma222";
117 reg = <0>;
118 spi-max-frequency = <10000000>;
119 };
120 };
121...