xref: /linux/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml (revision 34dc1baba215b826e454b8d19e4f24adbeb7d00d)
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,icm20600
35          - const: invensense,icm20602
36      - items:
37          - const: invensense,icm20608d
38          - const: invensense,icm20608
39
40  reg:
41    maxItems: 1
42
43  interrupts:
44    maxItems: 1
45
46  vdd-supply: true
47  vddio-supply: true
48
49  mount-matrix: true
50
51  i2c-gate:
52    $ref: /schemas/i2c/i2c-controller.yaml
53    unevaluatedProperties: false
54    description: |
55      These devices also support an auxiliary i2c bus via an i2c-gate.
56
57allOf:
58  - $ref: /schemas/spi/spi-peripheral-props.yaml#
59  - if:
60      not:
61        properties:
62          compatible:
63            contains:
64              enum:
65                - invensense,mpu9150
66                - invensense,mpu9250
67                - invensense,mpu9255
68    then:
69      properties:
70        i2c-gate: false
71
72unevaluatedProperties: false
73
74required:
75  - compatible
76  - reg
77  - interrupts
78
79examples:
80  - |
81    #include <dt-bindings/interrupt-controller/irq.h>
82    i2c {
83        #address-cells = <1>;
84        #size-cells = <0>;
85
86        imu@68 {
87            compatible = "invensense,mpu9250";
88            reg = <0x68>;
89            interrupt-parent = <&gpio3>;
90            interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
91            mount-matrix = "-0.984807753012208",  /* x0 */
92                           "0",                   /* y0 */
93                           "-0.173648177666930",  /* z0 */
94                           "0",                   /* x1 */
95                           "-1",                  /* y1 */
96                           "0",                   /* z1 */
97                           "-0.173648177666930",  /* x2 */
98                           "0",                   /* y2 */
99                           "0.984807753012208";   /* z2 */
100            i2c-gate {
101                #address-cells = <1>;
102                #size-cells = <0>;
103                magnetometer@c {
104                    compatible = "asahi-kasei,ak8975";
105                    reg = <0x0c>;
106                };
107            };
108        };
109    };
110...
111