1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/imu/invensense,mpu6050.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS MotionTracking Device 8 9maintainers: 10 - Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> 11 12description: | 13 These devices support both I2C and SPI bus interfaces. 14 15properties: 16 compatible: 17 oneOf: 18 - enum: 19 - invensense,iam20680 20 - invensense,icm20608 21 - invensense,icm20609 22 - invensense,icm20689 23 - invensense,icm20602 24 - invensense,icm20690 25 - invensense,mpu6000 26 - invensense,mpu6050 27 - invensense,mpu6500 28 - invensense,mpu6515 29 - invensense,mpu6880 30 - invensense,mpu9150 31 - invensense,mpu9250 32 - invensense,mpu9255 33 - items: 34 - const: invensense,icm20608d 35 - const: invensense,icm20608 36 37 reg: 38 maxItems: 1 39 40 interrupts: 41 maxItems: 1 42 43 spi-max-frequency: true 44 45 vdd-supply: true 46 vddio-supply: true 47 48 mount-matrix: true 49 50 i2c-gate: 51 $ref: /schemas/i2c/i2c-controller.yaml 52 unevaluatedProperties: false 53 description: | 54 These devices also support an auxiliary i2c bus via an i2c-gate. 55 56allOf: 57 - if: 58 not: 59 properties: 60 compatible: 61 contains: 62 enum: 63 - invensense,mpu9150 64 - invensense,mpu9250 65 - invensense,mpu9255 66 then: 67 properties: 68 i2c-gate: false 69 70additionalProperties: false 71 72required: 73 - compatible 74 - reg 75 - interrupts 76 77examples: 78 - | 79 #include <dt-bindings/interrupt-controller/irq.h> 80 i2c { 81 #address-cells = <1>; 82 #size-cells = <0>; 83 84 imu@68 { 85 compatible = "invensense,mpu9250"; 86 reg = <0x68>; 87 interrupt-parent = <&gpio3>; 88 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; 89 mount-matrix = "-0.984807753012208", /* x0 */ 90 "0", /* y0 */ 91 "-0.173648177666930", /* z0 */ 92 "0", /* x1 */ 93 "-1", /* y1 */ 94 "0", /* z1 */ 95 "-0.173648177666930", /* x2 */ 96 "0", /* y2 */ 97 "0.984807753012208"; /* z2 */ 98 i2c-gate { 99 #address-cells = <1>; 100 #size-cells = <0>; 101 magnetometer@c { 102 compatible = "asahi-kasei,ak8975"; 103 reg = <0x0c>; 104 }; 105 }; 106 }; 107 }; 108... 109