xref: /linux/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml (revision 13845bdc869f136f92ad3d40ea09b867bb4ce467)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/imu/bosch,bmi160.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Bosch BMI160
8
9maintainers:
10  - Jonathan Cameron <jic23@kernel.org>
11
12description: |
13  Inertial Measurement Unit with Accelerometer, Gyroscope and externally
14  connectable Magnetometer
15  https://www.bosch-sensortec.com/bst/products/all_products/bmi160
16
17properties:
18  compatible:
19    oneOf:
20      - const: bosch,bmi160
21      - items:
22          - const: bosch,bmi120
23          - const: bosch,bmi160
24
25  reg:
26    maxItems: 1
27
28  interrupts:
29    maxItems: 1
30
31  interrupt-names:
32    enum:
33      - INT1
34      - INT2
35    description: |
36      set to "INT1" if INT1 pin should be used as interrupt input, set
37      to "INT2" if INT2 pin should be used instead
38
39  drive-open-drain:
40    type: boolean
41    description: |
42      set if the specified interrupt pin should be configured as
43      open drain. If not set, defaults to push-pull.
44
45  vdd-supply:
46    description: provide VDD power to the sensor.
47
48  vddio-supply:
49    description: provide VDD IO power to the sensor.
50
51  mount-matrix:
52    description: an optional 3x3 mounting rotation matrix
53
54required:
55  - compatible
56  - reg
57
58allOf:
59  - $ref: /schemas/spi/spi-peripheral-props.yaml#
60
61unevaluatedProperties: false
62
63examples:
64  - |
65    // Example for I2C
66    #include <dt-bindings/interrupt-controller/irq.h>
67    i2c {
68        #address-cells = <1>;
69        #size-cells = <0>;
70
71        bmi160@68 {
72            compatible = "bosch,bmi160";
73            reg = <0x68>;
74            vdd-supply = <&pm8916_l17>;
75            vddio-supply = <&pm8916_l6>;
76            interrupt-parent = <&gpio4>;
77            interrupts = <12 IRQ_TYPE_EDGE_RISING>;
78            interrupt-names = "INT1";
79            mount-matrix = "0", "1", "0",
80                           "-1", "0", "0",
81                           "0", "0", "1";
82        };
83    };
84  - |
85    // Example for SPI
86    #include <dt-bindings/interrupt-controller/irq.h>
87    spi {
88        #address-cells = <1>;
89        #size-cells = <0>;
90
91        bmi160@0 {
92            compatible = "bosch,bmi160";
93            reg = <0>;
94            spi-max-frequency = <10000000>;
95            interrupt-parent = <&gpio2>;
96            interrupts = <12 IRQ_TYPE_EDGE_RISING>;
97            interrupt-names = "INT2";
98        };
99    };
100