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