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 49required: 50 - compatible 51 - reg 52 53allOf: 54 - $ref: /schemas/spi/spi-peripheral-props.yaml# 55 56unevaluatedProperties: false 57 58examples: 59 - | 60 // Example for I2C 61 #include <dt-bindings/interrupt-controller/irq.h> 62 i2c { 63 #address-cells = <1>; 64 #size-cells = <0>; 65 66 bmi160@68 { 67 compatible = "bosch,bmi160"; 68 reg = <0x68>; 69 vdd-supply = <&pm8916_l17>; 70 vddio-supply = <&pm8916_l6>; 71 interrupt-parent = <&gpio4>; 72 interrupts = <12 IRQ_TYPE_EDGE_RISING>; 73 interrupt-names = "INT1"; 74 mount-matrix = "0", "1", "0", 75 "-1", "0", "0", 76 "0", "0", "1"; 77 }; 78 }; 79 - | 80 // Example for SPI 81 #include <dt-bindings/interrupt-controller/irq.h> 82 spi { 83 #address-cells = <1>; 84 #size-cells = <0>; 85 86 bmi160@0 { 87 compatible = "bosch,bmi160"; 88 reg = <0>; 89 spi-max-frequency = <10000000>; 90 interrupt-parent = <&gpio2>; 91 interrupts = <12 IRQ_TYPE_EDGE_RISING>; 92 interrupt-names = "INT2"; 93 }; 94 }; 95