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