Path: blob/master/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
26309 views
# SPDX-License-Identifier: GPL-2.01%YAML 1.22---3$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Analog Devices AD7606 Simultaneous Sampling ADC78maintainers:9- Michael Hennerich <michael.hennerich@analog.com>1011description: |12Analog Devices AD7606 Simultaneous Sampling ADC13https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf14https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf15https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf16https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606c-16.pdf17https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606c-18.pdf18https://www.analog.com/media/en/technical-documentation/data-sheets/ad7607.pdf19https://www.analog.com/media/en/technical-documentation/data-sheets/ad7608.pdf20https://www.analog.com/media/en/technical-documentation/data-sheets/ad7609.pdf21https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf2223properties:24compatible:25enum:26- adi,ad7605-427- adi,ad7606-428- adi,ad7606-629- adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet30- adi,ad7606b31- adi,ad7606c-1632- adi,ad7606c-1833- adi,ad760734- adi,ad760835- adi,ad760936- adi,ad76163738reg:39maxItems: 14041"#address-cells":42const: 14344"#size-cells":45const: 04647'#trigger-source-cells':48description: |49Cell indicates the output signal: 0 = BUSY, 1 = FIRSTDATA.5051For convenience, macros for these values are available in52dt-bindings/iio/adc/adi,ad7606.h.53const: 15455# According to the datasheet, "Data is clocked in from SDI on the falling56# edge of SCLK, while data is clocked out on DOUTA on the rising edge of57# SCLK". Also, even if not stated textually in the datasheet, it is made58# clear on the diagrams that sclk idles at high. Subsequently, in case SPI59# interface is used, the correct way is to only set spi-cpol.60spi-cpha: true6162spi-cpol: true6364avcc-supply: true6566vdrive-supply:67description:68Determines the voltage level at which the interface logic pins will69operate.7071refin-supply:72description:73The voltage supply for optional external reference voltage.7475interrupts:76description:77The BUSY pin falling edge indicates that the conversion is over, and thus78new data is available.79maxItems: 18081adi,conversion-start-gpios:82description:83Must be the device tree identifier of the CONVST pin(s). This logic input84is used to initiate conversions on the analog input channels. As the line85is active high, it should be marked GPIO_ACTIVE_HIGH.86minItems: 187maxItems: 28889reset-gpios:90description:91Must be the device tree identifier of the RESET pin. If specified, it will92be asserted during driver probe. On the AD7606x, as the line is active93high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the line is94active low, it should be marked GPIO_ACTIVE_LOW.95maxItems: 19697standby-gpios:98description:99Must be the device tree identifier of the STBY pin. This pin is used to100place the AD7606 into one of two power-down modes, Standby mode or101Shutdown mode. As the line is active low, it should be marked102GPIO_ACTIVE_LOW.103maxItems: 1104105adi,first-data-gpios:106description:107Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA108output indicates when the first channel, V1, is being read back on either109the parallel, byte or serial interface. As the line is active high, it110should be marked GPIO_ACTIVE_HIGH.111maxItems: 1112113adi,range-gpios:114description:115Must be the device tree identifier of the RANGE pin. The state on this116pin determines the input range of the analog input channels. If this pin117is tied to a logic high, the analog input range is ±10V for all channels.118On the AD760X, if this pin is tied to a logic low, the analog input range119is ±5V for all channels. As the line is active high, it should be marked120GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are121tied to a logic high, software mode is enabled, otherwise one of the 3122possible range values is selected.123minItems: 1124maxItems: 2125126adi,oversampling-ratio-gpios:127description:128Must be the device tree identifier of the over-sampling mode pins. As the129line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD7606X130parts that support it, if all 3 pins are tied to a logic high, software131mode is enabled.132maxItems: 3133134adi,sw-mode:135description:136Software mode of operation, so far available only for AD7616 and AD7606B.137It is enabled when all three oversampling mode pins are connected to high138level for the AD7606B, or both the range selection are connected to high139level for the AD7616. The device is configured by the corresponding140registers. If the adi,oversampling-ratio-gpios property is defined, then141the driver will set the oversampling gpios to high. Otherwise, it is142assumed that the pins are hardwired to VDD.143type: boolean144145pwms:146description:147In case the conversion is triggered by a PWM instead of a GPIO plugged to148the CONVST pin, the PWM must be referenced.149The first is the PWM connected to CONVST or CONVST1 for the chips with the1502nd PWM connected to CONVST2, if CONVST2 is available and not shorted to151CONVST1.152minItems: 1153maxItems: 2154155pwm-names:156minItems: 1157items:158- const: convst1159- const: convst2160161io-backends:162description:163A reference to the iio-backend, which is responsible handling the BUSY164pin's falling edge and communication.165An example of backend can be found at166http://analogdevicesinc.github.io/hdl/library/axi_ad7606x/index.html167168169patternProperties:170"^channel@[1-8]$":171type: object172$ref: adc.yaml173unevaluatedProperties: false174175properties:176reg:177description:178The channel number, as specified in the datasheet (from 1 to 8).179minimum: 1180maximum: 8181182diff-channels:183description:184Each channel can be configured as a bipolar differential channel.185The ADC uses the same positive and negative inputs for this.186This property must be specified as 'reg' (or the channel number) for187both positive and negative inputs (i.e. diff-channels = <reg reg>).188Since the configuration is bipolar differential, the 'bipolar'189property is required.190items:191minimum: 1192maximum: 8193194bipolar:195description:196The ADC channels can be configured as197* Bipolar single-ended198* Unipolar single-ended199* Bipolar differential200Therefore in the DT, if no channel node is specified, it is considered201'unipolar single-ended'. So for the other configurations the 'bipolar'202property must be specified. If 'diff-channels' is specified, it is203considered a bipolar differential channel. Otherwise it is bipolar204single-ended.205206adi,rfilter-ohms:207description:208For ADCs that supports gain calibration, this property must be set to209the value of the external RFilter resistor. Proper gain error210correction is applied based on this value.211default: 0212minimum: 0213maximum: 64512214215required:216- reg217- bipolar218219required:220- compatible221- reg222- avcc-supply223- vdrive-supply224225allOf:226- $ref: /schemas/spi/spi-peripheral-props.yaml#227228- oneOf:229- required:230- adi,conversion-start-gpios231- required:232- pwms233234- if:235properties:236compatible:237contains:238const: adi,ad7616239then:240properties:241adi,first-data-gpios: false242standby-gpios: false243adi,range-gpios:244maxItems: 2245else:246properties:247adi,range-gpios:248maxItems: 1249250- if:251properties:252compatible:253contains:254enum:255- adi,ad7605-4256- adi,ad7616257then:258properties:259adi,oversampling-ratio-gpios: false260261- if:262properties:263compatible:264contains:265enum:266- adi,ad7605-4267- adi,ad7606-4268- adi,ad7606-6269- adi,ad7606-8270- adi,ad7607271- adi,ad7608272- adi,ad7609273- adi,ad7616274then:275patternProperties:276"^channel@[0-9a-f]+$":277properties:278adi,rfilter-ohms: false279280- if:281properties:282compatible:283contains:284enum:285- adi,ad7605-4286- adi,ad7606-4287- adi,ad7606-6288- adi,ad7606-8289- adi,ad7607290- adi,ad7608291- adi,ad7609292then:293properties:294adi,sw-mode: false295else:296properties:297pwms:298maxItems: 1299pwm-names:300maxItems: 1301adi,conversion-start-gpios:302maxItems: 1303304- if:305not:306required:307- adi,sw-mode308then:309patternProperties:310"^channel@[1-8]$": false311312- if:313not:314properties:315compatible:316enum:317- adi,ad7606c-16318- adi,ad7606c-18319then:320patternProperties:321"^channel@[1-8]$": false322323unevaluatedProperties: false324325examples:326- |327#include <dt-bindings/gpio/gpio.h>328iio-backend {329#address-cells = <1>;330#size-cells = <0>;331adi_adc@0 {332compatible = "adi,ad7606b";333reg = <0>;334pwms = <&axi_pwm_gen 0 0>;335336avcc-supply = <&adc_vref>;337vdrive-supply = <&vdd_supply>;338339reset-gpios = <&gpio0 91 GPIO_ACTIVE_HIGH>;340standby-gpios = <&gpio0 90 GPIO_ACTIVE_LOW>;341adi,range-gpios = <&gpio0 89 GPIO_ACTIVE_HIGH>;342adi,oversampling-ratio-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH343&gpio0 87 GPIO_ACTIVE_HIGH344&gpio0 86 GPIO_ACTIVE_HIGH>;345io-backends = <&iio_backend>;346};347};348349- |350#include <dt-bindings/gpio/gpio.h>351#include <dt-bindings/interrupt-controller/irq.h>352spi {353#address-cells = <1>;354#size-cells = <0>;355356adc@0 {357compatible = "adi,ad7606-8";358reg = <0>;359spi-max-frequency = <1000000>;360spi-cpol;361362avcc-supply = <&adc_vref>;363vdrive-supply = <&vdd_supply>;364365interrupts = <25 IRQ_TYPE_EDGE_FALLING>;366interrupt-parent = <&gpio>;367368adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;369reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;370adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;371adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,372<&gpio 23 GPIO_ACTIVE_HIGH>,373<&gpio 26 GPIO_ACTIVE_HIGH>;374standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;375};376};377- |378#include <dt-bindings/gpio/gpio.h>379#include <dt-bindings/interrupt-controller/irq.h>380spi {381#address-cells = <1>;382#size-cells = <0>;383384adc@0 {385compatible = "adi,ad7606c-18";386reg = <0>;387388#address-cells = <1>;389#size-cells = <0>;390391spi-max-frequency = <1000000>;392spi-cpol;393394avcc-supply = <&adc_vref>;395vdrive-supply = <&vdd_supply>;396397interrupts = <25 IRQ_TYPE_EDGE_FALLING>;398interrupt-parent = <&gpio>;399400adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;401reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;402adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;403standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;404405adi,sw-mode;406407channel@1 {408reg = <1>;409diff-channels = <1 1>;410bipolar;411};412413channel@3 {414reg = <3>;415bipolar;416};417418channel@8 {419reg = <8>;420diff-channels = <8 8>;421bipolar;422adi,rfilter-ohms = <2048>;423};424425};426};427...428429430