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