File Index
Files and directories
Sign in
FILE

adi,ad4000.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/iio/adc/adi,ad4000.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/iio/adc/adi,ad4000.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Analog Devices AD4000 and similar Analog to Digital Converters
  8
  9maintainers:
 10  - Marcelo Schmitt <marcelo.schmitt@analog.com>
 11
 12description: |
 13  Analog Devices AD4000 family of Analog to Digital Converters with SPI support.
 14  Specifications can be found at:
 15    https://www.analog.com/media/en/technical-documentation/data-sheets/ad4000-4004-4008.pdf
 16    https://www.analog.com/media/en/technical-documentation/data-sheets/ad4001-4005.pdf
 17    https://www.analog.com/media/en/technical-documentation/data-sheets/ad4002-4006-4010.pdf
 18    https://www.analog.com/media/en/technical-documentation/data-sheets/ad4003-4007-4011.pdf
 19    https://www.analog.com/media/en/technical-documentation/data-sheets/ad4020-4021-4022.pdf
 20    https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4001.pdf
 21    https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4003.pdf
 22    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7685.pdf
 23    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7686.pdf
 24    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7687.pdf
 25    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7688.pdf
 26    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7690.pdf
 27    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7691.pdf
 28    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7693.pdf
 29    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7942.pdf
 30    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7946.pdf
 31    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7980.pdf
 32    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7982.pdf
 33    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7983.pdf
 34    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7984.pdf
 35    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7988-1_7988-5.pdf
 36
 37$ref: /schemas/spi/spi-peripheral-props.yaml#
 38
 39properties:
 40  compatible:
 41    oneOf:
 42      - enum:
 43          - adi,ad4000
 44          - adi,ad4001
 45          - adi,ad4002
 46          - adi,ad4003
 47          - adi,ad4020
 48          - adi,adaq4001
 49          - adi,adaq4003
 50          - adi,ad7687
 51          - adi,ad7691
 52          - adi,ad7942
 53          - adi,ad7946
 54          - adi,ad7983
 55      - items:
 56          - enum:
 57              - adi,ad4004
 58              - adi,ad4008
 59          - const: adi,ad4000
 60      - items:
 61          - enum:
 62              - adi,ad4005
 63          - const: adi,ad4001
 64      - items:
 65          - enum:
 66              - adi,ad4006
 67              - adi,ad4010
 68          - const: adi,ad4002
 69      - items:
 70          - enum:
 71              - adi,ad4007
 72              - adi,ad4011
 73          - const: adi,ad4003
 74      - items:
 75          - enum:
 76              - adi,ad4021
 77              - adi,ad4022
 78          - const: adi,ad4020
 79      - items:
 80          - enum:
 81              - adi,ad7685
 82              - adi,ad7686
 83              - adi,ad7980
 84              - adi,ad7988-1
 85              - adi,ad7988-5
 86          - const: adi,ad7983
 87      - items:
 88          - enum:
 89              - adi,ad7688
 90              - adi,ad7693
 91          - const: adi,ad7687
 92      - items:
 93          - enum:
 94              - adi,ad7690
 95              - adi,ad7982
 96              - adi,ad7984
 97          - const: adi,ad7691
 98
 99  reg:
100    maxItems: 1
101
102  spi-max-frequency:
103    maximum: 102040816 # for VIO > 2.7 V, 81300813 for VIO > 1.7 V
104
105  adi,sdi-pin:
106    $ref: /schemas/types.yaml#/definitions/string
107    enum: [ high, low, cs, sdi ]
108    default: sdi
109    description:
110      Describes how the ADC SDI pin is wired. A value of "sdi" indicates that
111      the ADC SDI is connected to host SDO. "high" indicates that the ADC SDI
112      pin is hard-wired to logic high (VIO). "low" indicates that it is
113      hard-wired low (GND). "cs" indicates that the ADC SDI pin is connected to
114      the host CS line.
115
116  '#daisy-chained-devices': true
117
118  vdd-supply:
119    description: A 1.8V supply that powers the chip (VDD).
120
121  vio-supply:
122    description:
123      A 1.8V to 5.5V supply for the digital inputs and outputs (VIO).
124
125  ref-supply:
126    description:
127      A 2.5 to 5V supply for the external reference voltage (REF).
128
129  cnv-gpios:
130    description:
131      When provided, this property indicates the GPIO that is connected to the
132      CNV pin.
133    maxItems: 1
134
135  adi,high-z-input:
136    type: boolean
137    description:
138      High-Z mode allows the amplifier and RC filter in front of the ADC to be
139      chosen based on the signal bandwidth of interest, rather than the settling
140      requirements of the switched capacitor SAR ADC inputs.
141
142  adi,gain-milli:
143    description: |
144      The hardware gain applied to the ADC input (in milli units).
145      The gain provided by the ADC input scaler is defined by the hardware
146      connections between chip pins OUT+, R1K-, R1K1-, R1K+, R1K1+, and OUT-.
147      If not present, default to 1000 (no actual gain applied).
148    $ref: /schemas/types.yaml#/definitions/uint16
149    enum: [454, 909, 1000, 1900]
150    default: 1000
151
152  interrupts:
153    description:
154      The SDO pin can also function as a busy indicator. This node should be
155      connected to an interrupt that is triggered when the SDO line goes low
156      while the SDI line is high and the CNV line is low ("3-wire" mode) or the
157      SDI line is low and the CNV line is high ("4-wire" mode); or when the SDO
158      line goes high while the SDI and CNV lines are high (chain mode),
159    maxItems: 1
160
161required:
162  - compatible
163  - reg
164  - vdd-supply
165  - vio-supply
166  - ref-supply
167
168allOf:
169  # Single-channel PulSAR devices have SDI either tied to VIO, GND, or host CS.
170  - if:
171      properties:
172        compatible:
173          contains:
174            enum:
175              - adi,ad7687
176              - adi,ad7691
177              - adi,ad7942
178              - adi,ad7946
179              - adi,ad7983
180    then:
181      properties:
182        adi,sdi-pin:
183          enum: [ high, low, cs ]
184          default: cs
185  # The configuration register can only be accessed if SDI is connected to MOSI
186  - if:
187      required:
188        - adi,sdi-pin
189    then:
190      properties:
191        adi,high-z-input: false
192  # chain mode has lower SCLK max rate
193  - if:
194      required:
195        - '#daisy-chained-devices'
196    then:
197      properties:
198        spi-max-frequency:
199          maximum: 50000000 # for VIO > 2.7 V, 40000000 for VIO > 1.7 V
200  # Gain property only applies to ADAQ devices
201  - if:
202      properties:
203        compatible:
204          not:
205            contains:
206              enum:
207                - adi,adaq4001
208                - adi,adaq4003
209    then:
210      properties:
211        adi,gain-milli: false
212
213unevaluatedProperties: false
214
215examples:
216  - |
217    #include <dt-bindings/gpio/gpio.h>
218    spi {
219        #address-cells = <1>;
220        #size-cells = <0>;
221        adc@0 {
222            compatible = "adi,ad4020";
223            reg = <0>;
224            spi-max-frequency = <71000000>;
225            vdd-supply = <&supply_1_8V>;
226            vio-supply = <&supply_1_8V>;
227            ref-supply = <&supply_5V>;
228            adi,sdi-pin = "cs";
229            cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>;
230        };
231    };
232  - |
233    spi {
234        #address-cells = <1>;
235        #size-cells = <0>;
236        adc@0 {
237            compatible = "adi,adaq4003";
238            reg = <0>;
239            spi-max-frequency = <80000000>;
240            vdd-supply = <&supply_1_8V>;
241            vio-supply = <&supply_1_8V>;
242            ref-supply = <&supply_5V>;
243            adi,high-z-input;
244            adi,gain-milli = /bits/ 16 <454>;
245        };
246    };
~/ Read-only file preview.