206 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---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 ADC8 9maintainers:10 - Michael Hennerich <michael.hennerich@analog.com>11 12description: |13 Analog Devices AD7606 Simultaneous Sampling ADC14 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7605-4.pdf15 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606_7606-6_7606-4.pdf16 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7606B.pdf17 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf18 19properties:20 compatible:21 enum:22 - adi,ad7605-423 - adi,ad7606-424 - adi,ad7606-625 - adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet26 - adi,ad7606b27 - adi,ad761628 29 reg:30 maxItems: 131 32 spi-cpha: true33 34 spi-cpol: true35 36 avcc-supply: true37 38 vdrive-supply:39 description:40 Determines the voltage level at which the interface logic pins will41 operate.42 43 refin-supply:44 description:45 The voltage supply for optional external reference voltage.46 47 interrupts:48 description:49 The BUSY pin falling edge indicates that the conversion is over, and thus50 new data is available.51 maxItems: 152 53 adi,conversion-start-gpios:54 description:55 Must be the device tree identifier of the CONVST pin(s). This logic input56 is used to initiate conversions on the analog input channels. As the line57 is active high, it should be marked GPIO_ACTIVE_HIGH.58 minItems: 159 maxItems: 260 61 reset-gpios:62 description:63 Must be the device tree identifier of the RESET pin. If specified, it will64 be asserted during driver probe. On the AD7606x, as the line is active65 high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the line is66 active low, it should be marked GPIO_ACTIVE_LOW.67 maxItems: 168 69 standby-gpios:70 description:71 Must be the device tree identifier of the STBY pin. This pin is used to72 place the AD7606 into one of two power-down modes, Standby mode or73 Shutdown mode. As the line is active low, it should be marked74 GPIO_ACTIVE_LOW.75 maxItems: 176 77 adi,first-data-gpios:78 description:79 Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA80 output indicates when the first channel, V1, is being read back on either81 the parallel, byte or serial interface. As the line is active high, it82 should be marked GPIO_ACTIVE_HIGH.83 maxItems: 184 85 adi,range-gpios:86 description:87 Must be the device tree identifier of the RANGE pin. The state on this88 pin determines the input range of the analog input channels. If this pin89 is tied to a logic high, the analog input range is ±10V for all channels.90 On the AD760X, if this pin is tied to a logic low, the analog input range91 is ±5V for all channels. As the line is active high, it should be marked92 GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are93 tied to a logic high, software mode is enabled, otherwise one of the 394 possible range values is selected.95 minItems: 196 maxItems: 297 98 adi,oversampling-ratio-gpios:99 description:100 Must be the device tree identifier of the over-sampling mode pins. As the101 line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD7606X102 parts that support it, if all 3 pins are tied to a logic high, software103 mode is enabled.104 maxItems: 3105 106 adi,sw-mode:107 description:108 Software mode of operation, so far available only for AD7616 and AD7606B.109 It is enabled when all three oversampling mode pins are connected to high110 level for the AD7606B, or both the range selection are connected to high111 level for the AD7616. The device is configured by the corresponding112 registers. If the adi,oversampling-ratio-gpios property is defined, then113 the driver will set the oversampling gpios to high. Otherwise, it is114 assumed that the pins are hardwired to VDD.115 type: boolean116 117required:118 - compatible119 - reg120 - spi-cpha121 - avcc-supply122 - vdrive-supply123 - interrupts124 - adi,conversion-start-gpios125 126allOf:127 - $ref: /schemas/spi/spi-peripheral-props.yaml#128 129 - if:130 properties:131 compatible:132 contains:133 const: adi,ad7616134 then:135 properties:136 adi,first-data-gpios: false137 standby-gpios: false138 adi,range-gpios:139 maxItems: 2140 else:141 properties:142 adi,range-gpios:143 maxItems: 1144 145 - if:146 properties:147 compatible:148 contains:149 enum:150 - adi,ad7605-4151 - adi,ad7616152 then:153 properties:154 adi,oversampling-ratio-gpios: false155 156 - if:157 properties:158 compatible:159 contains:160 enum:161 - adi,ad7605-4162 - adi,ad7606-4163 - adi,ad7606-6164 - adi,ad7606-8165 then:166 properties:167 adi,sw-mode: false168 else:169 properties:170 adi,conversion-start-gpios:171 maxItems: 1172 173unevaluatedProperties: false174 175examples:176 - |177 #include <dt-bindings/gpio/gpio.h>178 #include <dt-bindings/interrupt-controller/irq.h>179 spi {180 #address-cells = <1>;181 #size-cells = <0>;182 183 adc@0 {184 compatible = "adi,ad7606-8";185 reg = <0>;186 spi-max-frequency = <1000000>;187 spi-cpol;188 spi-cpha;189 190 avcc-supply = <&adc_vref>;191 vdrive-supply = <&vdd_supply>;192 193 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;194 interrupt-parent = <&gpio>;195 196 adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;197 reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;198 adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;199 adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>,200 <&gpio 23 GPIO_ACTIVE_HIGH>,201 <&gpio 26 GPIO_ACTIVE_HIGH>;202 standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;203 };204 };205...206