xref: /linux/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml (revision f77d26a9fc525286bcef3d4f98b52e17482cf49c)
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  interrupts:
51    maxItems: 1
52
53  clocks:
54    maxItems: 1
55
56  reset-gpios:
57    description:
58      Must be the device tree identifier of the RESET pin. If specified,
59      it will be asserted during driver probe. As the line is active low,
60      it should be marked GPIO_ACTIVE_LOW.
61    maxItems: 1
62
63  adi,sync-mode:
64    description:
65      Configures the device SYNC pin. The following modes are supported
66      0 - output_sync
67      1 - direct_sync
68      2 - scaled_sync
69      3 - pulse_sync
70    allOf:
71      - $ref: /schemas/types.yaml#/definitions/uint32
72    minimum: 0
73    maximum: 3
74
75  adi,scaled-output-hz:
76    description:
77      This property must be present if the clock mode is scaled-sync through
78      clock-names property. In this mode, the input clock can have a range
79      of 1Hz to 128HZ which must be scaled to originate an allowable sample
80      rate. This property specifies that rate.
81    minimum: 1900
82    maximum: 2100
83
84required:
85  - compatible
86  - reg
87  - interrupts
88  - spi-cpha
89  - spi-cpol
90
91allOf:
92  - if:
93      properties:
94        compatible:
95          contains:
96            enum:
97              - adi,adis16500
98              - adi,adis16505-1
99              - adi,adis16505-2
100              - adi,adis16505-3
101              - adi,adis16507-1
102              - adi,adis16507-2
103              - adi,adis16507-3
104
105    then:
106      properties:
107        adi,sync-mode:
108          minimum: 0
109          maximum: 2
110
111  - if:
112      properties:
113        adi,sync-mode:
114          enum: [1, 2, 3]
115
116    then:
117      dependencies:
118        adi,sync-mode: [ clocks ]
119
120examples:
121  - |
122    #include <dt-bindings/interrupt-controller/irq.h>
123    spi {
124            #address-cells = <1>;
125            #size-cells = <0>;
126
127            adis16475: adis16475-3@0 {
128                    compatible = "adi,adis16475-3";
129                    reg = <0>;
130                    spi-cpha;
131                    spi-cpol;
132                    spi-max-frequency = <2000000>;
133                    interrupts = <4 IRQ_TYPE_EDGE_RISING>;
134                    interrupt-parent = <&gpio>;
135            };
136    };
137...
138