Path: blob/main/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7173.yaml
48406 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1# Copyright 2023 Analog Devices Inc.2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/adc/adi,ad7173.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: Analog Devices AD7173 ADC89maintainers:10- Ceclan Dumitru <dumitru.ceclan@analog.com>1112description: |13Analog Devices AD717x ADC's:14The AD717x family offer a complete integrated Sigma-Delta ADC solution which15can be used in high precision, low noise single channel applications16(Life Science measurements) or higher speed multiplexed applications17(Factory Automation PLC Input modules). The Sigma-Delta ADC is intended18primarily for measurement of signals close to DC but also delivers19outstanding performance with input bandwidths out to ~10kHz.2021Analog Devices AD411x ADC's:22The AD411X family encompasses a series of low power, low noise, 24-bit,23sigma-delta analog-to-digital converters that offer a versatile range of24specifications. They integrate an analog front end suitable for processing25fully differential/single-ended and bipolar voltage inputs.2627Datasheets for supported chips:28https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf29https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf30https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf31https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf32https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf33https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf34https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf35https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf36https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf37https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-8.pdf38https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf39https://www.analog.com/media/en/technical-documentation/data-sheets/AD7177-2.pdf4041properties:42compatible:43enum:44- adi,ad411145- adi,ad411246- adi,ad411447- adi,ad411548- adi,ad411649- adi,ad7172-250- adi,ad7172-451- adi,ad7173-852- adi,ad7175-253- adi,ad7175-854- adi,ad7176-255- adi,ad7177-25657reg:58maxItems: 15960interrupts:61minItems: 162items:63- description: |64Ready: multiplexed with SPI data out. While SPI CS is low,65can be used to indicate the completion of a conversion.6667- description: |68Error: The three error bits in the status register (ADC_ERROR, CRC_ERROR,69and REG_ERROR) are OR'ed, inverted, and mapped to the ERROR pin.70Therefore, the ERROR pin indicates that an error has occurred.7172interrupt-names:73minItems: 174items:75- const: rdy76- const: err7778'#address-cells':79const: 18081'#size-cells':82const: 08384spi-max-frequency:85maximum: 200000008687gpio-controller:88description: Marks the device node as a GPIO controller.8990'#gpio-cells':91const: 292description:93The first cell is the GPIO number and the second cell specifies94GPIO flags, as defined in <dt-bindings/gpio/gpio.h>.9596vref-supply:97description: |98Differential external reference supply used for conversion. The reference99voltage (Vref) specified here must be the voltage difference between the100REF+ and REF- pins: Vref = (REF+) - (REF-).101102vref2-supply:103description: |104Differential external reference supply used for conversion. The reference105voltage (Vref2) specified here must be the voltage difference between the106REF2+ and REF2- pins: Vref2 = (REF2+) - (REF2-).107108avdd-supply:109description: Avdd supply, can be used as reference for conversion.110This supply is referenced to AVSS, voltage specified here111represents (AVDD1 - AVSS).112113avdd2-supply:114description: Avdd2 supply, used as the input to the internal voltage regulator.115This supply is referenced to AVSS, voltage specified here116represents (AVDD2 - AVSS).117118iovdd-supply:119description: iovdd supply, used for the chip digital interface.120121clocks:122maxItems: 1123description: |124Optional external clock source. Can include one clock source: external125clock or external crystal.126127clock-names:128enum:129- ext-clk130- xtal131132'#clock-cells':133const: 0134135patternProperties:136"^channel@[0-9a-f]$":137type: object138$ref: adc.yaml139unevaluatedProperties: false140141properties:142reg:143minimum: 0144maximum: 15145146diff-channels:147description: |148This property is used for defining the inputs of a differential149voltage channel. The first value is the positive input and the second150value is the negative input of the channel.151152Family AD411x supports a dedicated VINCOM voltage input.153To select it set the second channel to 16.154(VIN2, VINCOM) -> diff-channels = <2 16>155156There are special values that can be selected besides the voltage157analog inputs:15821: REF+15922: REF−160161Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8, AD7177-2,162must be paired together and can be used to monitor the power supply163of the ADC:16419: ((AVDD1 − AVSS)/5)+16520: ((AVDD1 − AVSS)/5)−166167items:168minimum: 0169maximum: 31170171single-channel:172description: |173This property is used for defining a current channel or the positive174input of a voltage channel (single-ended or pseudo-differential).175176Models AD4111 and AD4112 support current channels.177Example: (IIN2+, IIN2−) -> single-channel = <2>178To correctly configure a current channel set the "adi,current-channel"179property to true.180181To configure a single-ended/pseudo-differential channel set the182"common-mode-channel" property to the desired negative voltage input.183184When used as a voltage channel, special inputs are valid as well.185minimum: 0186maximum: 31187188common-mode-channel:189description:190This property is used for defining the negative input of a191single-ended or pseudo-differential voltage channel.192193Special inputs are valid as well.194minimum: 0195maximum: 31196197adi,reference-select:198description: |199Select the reference source to use when converting on200the specific channel. Valid values are:201vref : REF+ /REF−202vref2 : REF2+ /REF2−203refout-avss: REFOUT/AVSS (Internal reference)204avdd : AVDD /AVSS205206External reference ref2 only available on ad7173-8 and ad7172-4.207Internal reference refout-avss not available on ad7172-4.208209If not specified, internal reference used (if available).210$ref: /schemas/types.yaml#/definitions/string211enum:212- vref213- vref2214- refout-avss215- avdd216default: refout-avss217218adi,current-channel:219$ref: /schemas/types.yaml#/definitions/flag220description: |221Signal that the selected inputs are current channels.222Only available on AD4111 and AD4112.223224required:225- reg226227allOf:228- oneOf:229- required: [single-channel]230properties:231diff-channels: false232- required: [diff-channels]233properties:234single-channel: false235adi,current-channel: false236common-mode-channel: false237238- if:239required: [common-mode-channel]240then:241properties:242adi,current-channel: false243244required:245- compatible246- reg247248allOf:249- $ref: /schemas/spi/spi-peripheral-props.yaml#250251# Only ad7172-4, ad7173-8 and ad7175-8 support vref2252- if:253properties:254compatible:255not:256contains:257enum:258- adi,ad7172-4259- adi,ad7173-8260- adi,ad7175-8261then:262properties:263vref2-supply: false264patternProperties:265"^channel@[0-9a-f]$":266properties:267adi,reference-select:268enum:269- vref270- refout-avss271- avdd272273- if:274properties:275compatible:276contains:277enum:278- adi,ad4114279- adi,ad4115280- adi,ad4116281- adi,ad7173-8282- adi,ad7175-8283then:284patternProperties:285"^channel@[0-9a-f]$":286properties:287reg:288maximum: 15289290- if:291properties:292compatible:293contains:294enum:295- adi,ad7172-2296- adi,ad7175-2297- adi,ad7176-2298- adi,ad7177-2299then:300patternProperties:301"^channel@[0-9a-f]$":302properties:303reg:304maximum: 3305306# Model ad7172-4 does not support internal reference307- if:308properties:309compatible:310contains:311const: adi,ad7172-4312then:313patternProperties:314"^channel@[0-9a-f]$":315properties:316reg:317maximum: 7318adi,reference-select:319enum:320- vref321- vref2322- avdd323required:324- adi,reference-select325326- if:327properties:328compatible:329contains:330enum:331- adi,ad4111332- adi,ad4112333- adi,ad4114334- adi,ad4115335- adi,ad4116336then:337properties:338avdd2-supply: false339340- if:341properties:342compatible:343not:344contains:345enum:346- adi,ad4111347- adi,ad4112348then:349patternProperties:350"^channel@[0-9a-f]$":351properties:352adi,current-channel: false353354- if:355anyOf:356- required: [clock-names]357- required: [clocks]358then:359properties:360'#clock-cells': false361362unevaluatedProperties: false363364examples:365# Example AD7173-8 with external reference connected to REF+/REF-:366- |367#include <dt-bindings/gpio/gpio.h>368#include <dt-bindings/interrupt-controller/irq.h>369370spi {371#address-cells = <1>;372#size-cells = <0>;373374adc@0 {375compatible = "adi,ad7173-8";376reg = <0>;377378#address-cells = <1>;379#size-cells = <0>;380381interrupts = <25 IRQ_TYPE_EDGE_FALLING>;382interrupt-names = "rdy";383interrupt-parent = <&gpio>;384spi-max-frequency = <5000000>;385gpio-controller;386#gpio-cells = <2>;387#clock-cells = <0>;388389vref-supply = <&dummy_regulator>;390391channel@0 {392reg = <0>;393bipolar;394diff-channels = <0 1>;395adi,reference-select = "vref";396};397398channel@1 {399reg = <1>;400diff-channels = <2 3>;401};402403channel@2 {404reg = <2>;405bipolar;406diff-channels = <4 5>;407};408409channel@3 {410reg = <3>;411bipolar;412diff-channels = <6 7>;413};414415channel@4 {416reg = <4>;417diff-channels = <8 9>;418adi,reference-select = "avdd";419};420};421};422423# Example AD4111 with current channel and single-ended channel:424- |425#include <dt-bindings/gpio/gpio.h>426#include <dt-bindings/interrupt-controller/irq.h>427428spi {429#address-cells = <1>;430#size-cells = <0>;431432adc@0 {433compatible = "adi,ad4111";434reg = <0>;435436#address-cells = <1>;437#size-cells = <0>;438439interrupts = <25 IRQ_TYPE_EDGE_FALLING>;440interrupt-names = "rdy";441interrupt-parent = <&gpio>;442spi-max-frequency = <5000000>;443gpio-controller;444#gpio-cells = <2>;445#clock-cells = <0>;446447channel@0 {448reg = <0>;449bipolar;450diff-channels = <4 5>;451};452453// Single ended channel VIN2/VINCOM454channel@1 {455reg = <1>;456bipolar;457single-channel = <2>;458common-mode-channel = <16>;459};460461// Current channel IN2+/IN2-462channel@2 {463reg = <2>;464single-channel = <2>;465adi,current-channel;466};467};468};469470471