FILE
adi,ad7606.yaml
File preview with syntax highlighting.
linux-6.19.14/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
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/ad7606c-16.pdf 18 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7606c-18.pdf 19 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7607.pdf 20 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7608.pdf 21 https://www.analog.com/media/en/technical-documentation/data-sheets/ad7609.pdf 22 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7616.pdf 23 24properties: 25 compatible: 26 enum: 27 - adi,ad7605-4 28 - adi,ad7606-4 29 - adi,ad7606-6 30 - adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet 31 - adi,ad7606b 32 - adi,ad7606c-16 33 - adi,ad7606c-18 34 - adi,ad7607 35 - adi,ad7608 36 - adi,ad7609 37 - adi,ad7616 38 39 reg: 40 maxItems: 1 41 42 "#address-cells": 43 const: 1 44 45 "#size-cells": 46 const: 0 47 48 '#trigger-source-cells': 49 description: | 50 Cell indicates the output signal: 0 = BUSY, 1 = FIRSTDATA. 51 52 For convenience, macros for these values are available in 53 dt-bindings/iio/adc/adi,ad7606.h. 54 const: 1 55 56 # According to the datasheet, "Data is clocked in from SDI on the falling 57 # edge of SCLK, while data is clocked out on DOUTA on the rising edge of 58 # SCLK". Also, even if not stated textually in the datasheet, it is made 59 # clear on the diagrams that sclk idles at high. Subsequently, in case SPI 60 # interface is used, the correct way is to only set spi-cpol. 61 spi-cpha: true 62 63 spi-cpol: true 64 65 avcc-supply: true 66 67 vdrive-supply: 68 description: 69 Determines the voltage level at which the interface logic pins will 70 operate. 71 72 refin-supply: 73 description: 74 The voltage supply for optional external reference voltage. 75 76 interrupts: 77 description: 78 The BUSY pin falling edge indicates that the conversion is over, and thus 79 new data is available. 80 maxItems: 1 81 82 adi,conversion-start-gpios: 83 description: 84 Must be the device tree identifier of the CONVST pin(s). This logic input 85 is used to initiate conversions on the analog input channels. As the line 86 is active high, it should be marked GPIO_ACTIVE_HIGH. 87 minItems: 1 88 maxItems: 2 89 90 reset-gpios: 91 description: 92 Must be the device tree identifier of the RESET pin. If specified, it will 93 be asserted during driver probe. On the AD7606x, as the line is active 94 high, it should be marked GPIO_ACTIVE_HIGH. On the AD7616, as the line is 95 active low, it should be marked GPIO_ACTIVE_LOW. 96 maxItems: 1 97 98 standby-gpios: 99 description: 100 Must be the device tree identifier of the STBY pin. This pin is used to 101 place the AD7606 into one of two power-down modes, Standby mode or 102 Shutdown mode. As the line is active low, it should be marked 103 GPIO_ACTIVE_LOW. 104 maxItems: 1 105 106 adi,first-data-gpios: 107 description: 108 Must be the device tree identifier of the FRSTDATA pin. The FRSTDATA 109 output indicates when the first channel, V1, is being read back on either 110 the parallel, byte or serial interface. As the line is active high, it 111 should be marked GPIO_ACTIVE_HIGH. 112 maxItems: 1 113 114 adi,range-gpios: 115 description: 116 Must be the device tree identifier of the RANGE pin. The state on this 117 pin determines the input range of the analog input channels. If this pin 118 is tied to a logic high, the analog input range is ±10V for all channels. 119 On the AD760X, if this pin is tied to a logic low, the analog input range 120 is ±5V for all channels. As the line is active high, it should be marked 121 GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are 122 tied to a logic high, software mode is enabled, otherwise one of the 3 123 possible range values is selected. 124 minItems: 1 125 maxItems: 2 126 127 adi,oversampling-ratio-gpios: 128 description: 129 Must be the device tree identifier of the over-sampling mode pins. As the 130 line is active high, it should be marked GPIO_ACTIVE_HIGH. On the AD7606X 131 parts that support it, if all 3 pins are tied to a logic high, software 132 mode is enabled. 133 maxItems: 3 134 135 adi,sw-mode: 136 description: 137 Software mode of operation, so far available only for AD7616 and AD7606B. 138 It is enabled when all three oversampling mode pins are connected to high 139 level for the AD7606B, or both the range selection are connected to high 140 level for the AD7616. The device is configured by the corresponding 141 registers. If the adi,oversampling-ratio-gpios property is defined, then 142 the driver will set the oversampling gpios to high. Otherwise, it is 143 assumed that the pins are hardwired to VDD. 144 type: boolean 145 146 pwms: 147 description: 148 In case the conversion is triggered by a PWM instead of a GPIO plugged to 149 the CONVST pin, the PWM must be referenced. 150 The first is the PWM connected to CONVST or CONVST1 for the chips with the 151 2nd PWM connected to CONVST2, if CONVST2 is available and not shorted to 152 CONVST1. 153 minItems: 1 154 maxItems: 2 155 156 pwm-names: 157 minItems: 1 158 items: 159 - const: convst1 160 - const: convst2 161 162 io-backends: 163 description: 164 A reference to the iio-backend, which is responsible handling the BUSY 165 pin's falling edge and communication. 166 An example of backend can be found at 167 http://analogdevicesinc.github.io/hdl/library/axi_ad7606x/index.html 168 169patternProperties: 170 "^channel@[1-8]$": 171 type: object 172 $ref: adc.yaml 173 unevaluatedProperties: false 174 175 properties: 176 reg: 177 description: 178 The channel number, as specified in the datasheet (from 1 to 8). 179 minimum: 1 180 maximum: 8 181 182 diff-channels: 183 description: 184 Each channel can be configured as a bipolar differential channel. 185 The ADC uses the same positive and negative inputs for this. 186 This property must be specified as 'reg' (or the channel number) for 187 both positive and negative inputs (i.e. diff-channels = <reg reg>). 188 Since the configuration is bipolar differential, the 'bipolar' 189 property is required. 190 items: 191 minimum: 1 192 maximum: 8 193 194 bipolar: 195 description: 196 The ADC channels can be configured as 197 * Bipolar single-ended 198 * Unipolar single-ended 199 * Bipolar differential 200 Therefore in the DT, if no channel node is specified, it is considered 201 'unipolar single-ended'. So for the other configurations the 'bipolar' 202 property must be specified. If 'diff-channels' is specified, it is 203 considered a bipolar differential channel. Otherwise it is bipolar 204 single-ended. 205 206 adi,rfilter-ohms: 207 description: 208 For ADCs that supports gain calibration, this property must be set to 209 the value of the external RFilter resistor. Proper gain error 210 correction is applied based on this value. 211 default: 0 212 minimum: 0 213 maximum: 64512 214 215 required: 216 - reg 217 - bipolar 218 219required: 220 - compatible 221 - reg 222 - avcc-supply 223 - vdrive-supply 224 225allOf: 226 - $ref: /schemas/spi/spi-peripheral-props.yaml# 227 228 - oneOf: 229 - required: 230 - adi,conversion-start-gpios 231 - required: 232 - pwms 233 234 - if: 235 properties: 236 compatible: 237 contains: 238 const: adi,ad7616 239 then: 240 properties: 241 adi,first-data-gpios: false 242 standby-gpios: false 243 adi,range-gpios: 244 maxItems: 2 245 else: 246 properties: 247 adi,range-gpios: 248 maxItems: 1 249 250 - if: 251 properties: 252 compatible: 253 contains: 254 enum: 255 - adi,ad7605-4 256 - adi,ad7616 257 then: 258 properties: 259 adi,oversampling-ratio-gpios: false 260 261 - if: 262 properties: 263 compatible: 264 contains: 265 enum: 266 - adi,ad7605-4 267 - adi,ad7606-4 268 - adi,ad7606-6 269 - adi,ad7606-8 270 - adi,ad7607 271 - adi,ad7608 272 - adi,ad7609 273 - adi,ad7616 274 then: 275 patternProperties: 276 "^channel@[0-9a-f]+$": 277 properties: 278 adi,rfilter-ohms: false 279 280 - if: 281 properties: 282 compatible: 283 contains: 284 enum: 285 - adi,ad7605-4 286 - adi,ad7606-4 287 - adi,ad7606-6 288 - adi,ad7606-8 289 - adi,ad7607 290 - adi,ad7608 291 - adi,ad7609 292 then: 293 properties: 294 adi,sw-mode: false 295 else: 296 properties: 297 pwms: 298 maxItems: 1 299 pwm-names: 300 maxItems: 1 301 adi,conversion-start-gpios: 302 maxItems: 1 303 304 - if: 305 not: 306 required: 307 - adi,sw-mode 308 then: 309 patternProperties: 310 "^channel@[1-8]$": false 311 312 - if: 313 not: 314 properties: 315 compatible: 316 enum: 317 - adi,ad7606c-16 318 - adi,ad7606c-18 319 then: 320 patternProperties: 321 "^channel@[1-8]$": false 322 323unevaluatedProperties: false 324 325examples: 326 - | 327 #include <dt-bindings/gpio/gpio.h> 328 iio-backend { 329 #address-cells = <1>; 330 #size-cells = <0>; 331 adi_adc@0 { 332 compatible = "adi,ad7606b"; 333 reg = <0>; 334 pwms = <&axi_pwm_gen 0 0>; 335 336 avcc-supply = <&adc_vref>; 337 vdrive-supply = <&vdd_supply>; 338 339 reset-gpios = <&gpio0 91 GPIO_ACTIVE_HIGH>; 340 standby-gpios = <&gpio0 90 GPIO_ACTIVE_LOW>; 341 adi,range-gpios = <&gpio0 89 GPIO_ACTIVE_HIGH>; 342 adi,oversampling-ratio-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH 343 &gpio0 87 GPIO_ACTIVE_HIGH 344 &gpio0 86 GPIO_ACTIVE_HIGH>; 345 io-backends = <&iio_backend>; 346 }; 347 }; 348 349 - | 350 #include <dt-bindings/gpio/gpio.h> 351 #include <dt-bindings/interrupt-controller/irq.h> 352 spi { 353 #address-cells = <1>; 354 #size-cells = <0>; 355 356 adc@0 { 357 compatible = "adi,ad7606-8"; 358 reg = <0>; 359 spi-max-frequency = <1000000>; 360 spi-cpol; 361 362 avcc-supply = <&adc_vref>; 363 vdrive-supply = <&vdd_supply>; 364 365 interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 366 interrupt-parent = <&gpio>; 367 368 adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; 369 reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; 370 adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; 371 adi,oversampling-ratio-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>, 372 <&gpio 23 GPIO_ACTIVE_HIGH>, 373 <&gpio 26 GPIO_ACTIVE_HIGH>; 374 standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>; 375 }; 376 }; 377 - | 378 #include <dt-bindings/gpio/gpio.h> 379 #include <dt-bindings/interrupt-controller/irq.h> 380 spi { 381 #address-cells = <1>; 382 #size-cells = <0>; 383 384 adc@0 { 385 compatible = "adi,ad7606c-18"; 386 reg = <0>; 387 388 #address-cells = <1>; 389 #size-cells = <0>; 390 391 spi-max-frequency = <1000000>; 392 spi-cpol; 393 394 avcc-supply = <&adc_vref>; 395 vdrive-supply = <&vdd_supply>; 396 397 interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 398 interrupt-parent = <&gpio>; 399 400 adi,conversion-start-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; 401 reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; 402 adi,first-data-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; 403 standby-gpios = <&gpio 24 GPIO_ACTIVE_LOW>; 404 405 adi,sw-mode; 406 407 channel@1 { 408 reg = <1>; 409 diff-channels = <1 1>; 410 bipolar; 411 }; 412 413 channel@3 { 414 reg = <3>; 415 bipolar; 416 }; 417 418 channel@8 { 419 reg = <8>; 420 diff-channels = <8 8>; 421 bipolar; 422 adi,rfilter-ohms = <2048>; 423 }; 424 425 }; 426 }; 427...
~/
Read-only file preview.