summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml
blob: 72d2e910f2065309f89eb8916da8755ca6815934 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/addac/adi,ad74115.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD74115H device

maintainers:
  - Cosmin Tanislav <cosmin.tanislav@analog.com>

description: |
  The AD74115H is a single-channel software configurable input/output
  device for industrial control applications. It contains functionality for
  analog output, analog input, digital output, digital input, resistance
  temperature detector, and thermocouple measurements integrated into a single
  chip solution with an SPI interface. The device features a 16-bit ADC and a
  14-bit DAC.

    https://www.analog.com/en/products/ad74115h.html

properties:
  compatible:
    enum:
      - adi,ad74115h

  reg:
    maxItems: 1

  spi-max-frequency:
    maximum: 24000000

  spi-cpol: true

  reset-gpios: true

  interrupts:
    minItems: 1
    maxItems: 2

  interrupt-names:
    minItems: 1
    maxItems: 2
    items:
      enum:
        - adc_rdy
        - alert

  avdd-supply: true
  avcc-supply: true
  dvcc-supply: true
  dovdd-supply: true
  refin-supply: true

  adi,ch-func:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Channel function.
      0 - High impedance
      1 - Voltage output
      2 - Current output
      3 - Voltage input
      4 - Current input, externally-powered
      5 - Current input, loop-powered
      6 - Resistance input
      7 - RTD measure
      8 - Digital input logic
      9 - Digital input, loop-powered
      10 - Current output with HART
      11 - Current input, externally-powered, with HART
      12 - Current input, loop-powered, with HART
    minimum: 0
    maximum: 12
    default: 0

  adi,conv2-mux:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Input node for ADC conversion 2.
      0 - SENSE_EXT1 to AGND_SENSE
      1 - SENSE_EXT2 to AGND_SENSE
      2 - SENSE_EXT2 to SENSE_EXT1
      3 - AGND to AGND
    minimum: 0
    maximum: 3
    default: 0

  adi,conv2-range-microvolt:
    description: Conversion range for ADC conversion 2.
    oneOf:
      - items:
          - enum: [-2500000, 0]
          - const: 2500000
      - items:
          - enum: [-12000000, 0]
          - const: 12000000
      - items:
          - const: -2500000
          - const: 0
      - items:
          - const: -104000
          - const: 104000
      - items:
          - const: 0
          - const: 625000

  adi,sense-agnd-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the AGND sense pin.

  adi,lf-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the low-side filtered
      sense pin.

  adi,hf-buffer-low-power:
    type: boolean
    description:
      Whether to enable low-power buffered mode for the high-side filtered
      sense pin.

  adi,ext2-buffer-low-power:
    type: boolean
    description: Whether to enable low-power buffered mode for the EXT2 pin.

  adi,ext1-buffer-low-power:
    type: boolean
    description: Whether to enable low-power buffered mode for the EXT1 pin.

  adi,comparator-invert:
    type: boolean
    description: Whether to invert the comparator output.

  adi,digital-input-sink-range-high:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      When not present, the digital input range is from 0 to 3700uA in steps
      of 120uA, with a ~2k series resistance.
      When present, the digital input range is from 0 to 7400uA in steps
      of 240uA, with a ~1k series resistance.

  adi,digital-input-sink-microamp:
    description: Sink current in digital input mode.
    minimum: 0
    maximum: 3700
    default: 0

  adi,digital-input-debounce-mode-counter-reset:
    type: boolean
    description: |
      When not present, a counter increments when the signal is asserted
      and decrements when the signal is de-asserted.
      When present, a counter increments while the signal is asserted and
      resets when the signal de-asserts

  adi,digital-input-unbuffered:
    type: boolean
    description: Whether to buffer digital input signals.

  adi,digital-input-short-circuit-detection:
    type: boolean
    description: Whether to detect digital input short circuits.

  adi,digital-input-open-circuit-detection:
    type: boolean
    description: Whether to detect digital input open circuits.

  adi,digital-input-threshold-mode-fixed:
    type: boolean
    description: |
      When not present, the digital input threshold range is -0.96 * AVDD
      to AVDD.
      When present, the threshold range is fixed from -19V to 30V.

  adi,dac-bipolar:
    type: boolean
    description: |
      When not present, the DAC operates in the 0V to 12V range.
      When present, the DAC operates in the -12V to 12V range.

  adi,charge-pump:
    type: boolean
    description: Whether to enable the internal charge pump.

  adi,dac-hart-slew:
    type: boolean
    description: Whether to use a HART-compatible slew rate.

  adi,dac-current-limit-low:
    type: boolean
    description: |
      When not present, the DAC short-circuit current limit is 32mA in
      either source or sink for VOUT and 4mA sink for IOUT.
      When present, the limit is 16mA in either source or sink for VOUT,
      1mA sink for IOUT.

  adi,4-wire-rtd:
    type: boolean
    description: |
      When not present, the ADC should be used for measuring 3-wire RTDs.
      When present, the ADC should be used for measuring 4-wire RTDs.

  adi,3-wire-rtd-excitation-swap:
    type: boolean
    description: Whether to swap the excitation for 3-wire RTD.

  adi,rtd-excitation-current-microamp:
    description: Excitation current to apply to RTD.
    enum: [250, 500, 750, 1000]
    default: 250

  adi,ext1-burnout:
    type: boolean
    description: Whether to enable burnout current for EXT1.

  adi,ext1-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Burnout current in nanoamps to be applied to EXT1.
    enum: [0, 50, 500, 1000, 10000]
    default: 0

  adi,ext1-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for EXT1 is sinking.
      When present, the burnout current polarity for EXT1 is sourcing.

  adi,ext2-burnout:
    type: boolean
    description: Whether to enable burnout current for EXT2.

  adi,ext2-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Burnout current in nanoamps to be applied to EXT2.
    enum: [0, 50, 500, 1000, 10000]
    default: 0

  adi,ext2-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for EXT2 is sinking.
      When present, the burnout current polarity for EXT2 is sourcing.

  adi,viout-burnout:
    type: boolean
    description: Whether to enable burnout current for VIOUT.

  adi,viout-burnout-current-nanoamp:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Burnout current in nanoamps to be applied to VIOUT.
    enum: [0, 1000, 10000]
    default: 0

  adi,viout-burnout-current-polarity-sourcing:
    type: boolean
    description: |
      When not present, the burnout current polarity for VIOUT is sinking.
      When present, the burnout current polarity for VIOUT is sourcing.

  adi,gpio0-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Comparator output
      3 - Control HART CD
      4 - Monitor HART CD
      5 - Monitor HART EOM status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio1-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Drive external digital output FET
      3 - Control HART RXD
      4 - Monitor HART RXD
      5 - Monitor HART SOM status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio2-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - Drive internal digital output FET
      3 - Control HART TXD
      4 - Monitor HART TXD
      5 - Monitor HART TX complete status
    minimum: 0
    maximum: 5
    default: 0

  adi,gpio3-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      GPIO functions.
      0 - Disabled
      1 - Logic I/O
      2 - High impedance
      3 - Control HART RTS
      4 - Monitor HART RTS
      5 - Monitor HART CD complete status
    minimum: 0
    maximum: 5
    default: 0

required:
  - compatible
  - reg
  - spi-cpol
  - avdd-supply

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      required:
        - adi,digital-input-sink-range-high
    then:
      properties:
        adi,digital-input-sink-microamp:
          maximum: 7400

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    spi {
      #address-cells = <1>;
      #size-cells = <0>;

      addac@0 {
        compatible = "adi,ad74115h";
        reg = <0>;

        spi-max-frequency = <12000000>;
        spi-cpol;

        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;

        interrupt-parent = <&gpio>;
        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
        interrupt-names = "adc_rdy";

        avdd-supply = <&ad74115_avdd>;

        adi,ch-func = <1>;
        adi,conv2-mux = <2>;
        adi,conv2-range-microvolt = <(-12000000) 12000000>;

        adi,gpio0-mode = <1>;
        adi,gpio1-mode = <1>;
        adi,gpio2-mode = <1>;
        adi,gpio3-mode = <1>;

        adi,dac-bipolar;
      };
    };
...