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