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    const: bosch,bmi160
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  interrupt-names:
28    enum:
29      - INT1
30      - INT2
31    description: |
32      set to "INT1" if INT1 pin should be used as interrupt input, set
33      to "INT2" if INT2 pin should be used instead
34
35  drive-open-drain:
36    description: |
37      set if the specified interrupt pin should be configured as
38      open drain. If not set, defaults to push-pull.
39
40required:
41  - compatible
42  - reg
43
44examples:
45  - |
46    // Example for I2C
47    #include <dt-bindings/interrupt-controller/irq.h>
48    i2c {
49        #address-cells = <1>;
50        #size-cells = <0>;
51
52        bmi160@68 {
53                compatible = "bosch,bmi160";
54                reg = <0x68>;
55                interrupt-parent = <&gpio4>;
56                interrupts = <12 IRQ_TYPE_EDGE_RISING>;
57                interrupt-names = "INT1";
58        };
59    };
60  - |
61    // Example for SPI
62    #include <dt-bindings/interrupt-controller/irq.h>
63    spi {
64        #address-cells = <1>;
65        #size-cells = <0>;
66
67        bmi160@0 {
68                compatible = "bosch,bmi160";
69                reg = <0>;
70                spi-max-frequency = <10000000>;
71                interrupt-parent = <&gpio2>;
72                interrupts = <12 IRQ_TYPE_EDGE_RISING>;
73                interrupt-names = "INT2";
74        };
75    };
76