xref: /freebsd/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml (revision 3a3af6b2a160bea72509a9d5ef84e25906b0478a)
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    enum:
18      - invensense,iam20680
19      - invensense,icm20608
20      - invensense,icm20609
21      - invensense,icm20689
22      - invensense,icm20602
23      - invensense,icm20690
24      - invensense,mpu6000
25      - invensense,mpu6050
26      - invensense,mpu6500
27      - invensense,mpu6515
28      - invensense,mpu6880
29      - invensense,mpu9150
30      - invensense,mpu9250
31      - invensense,mpu9255
32
33  reg:
34    maxItems: 1
35
36  interrupts:
37    maxItems: 1
38
39  spi-max-frequency: true
40
41  vdd-supply: true
42  vddio-supply: true
43
44  mount-matrix: true
45
46  i2c-gate:
47    $ref: /schemas/i2c/i2c-controller.yaml
48    unevaluatedProperties: false
49    description: |
50      These devices also support an auxiliary i2c bus via an i2c-gate.
51
52allOf:
53  - if:
54      not:
55        properties:
56          compatible:
57            contains:
58              enum:
59                - invensense,mpu9150
60                - invensense,mpu9250
61                - invensense,mpu9255
62    then:
63      properties:
64        i2c-gate: false
65
66additionalProperties: false
67
68required:
69  - compatible
70  - reg
71  - interrupts
72
73examples:
74  - |
75    #include <dt-bindings/interrupt-controller/irq.h>
76    i2c {
77        #address-cells = <1>;
78        #size-cells = <0>;
79
80        imu@68 {
81            compatible = "invensense,mpu9250";
82            reg = <0x68>;
83            interrupt-parent = <&gpio3>;
84            interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
85            mount-matrix = "-0.984807753012208",  /* x0 */
86                           "0",                   /* y0 */
87                           "-0.173648177666930",  /* z0 */
88                           "0",                   /* x1 */
89                           "-1",                  /* y1 */
90                           "0",                   /* z1 */
91                           "-0.173648177666930",  /* x2 */
92                           "0",                   /* y2 */
93                           "0.984807753012208";   /* z2 */
94            i2c-gate {
95                #address-cells = <1>;
96                #size-cells = <0>;
97                magnetometer@c {
98                    compatible = "asahi-kasei,ak8975";
99                    reg = <0x0c>;
100                };
101            };
102        };
103    };
104...
105