xref: /linux/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/imu/adi,adis16475.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADIS16475 and similar IMUs
8
9maintainers:
10  - Nuno Sá <nuno.sa@analog.com>
11
12description: |
13  Analog Devices ADIS16475 and similar IMUs
14  https://www.analog.com/media/en/technical-documentation/data-sheets/ADIS16475.pdf
15
16properties:
17  compatible:
18    enum:
19      - adi,adis16475-1
20      - adi,adis16475-2
21      - adi,adis16475-3
22      - adi,adis16477-1
23      - adi,adis16477-2
24      - adi,adis16477-3
25      - adi,adis16470
26      - adi,adis16465-1
27      - adi,adis16465-2
28      - adi,adis16465-3
29      - adi,adis16467-1
30      - adi,adis16467-2
31      - adi,adis16467-3
32      - adi,adis16500
33      - adi,adis16505-1
34      - adi,adis16505-2
35      - adi,adis16505-3
36      - adi,adis16507-1
37      - adi,adis16507-2
38      - adi,adis16507-3
39
40  reg:
41    maxItems: 1
42
43  spi-cpha: true
44
45  spi-cpol: true
46
47  spi-max-frequency:
48    maximum: 2000000
49
50  spi-cs-inactive-delay-ns:
51    minimum: 16000
52    default: 16000
53
54  interrupts:
55    maxItems: 1
56
57  clocks:
58    maxItems: 1
59
60  reset-gpios:
61    description:
62      Must be the device tree identifier of the RESET pin. If specified,
63      it will be asserted during driver probe. As the line is active low,
64      it should be marked GPIO_ACTIVE_LOW.
65    maxItems: 1
66
67  adi,sync-mode:
68    description:
69      Configures the device SYNC pin. The following modes are supported
70      0 - output_sync
71      1 - direct_sync
72      2 - scaled_sync
73      3 - pulse_sync
74    $ref: /schemas/types.yaml#/definitions/uint32
75    minimum: 0
76    maximum: 3
77
78required:
79  - compatible
80  - reg
81  - interrupts
82  - spi-cpha
83  - spi-cpol
84
85allOf:
86  - $ref: /schemas/spi/spi-peripheral-props.yaml#
87  - if:
88      properties:
89        compatible:
90          contains:
91            enum:
92              - adi,adis16500
93              - adi,adis16505-1
94              - adi,adis16505-2
95              - adi,adis16505-3
96              - adi,adis16507-1
97              - adi,adis16507-2
98              - adi,adis16507-3
99
100    then:
101      properties:
102        adi,sync-mode:
103          minimum: 0
104          maximum: 2
105
106  - if:
107      properties:
108        adi,sync-mode:
109          enum: [1, 2, 3]
110
111    then:
112      dependencies:
113        adi,sync-mode: [ clocks ]
114
115unevaluatedProperties: false
116
117examples:
118  - |
119    #include <dt-bindings/interrupt-controller/irq.h>
120    spi {
121        #address-cells = <1>;
122        #size-cells = <0>;
123
124        adis16475: adis16475-3@0 {
125            compatible = "adi,adis16475-3";
126            reg = <0>;
127            spi-cpha;
128            spi-cpol;
129            spi-max-frequency = <2000000>;
130            interrupts = <4 IRQ_TYPE_EDGE_RISING>;
131            interrupt-parent = <&gpio>;
132        };
133    };
134...
135