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