xref: /linux/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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,adis16501
34      - adi,adis16505-1
35      - adi,adis16505-2
36      - adi,adis16505-3
37      - adi,adis16507-1
38      - adi,adis16507-2
39      - adi,adis16507-3
40      - adi,adis16575-2
41      - adi,adis16575-3
42      - adi,adis16576-2
43      - adi,adis16576-3
44      - adi,adis16577-2
45      - adi,adis16577-3
46
47  reg:
48    maxItems: 1
49
50  spi-cpha: true
51
52  spi-cpol: true
53
54  spi-max-frequency:
55    maximum: 2000000
56
57  spi-cs-inactive-delay-ns:
58    minimum: 16000
59    default: 16000
60
61  interrupts:
62    maxItems: 1
63
64  clocks:
65    maxItems: 1
66
67  reset-gpios:
68    description:
69      Must be the device tree identifier of the RESET pin. If specified,
70      it will be asserted during driver probe. As the line is active low,
71      it should be marked GPIO_ACTIVE_LOW.
72    maxItems: 1
73
74  adi,sync-mode:
75    description:
76      Configures the device SYNC pin. The following modes are supported
77      0 - output_sync
78      1 - direct_sync
79      2 - scaled_sync
80      3 - pulse_sync
81    $ref: /schemas/types.yaml#/definitions/uint32
82    minimum: 0
83    maximum: 3
84
85required:
86  - compatible
87  - reg
88  - interrupts
89  - spi-cpha
90  - spi-cpol
91
92allOf:
93  - $ref: /schemas/spi/spi-peripheral-props.yaml#
94  - if:
95      properties:
96        compatible:
97          contains:
98            enum:
99              - adi,adis16500
100              - adi,adis16501
101              - adi,adis16505-1
102              - adi,adis16505-2
103              - adi,adis16505-3
104              - adi,adis16507-1
105              - adi,adis16507-2
106              - adi,adis16507-3
107              - adi,adis16575-2
108              - adi,adis16575-3
109              - adi,adis16576-2
110              - adi,adis16576-3
111              - adi,adis16577-2
112              - adi,adis16577-3
113
114    then:
115      properties:
116        adi,sync-mode:
117          minimum: 0
118          maximum: 2
119
120  - if:
121      properties:
122        adi,sync-mode:
123          enum: [1, 2, 3]
124
125    then:
126      dependencies:
127        adi,sync-mode: [ clocks ]
128
129  - if:
130      properties:
131        compatible:
132          contains:
133            enum:
134              - adi,adis16575-2
135              - adi,adis16575-3
136              - adi,adis16576-2
137              - adi,adis16576-3
138              - adi,adis16577-2
139              - adi,adis16577-3
140
141    then:
142      properties:
143        spi-max-frequency:
144          maximum: 15000000
145
146unevaluatedProperties: false
147
148examples:
149  - |
150    #include <dt-bindings/interrupt-controller/irq.h>
151    spi {
152        #address-cells = <1>;
153        #size-cells = <0>;
154
155        adis16475: adis16475-3@0 {
156            compatible = "adi,adis16475-3";
157            reg = <0>;
158            spi-cpha;
159            spi-cpol;
160            spi-max-frequency = <2000000>;
161            interrupts = <4 IRQ_TYPE_EDGE_RISING>;
162            interrupt-parent = <&gpio>;
163        };
164    };
165...
166