summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
blob: c73533c54588b17275282bec02a6ed36486a9686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/imu/adi,adis16475.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADIS16475 and similar IMUs

maintainers:
  - Nuno Sá <nuno.sa@analog.com>

description: |
  Analog Devices ADIS16475 and similar IMUs
  https://www.analog.com/media/en/technical-documentation/data-sheets/ADIS16475.pdf

properties:
  compatible:
    enum:
      - adi,adis16475-1
      - adi,adis16475-2
      - adi,adis16475-3
      - adi,adis16477-1
      - adi,adis16477-2
      - adi,adis16477-3
      - adi,adis16470
      - adi,adis16465-1
      - adi,adis16465-2
      - adi,adis16465-3
      - adi,adis16467-1
      - adi,adis16467-2
      - adi,adis16467-3
      - adi,adis16500
      - adi,adis16505-1
      - adi,adis16505-2
      - adi,adis16505-3
      - adi,adis16507-1
      - adi,adis16507-2
      - adi,adis16507-3

  reg:
    maxItems: 1

  spi-cpha: true

  spi-cpol: true

  spi-max-frequency:
    maximum: 2000000

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  reset-gpios:
    description:
      Must be the device tree identifier of the RESET pin. If specified,
      it will be asserted during driver probe. As the line is active low,
      it should be marked GPIO_ACTIVE_LOW.
    maxItems: 1

  adi,sync-mode:
    description:
      Configures the device SYNC pin. The following modes are supported
      0 - output_sync
      1 - direct_sync
      2 - scaled_sync
      3 - pulse_sync
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 0
    maximum: 3

required:
  - compatible
  - reg
  - interrupts
  - spi-cpha
  - spi-cpol

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,adis16500
              - adi,adis16505-1
              - adi,adis16505-2
              - adi,adis16505-3
              - adi,adis16507-1
              - adi,adis16507-2
              - adi,adis16507-3

    then:
      properties:
        adi,sync-mode:
          minimum: 0
          maximum: 2

  - if:
      properties:
        adi,sync-mode:
          enum: [1, 2, 3]

    then:
      dependencies:
        adi,sync-mode: [ clocks ]

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        adis16475: adis16475-3@0 {
            compatible = "adi,adis16475-3";
            reg = <0>;
            spi-cpha;
            spi-cpol;
            spi-max-frequency = <2000000>;
            interrupts = <4 IRQ_TYPE_EDGE_RISING>;
            interrupt-parent = <&gpio>;
        };
    };
...