xref: /freebsd/sys/contrib/device-tree/Bindings/iio/imu/invensense,mpu6050.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/imu/invensense,mpu6050.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS MotionTracking Device
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotdescription: |
135def4c47SEmmanuel Vadot  These devices support both I2C and SPI bus interfaces.
145def4c47SEmmanuel Vadot
155def4c47SEmmanuel Vadotproperties:
165def4c47SEmmanuel Vadot  compatible:
17d5b0e70fSEmmanuel Vadot    oneOf:
18d5b0e70fSEmmanuel Vadot      - enum:
195def4c47SEmmanuel Vadot          - invensense,iam20680
205def4c47SEmmanuel Vadot          - invensense,icm20608
215def4c47SEmmanuel Vadot          - invensense,icm20609
225def4c47SEmmanuel Vadot          - invensense,icm20689
235def4c47SEmmanuel Vadot          - invensense,icm20602
245def4c47SEmmanuel Vadot          - invensense,icm20690
255def4c47SEmmanuel Vadot          - invensense,mpu6000
265def4c47SEmmanuel Vadot          - invensense,mpu6050
275def4c47SEmmanuel Vadot          - invensense,mpu6500
285def4c47SEmmanuel Vadot          - invensense,mpu6515
295def4c47SEmmanuel Vadot          - invensense,mpu6880
305def4c47SEmmanuel Vadot          - invensense,mpu9150
315def4c47SEmmanuel Vadot          - invensense,mpu9250
325def4c47SEmmanuel Vadot          - invensense,mpu9255
33d5b0e70fSEmmanuel Vadot      - items:
34*f126890aSEmmanuel Vadot          - const: invensense,icm20600
35*f126890aSEmmanuel Vadot          - const: invensense,icm20602
36*f126890aSEmmanuel Vadot      - items:
37d5b0e70fSEmmanuel Vadot          - const: invensense,icm20608d
38d5b0e70fSEmmanuel Vadot          - const: invensense,icm20608
395def4c47SEmmanuel Vadot
405def4c47SEmmanuel Vadot  reg:
415def4c47SEmmanuel Vadot    maxItems: 1
425def4c47SEmmanuel Vadot
435def4c47SEmmanuel Vadot  interrupts:
445def4c47SEmmanuel Vadot    maxItems: 1
455def4c47SEmmanuel Vadot
465def4c47SEmmanuel Vadot  vdd-supply: true
475def4c47SEmmanuel Vadot  vddio-supply: true
485def4c47SEmmanuel Vadot
495def4c47SEmmanuel Vadot  mount-matrix: true
505def4c47SEmmanuel Vadot
515def4c47SEmmanuel Vadot  i2c-gate:
525def4c47SEmmanuel Vadot    $ref: /schemas/i2c/i2c-controller.yaml
535def4c47SEmmanuel Vadot    unevaluatedProperties: false
545def4c47SEmmanuel Vadot    description: |
555def4c47SEmmanuel Vadot      These devices also support an auxiliary i2c bus via an i2c-gate.
565def4c47SEmmanuel Vadot
575def4c47SEmmanuel VadotallOf:
587ef62cebSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
595def4c47SEmmanuel Vadot  - if:
605def4c47SEmmanuel Vadot      not:
615def4c47SEmmanuel Vadot        properties:
625def4c47SEmmanuel Vadot          compatible:
635def4c47SEmmanuel Vadot            contains:
645def4c47SEmmanuel Vadot              enum:
655def4c47SEmmanuel Vadot                - invensense,mpu9150
665def4c47SEmmanuel Vadot                - invensense,mpu9250
675def4c47SEmmanuel Vadot                - invensense,mpu9255
685def4c47SEmmanuel Vadot    then:
695def4c47SEmmanuel Vadot      properties:
705def4c47SEmmanuel Vadot        i2c-gate: false
715def4c47SEmmanuel Vadot
727ef62cebSEmmanuel VadotunevaluatedProperties: false
735def4c47SEmmanuel Vadot
745def4c47SEmmanuel Vadotrequired:
755def4c47SEmmanuel Vadot  - compatible
765def4c47SEmmanuel Vadot  - reg
775def4c47SEmmanuel Vadot  - interrupts
785def4c47SEmmanuel Vadot
795def4c47SEmmanuel Vadotexamples:
805def4c47SEmmanuel Vadot  - |
815def4c47SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
825def4c47SEmmanuel Vadot    i2c {
835def4c47SEmmanuel Vadot        #address-cells = <1>;
845def4c47SEmmanuel Vadot        #size-cells = <0>;
855def4c47SEmmanuel Vadot
865def4c47SEmmanuel Vadot        imu@68 {
875def4c47SEmmanuel Vadot            compatible = "invensense,mpu9250";
885def4c47SEmmanuel Vadot            reg = <0x68>;
895def4c47SEmmanuel Vadot            interrupt-parent = <&gpio3>;
905def4c47SEmmanuel Vadot            interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
915def4c47SEmmanuel Vadot            mount-matrix = "-0.984807753012208",  /* x0 */
925def4c47SEmmanuel Vadot                           "0",                   /* y0 */
935def4c47SEmmanuel Vadot                           "-0.173648177666930",  /* z0 */
945def4c47SEmmanuel Vadot                           "0",                   /* x1 */
955def4c47SEmmanuel Vadot                           "-1",                  /* y1 */
965def4c47SEmmanuel Vadot                           "0",                   /* z1 */
975def4c47SEmmanuel Vadot                           "-0.173648177666930",  /* x2 */
985def4c47SEmmanuel Vadot                           "0",                   /* y2 */
995def4c47SEmmanuel Vadot                           "0.984807753012208";   /* z2 */
1005def4c47SEmmanuel Vadot            i2c-gate {
1015def4c47SEmmanuel Vadot                #address-cells = <1>;
1025def4c47SEmmanuel Vadot                #size-cells = <0>;
1035def4c47SEmmanuel Vadot                magnetometer@c {
104e67e8565SEmmanuel Vadot                    compatible = "asahi-kasei,ak8975";
1055def4c47SEmmanuel Vadot                    reg = <0x0c>;
1065def4c47SEmmanuel Vadot                };
1075def4c47SEmmanuel Vadot            };
1085def4c47SEmmanuel Vadot        };
1095def4c47SEmmanuel Vadot    };
1105def4c47SEmmanuel Vadot...
111