WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / iio / imu / bosch,bmi160.yaml
blob6e73cd889b5c717984ce1bf8dc026c2bedc221f6
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#
7 title: Bosch BMI160
9 maintainers:
10   - Jonathan Cameron <jic23@kernel.org>
12 description: |
13   Inertial Measurement Unit with Accelerometer, Gyroscope and externally
14   connectable Magnetometer
15   https://www.bosch-sensortec.com/bst/products/all_products/bmi160
17 properties:
18   compatible:
19     const: bosch,bmi160
21   reg:
22     maxItems: 1
24   interrupts:
25     maxItems: 1
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
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.
40   vdd-supply:
41     description: provide VDD power to the sensor.
43   vddio-supply:
44     description: provide VDD IO power to the sensor.
46   mount-matrix:
47     description: an optional 3x3 mounting rotation matrix
49   spi-max-frequency: true
51 required:
52   - compatible
53   - reg
55 additionalProperties: false
57 examples:
58   - |
59     // Example for I2C
60     #include <dt-bindings/interrupt-controller/irq.h>
61     i2c {
62         #address-cells = <1>;
63         #size-cells = <0>;
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>;
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     };