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