470 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2# Copyright 2023 Analog Devices Inc.3%YAML 1.24---5$id: http://devicetree.org/schemas/iio/adc/adi,ad7173.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Analog Devices AD7173 ADC9 10maintainers:11 - Ceclan Dumitru <dumitru.ceclan@analog.com>12 13description: |14 Analog Devices AD717x ADC's:15 The AD717x family offer a complete integrated Sigma-Delta ADC solution which16 can be used in high precision, low noise single channel applications17 (Life Science measurements) or higher speed multiplexed applications18 (Factory Automation PLC Input modules). The Sigma-Delta ADC is intended19 primarily for measurement of signals close to DC but also delivers20 outstanding performance with input bandwidths out to ~10kHz.21 22 Analog Devices AD411x ADC's:23 The AD411X family encompasses a series of low power, low noise, 24-bit,24 sigma-delta analog-to-digital converters that offer a versatile range of25 specifications. They integrate an analog front end suitable for processing26 fully differential/single-ended and bipolar voltage inputs.27 28 Datasheets for supported chips:29 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf30 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf31 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf32 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf33 https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf34 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf35 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf36 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf37 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf38 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-8.pdf39 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf40 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7177-2.pdf41 42properties:43 compatible:44 enum:45 - adi,ad411146 - adi,ad411247 - adi,ad411448 - adi,ad411549 - adi,ad411650 - adi,ad7172-251 - adi,ad7172-452 - adi,ad7173-853 - adi,ad7175-254 - adi,ad7175-855 - adi,ad7176-256 - adi,ad7177-257 58 reg:59 maxItems: 160 61 interrupts:62 minItems: 163 items:64 - description: |65 Ready: multiplexed with SPI data out. While SPI CS is low,66 can be used to indicate the completion of a conversion.67 68 - description: |69 Error: The three error bits in the status register (ADC_ERROR, CRC_ERROR,70 and REG_ERROR) are OR'ed, inverted, and mapped to the ERROR pin.71 Therefore, the ERROR pin indicates that an error has occurred.72 73 interrupt-names:74 minItems: 175 items:76 - const: rdy77 - const: err78 79 '#address-cells':80 const: 181 82 '#size-cells':83 const: 084 85 spi-max-frequency:86 maximum: 2000000087 88 gpio-controller:89 description: Marks the device node as a GPIO controller.90 91 '#gpio-cells':92 const: 293 description:94 The first cell is the GPIO number and the second cell specifies95 GPIO flags, as defined in <dt-bindings/gpio/gpio.h>.96 97 vref-supply:98 description: |99 Differential external reference supply used for conversion. The reference100 voltage (Vref) specified here must be the voltage difference between the101 REF+ and REF- pins: Vref = (REF+) - (REF-).102 103 vref2-supply:104 description: |105 Differential external reference supply used for conversion. The reference106 voltage (Vref2) specified here must be the voltage difference between the107 REF2+ and REF2- pins: Vref2 = (REF2+) - (REF2-).108 109 avdd-supply:110 description: Avdd supply, can be used as reference for conversion.111 This supply is referenced to AVSS, voltage specified here112 represents (AVDD1 - AVSS).113 114 avdd2-supply:115 description: Avdd2 supply, used as the input to the internal voltage regulator.116 This supply is referenced to AVSS, voltage specified here117 represents (AVDD2 - AVSS).118 119 iovdd-supply:120 description: iovdd supply, used for the chip digital interface.121 122 clocks:123 maxItems: 1124 description: |125 Optional external clock source. Can include one clock source: external126 clock or external crystal.127 128 clock-names:129 enum:130 - ext-clk131 - xtal132 133 '#clock-cells':134 const: 0135 136patternProperties:137 "^channel@[0-9a-f]$":138 type: object139 $ref: adc.yaml140 unevaluatedProperties: false141 142 properties:143 reg:144 minimum: 0145 maximum: 15146 147 diff-channels:148 description: |149 This property is used for defining the inputs of a differential150 voltage channel. The first value is the positive input and the second151 value is the negative input of the channel.152 153 Family AD411x supports a dedicated VINCOM voltage input.154 To select it set the second channel to 16.155 (VIN2, VINCOM) -> diff-channels = <2 16>156 157 There are special values that can be selected besides the voltage158 analog inputs:159 21: REF+160 22: REF−161 162 Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8, AD7177-2,163 must be paired together and can be used to monitor the power supply164 of the ADC:165 19: ((AVDD1 − AVSS)/5)+166 20: ((AVDD1 − AVSS)/5)−167 168 items:169 minimum: 0170 maximum: 31171 172 single-channel:173 description: |174 This property is used for defining a current channel or the positive175 input of a voltage channel (single-ended or pseudo-differential).176 177 Models AD4111 and AD4112 support current channels.178 Example: (IIN2+, IIN2−) -> single-channel = <2>179 To correctly configure a current channel set the "adi,current-channel"180 property to true.181 182 To configure a single-ended/pseudo-differential channel set the183 "common-mode-channel" property to the desired negative voltage input.184 185 When used as a voltage channel, special inputs are valid as well.186 minimum: 0187 maximum: 31188 189 common-mode-channel:190 description:191 This property is used for defining the negative input of a192 single-ended or pseudo-differential voltage channel.193 194 Special inputs are valid as well.195 minimum: 0196 maximum: 31197 198 adi,reference-select:199 description: |200 Select the reference source to use when converting on201 the specific channel. Valid values are:202 vref : REF+ /REF−203 vref2 : REF2+ /REF2−204 refout-avss: REFOUT/AVSS (Internal reference)205 avdd : AVDD /AVSS206 207 External reference ref2 only available on ad7173-8 and ad7172-4.208 Internal reference refout-avss not available on ad7172-4.209 210 If not specified, internal reference used (if available).211 $ref: /schemas/types.yaml#/definitions/string212 enum:213 - vref214 - vref2215 - refout-avss216 - avdd217 default: refout-avss218 219 adi,current-channel:220 $ref: /schemas/types.yaml#/definitions/flag221 description: |222 Signal that the selected inputs are current channels.223 Only available on AD4111 and AD4112.224 225 required:226 - reg227 228 allOf:229 - oneOf:230 - required: [single-channel]231 properties:232 diff-channels: false233 - required: [diff-channels]234 properties:235 single-channel: false236 adi,current-channel: false237 common-mode-channel: false238 239 - if:240 required: [common-mode-channel]241 then:242 properties:243 adi,current-channel: false244 245required:246 - compatible247 - reg248 249allOf:250 - $ref: /schemas/spi/spi-peripheral-props.yaml#251 252 # Only ad7172-4, ad7173-8 and ad7175-8 support vref2253 - if:254 properties:255 compatible:256 not:257 contains:258 enum:259 - adi,ad7172-4260 - adi,ad7173-8261 - adi,ad7175-8262 then:263 properties:264 vref2-supply: false265 patternProperties:266 "^channel@[0-9a-f]$":267 properties:268 adi,reference-select:269 enum:270 - vref271 - refout-avss272 - avdd273 274 - if:275 properties:276 compatible:277 contains:278 enum:279 - adi,ad4114280 - adi,ad4115281 - adi,ad4116282 - adi,ad7173-8283 - adi,ad7175-8284 then:285 patternProperties:286 "^channel@[0-9a-f]$":287 properties:288 reg:289 maximum: 15290 291 - if:292 properties:293 compatible:294 contains:295 enum:296 - adi,ad7172-2297 - adi,ad7175-2298 - adi,ad7176-2299 - adi,ad7177-2300 then:301 patternProperties:302 "^channel@[0-9a-f]$":303 properties:304 reg:305 maximum: 3306 307 # Model ad7172-4 does not support internal reference308 - if:309 properties:310 compatible:311 contains:312 const: adi,ad7172-4313 then:314 patternProperties:315 "^channel@[0-9a-f]$":316 properties:317 reg:318 maximum: 7319 adi,reference-select:320 enum:321 - vref322 - vref2323 - avdd324 required:325 - adi,reference-select326 327 - if:328 properties:329 compatible:330 contains:331 enum:332 - adi,ad4111333 - adi,ad4112334 - adi,ad4114335 - adi,ad4115336 - adi,ad4116337 then:338 properties:339 avdd2-supply: false340 341 - if:342 properties:343 compatible:344 not:345 contains:346 enum:347 - adi,ad4111348 - adi,ad4112349 then:350 patternProperties:351 "^channel@[0-9a-f]$":352 properties:353 adi,current-channel: false354 355 - if:356 anyOf:357 - required: [clock-names]358 - required: [clocks]359 then:360 properties:361 '#clock-cells': false362 363unevaluatedProperties: false364 365examples:366 # Example AD7173-8 with external reference connected to REF+/REF-:367 - |368 #include <dt-bindings/gpio/gpio.h>369 #include <dt-bindings/interrupt-controller/irq.h>370 371 spi {372 #address-cells = <1>;373 #size-cells = <0>;374 375 adc@0 {376 compatible = "adi,ad7173-8";377 reg = <0>;378 379 #address-cells = <1>;380 #size-cells = <0>;381 382 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;383 interrupt-names = "rdy";384 interrupt-parent = <&gpio>;385 spi-max-frequency = <5000000>;386 gpio-controller;387 #gpio-cells = <2>;388 #clock-cells = <0>;389 390 vref-supply = <&dummy_regulator>;391 392 channel@0 {393 reg = <0>;394 bipolar;395 diff-channels = <0 1>;396 adi,reference-select = "vref";397 };398 399 channel@1 {400 reg = <1>;401 diff-channels = <2 3>;402 };403 404 channel@2 {405 reg = <2>;406 bipolar;407 diff-channels = <4 5>;408 };409 410 channel@3 {411 reg = <3>;412 bipolar;413 diff-channels = <6 7>;414 };415 416 channel@4 {417 reg = <4>;418 diff-channels = <8 9>;419 adi,reference-select = "avdd";420 };421 };422 };423 424 # Example AD4111 with current channel and single-ended channel:425 - |426 #include <dt-bindings/gpio/gpio.h>427 #include <dt-bindings/interrupt-controller/irq.h>428 429 spi {430 #address-cells = <1>;431 #size-cells = <0>;432 433 adc@0 {434 compatible = "adi,ad4111";435 reg = <0>;436 437 #address-cells = <1>;438 #size-cells = <0>;439 440 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;441 interrupt-names = "rdy";442 interrupt-parent = <&gpio>;443 spi-max-frequency = <5000000>;444 gpio-controller;445 #gpio-cells = <2>;446 #clock-cells = <0>;447 448 channel@0 {449 reg = <0>;450 bipolar;451 diff-channels = <4 5>;452 };453 454 // Single ended channel VIN2/VINCOM455 channel@1 {456 reg = <1>;457 bipolar;458 single-channel = <2>;459 common-mode-channel = <16>;460 };461 462 // Current channel IN2+/IN2-463 channel@2 {464 reg = <2>;465 single-channel = <2>;466 adi,current-channel;467 };468 };469 };470