1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/adc/adi,ad7606.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Analog Devices AD7606 Simultaneous Sampling ADC 8 9maintainers: 10 - Michael Hennerich <michael.hennerich@analog.com> 11 12description: | 13 Analog Devices AD7606 Simultaneous Sampling ADC 14 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf 15 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf 16 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf 17 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf 18 19properties: 20 compatible: 21 enum: 22 - adi,ad7605-4 23 - adi,ad7606-4 24 - adi,ad7606-6 25 - adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet 26 - adi,ad7606b 27 - adi,ad7616 28 29 reg: 30 maxItems: 1 31 32 spi-cpha: true 33 34 spi-cpol: true 35 36 avcc-supply: true 37 38 interrupts: 39 maxItems: 1 40 41 adi,conversion-start-gpios: 42 description: 43 Must be the device tree identifier of the CONVST pin. This logic input is 44 used to initiate conversions on the analog input channels. As the line is 45 active high, it should be marked GPIO_ACTIVE_HIGH. 46 maxItems: 1 47 48 reset-gpios: 49 description: 50 Must be the device tree identifier of the RESET pin. If specified, it will 51 be asserted during driver probe. As the line is active high, it should be 52 marked GPIO_ACTIVE_HIGH. 53 maxItems: 1 54 55 standby-gpios: 56 description: 57 Must be the device tree identifier of the STBY pin. This pin is used to 58 place the AD7606 into one of two power-down modes, Standby mode or 59 Shutdown mode. As the line is active low, it should be marked 60 GPIO_ACTIVE_LOW. 61 maxItems: 1 62 63 adi,first-data-gpios: 64 description: 65 Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA 66 output indicates when the first channel, V1, is being read back on either 67 the parallel, byte or serial interface. As the line is active high, it 68 should be marked GPIO_ACTIVE_HIGH. 69 maxItems: 1 70 71 adi,range-gpios: 72 description: 73 Must be the device tree identifier of the RANGE pin. The polarity on this 74 pin determines the input range of the analog input channels. If this pin 75 is tied to a logic high, the analog input range is ±10V for all channels. 76 If this pin is tied to a logic low, the analog input range is ±5V for all 77 channels. As the line is active high, it should be marked 78 GPIO_ACTIVE_HIGH. 79 maxItems: 1 80 81 adi,oversampling-ratio-gpios: 82 description: 83 Must be the device tree identifier of the over-sampling mode pins. As the 84 line is active high, it should be marked GPIO_ACTIVE_HIGH. 85 maxItems: 3 86 87 adi,sw-mode: 88 description: 89 Software mode of operation, so far available only for ad7616 and ad7606b. 90 It is enabled when all three oversampling mode pins are connected to high 91 level. The device is configured by the corresponding registers. If the 92 adi,oversampling-ratio-gpios property is defined, then the driver will set 93 the oversampling gpios to high. Otherwise, it is assumed that the pins are 94 hardwired to VDD. 95 type: boolean 96 97required: 98 - compatible 99 - reg 100 - spi-cpha 101 - avcc-supply 102 - interrupts 103 - adi,conversion-start-gpios 104 105allOf: 106 - $ref: /schemas/spi/spi-peripheral-props.yaml# 107 108unevaluatedProperties: false 109 110examples: 111 - | 112 #include <dt-bindings/gpio/gpio.h> 113 #include <dt-bindings/interrupt-controller/irq.h> 114 spi { 115 #address-cells = <1>; 116 #size-cells = <0>; 117 118 adc@0 { 119 compatible = "adi,ad7606-8"; 120 reg = <0>; 121 spi-max-frequency = <1000000>; 122 spi-cpol; 123 spi-cpha; 124 125 avcc-supply = <&adc_vref>; 126 127 interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 128 interrupt-parent = <&gpio>; 129 130 adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; 131 reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; 132 adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; 133 adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>, 134 <&gpio 23 GPIO_ACTIVE_HIGH>, 135 <&gpio 26 GPIO_ACTIVE_HIGH>; 136 standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>; 137 adi,sw-mode; 138 }; 139 }; 140... 141