0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/imu/bosch,bmi160.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Bosch BMI160
0008
0009 maintainers:
0010 - Jonathan Cameron <jic23@kernel.org>
0011
0012 description: |
0013 Inertial Measurement Unit with Accelerometer, Gyroscope and externally
0014 connectable Magnetometer
0015 https://www.bosch-sensortec.com/bst/products/all_products/bmi160
0016
0017 properties:
0018 compatible:
0019 const: bosch,bmi160
0020
0021 reg:
0022 maxItems: 1
0023
0024 interrupts:
0025 maxItems: 1
0026
0027 interrupt-names:
0028 enum:
0029 - INT1
0030 - INT2
0031 description: |
0032 set to "INT1" if INT1 pin should be used as interrupt input, set
0033 to "INT2" if INT2 pin should be used instead
0034
0035 drive-open-drain:
0036 description: |
0037 set if the specified interrupt pin should be configured as
0038 open drain. If not set, defaults to push-pull.
0039
0040 vdd-supply:
0041 description: provide VDD power to the sensor.
0042
0043 vddio-supply:
0044 description: provide VDD IO power to the sensor.
0045
0046 mount-matrix:
0047 description: an optional 3x3 mounting rotation matrix
0048
0049 spi-max-frequency: true
0050
0051 required:
0052 - compatible
0053 - reg
0054
0055 additionalProperties: false
0056
0057 examples:
0058 - |
0059 // Example for I2C
0060 #include <dt-bindings/interrupt-controller/irq.h>
0061 i2c {
0062 #address-cells = <1>;
0063 #size-cells = <0>;
0064
0065 bmi160@68 {
0066 compatible = "bosch,bmi160";
0067 reg = <0x68>;
0068 vdd-supply = <&pm8916_l17>;
0069 vddio-supply = <&pm8916_l6>;
0070 interrupt-parent = <&gpio4>;
0071 interrupts = <12 IRQ_TYPE_EDGE_RISING>;
0072 interrupt-names = "INT1";
0073 mount-matrix = "0", "1", "0",
0074 "-1", "0", "0",
0075 "0", "0", "1";
0076 };
0077 };
0078 - |
0079 // Example for SPI
0080 #include <dt-bindings/interrupt-controller/irq.h>
0081 spi {
0082 #address-cells = <1>;
0083 #size-cells = <0>;
0084
0085 bmi160@0 {
0086 compatible = "bosch,bmi160";
0087 reg = <0>;
0088 spi-max-frequency = <10000000>;
0089 interrupt-parent = <&gpio2>;
0090 interrupts = <12 IRQ_TYPE_EDGE_RISING>;
0091 interrupt-names = "INT2";
0092 };
0093 };