xref: /freebsd/sys/contrib/device-tree/Bindings/iio/imu/bosch,bmi160.yaml (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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
40  vdd-supply:
41    description: provide VDD power to the sensor.
42
43  vddio-supply:
44    description: provide VDD IO power to the sensor.
45
46  mount-matrix:
47    description: an optional 3x3 mounting rotation matrix
48
49  spi-max-frequency: true
50
51required:
52  - compatible
53  - reg
54
55additionalProperties: false
56
57examples:
58  - |
59    // Example for I2C
60    #include <dt-bindings/interrupt-controller/irq.h>
61    i2c {
62        #address-cells = <1>;
63        #size-cells = <0>;
64
65        bmi160@68 {
66                compatible = "bosch,bmi160";
67                reg = <0x68>;
68                vdd-supply = <&pm8916_l17>;
69                vddio-supply = <&pm8916_l6>;
70                interrupt-parent = <&gpio4>;
71                interrupts = <12 IRQ_TYPE_EDGE_RISING>;
72                interrupt-names = "INT1";
73                mount-matrix = "0", "1", "0",
74                               "-1", "0", "0",
75                               "0", "0", "1";
76        };
77    };
78  - |
79    // Example for SPI
80    #include <dt-bindings/interrupt-controller/irq.h>
81    spi {
82        #address-cells = <1>;
83        #size-cells = <0>;
84
85        bmi160@0 {
86                compatible = "bosch,bmi160";
87                reg = <0>;
88                spi-max-frequency = <10000000>;
89                interrupt-parent = <&gpio2>;
90                interrupts = <12 IRQ_TYPE_EDGE_RISING>;
91                interrupt-names = "INT2";
92        };
93    };
94