xref: /freebsd/sys/contrib/device-tree/Bindings/iio/imu/adi,adis16475.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
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    $ref: /schemas/types.yaml#/definitions/uint32
71    minimum: 0
72    maximum: 3
73
74  adi,scaled-output-hz:
75    description:
76      This property must be present if the clock mode is scaled-sync through
77      clock-names property. In this mode, the input clock can have a range
78      of 1Hz to 128HZ which must be scaled to originate an allowable sample
79      rate. This property specifies that rate.
80    minimum: 1900
81    maximum: 2100
82
83required:
84  - compatible
85  - reg
86  - interrupts
87  - spi-cpha
88  - spi-cpol
89
90allOf:
91  - if:
92      properties:
93        compatible:
94          contains:
95            enum:
96              - adi,adis16500
97              - adi,adis16505-1
98              - adi,adis16505-2
99              - adi,adis16505-3
100              - adi,adis16507-1
101              - adi,adis16507-2
102              - adi,adis16507-3
103
104    then:
105      properties:
106        adi,sync-mode:
107          minimum: 0
108          maximum: 2
109
110  - if:
111      properties:
112        adi,sync-mode:
113          enum: [1, 2, 3]
114
115    then:
116      dependencies:
117        adi,sync-mode: [ clocks ]
118
119examples:
120  - |
121    #include <dt-bindings/interrupt-controller/irq.h>
122    spi {
123            #address-cells = <1>;
124            #size-cells = <0>;
125
126            adis16475: adis16475-3@0 {
127                    compatible = "adi,adis16475-3";
128                    reg = <0>;
129                    spi-cpha;
130                    spi-cpol;
131                    spi-max-frequency = <2000000>;
132                    interrupts = <4 IRQ_TYPE_EDGE_RISING>;
133                    interrupt-parent = <&gpio>;
134            };
135    };
136...
137