1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad7091r5.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7*8d13bc63SEmmanuel Vadottitle: Analog Devices AD7091R-2/-4/-5/-8 Multi-Channel 12-Bit ADCs 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Michael Hennerich <michael.hennerich@analog.com> 11*8d13bc63SEmmanuel Vadot - Marcelo Schmitt <marcelo.schmitt@analog.com> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: | 14*8d13bc63SEmmanuel Vadot Analog Devices AD7091R5 4-Channel 12-Bit ADC supporting I2C interface 15c66ec88fSEmmanuel Vadot https://www.analog.com/media/en/technical-documentation/data-sheets/ad7091r-5.pdf 16*8d13bc63SEmmanuel Vadot Analog Devices AD7091R-2/AD7091R-4/AD7091R-8 2-/4-/8-Channel 12-Bit ADCs 17*8d13bc63SEmmanuel Vadot supporting SPI interface 18*8d13bc63SEmmanuel Vadot https://www.analog.com/media/en/technical-documentation/data-sheets/AD7091R-2_7091R-4_7091R-8.pdf 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel Vadotproperties: 21c66ec88fSEmmanuel Vadot compatible: 22c66ec88fSEmmanuel Vadot enum: 23*8d13bc63SEmmanuel Vadot - adi,ad7091r2 24*8d13bc63SEmmanuel Vadot - adi,ad7091r4 25c66ec88fSEmmanuel Vadot - adi,ad7091r5 26*8d13bc63SEmmanuel Vadot - adi,ad7091r8 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot reg: 29c66ec88fSEmmanuel Vadot maxItems: 1 30c66ec88fSEmmanuel Vadot 31*8d13bc63SEmmanuel Vadot vdd-supply: 32*8d13bc63SEmmanuel Vadot description: 33*8d13bc63SEmmanuel Vadot Provide VDD power to the sensor (VDD range is from 2.7V to 5.25V). 34*8d13bc63SEmmanuel Vadot 35*8d13bc63SEmmanuel Vadot vdrive-supply: 36*8d13bc63SEmmanuel Vadot description: 37*8d13bc63SEmmanuel Vadot Determines the voltage level at which the interface logic will operate. 38*8d13bc63SEmmanuel Vadot The V_drive voltage range is from 1.8V to 5.25V and must not exceed VDD by 39*8d13bc63SEmmanuel Vadot more than 0.3V. 40*8d13bc63SEmmanuel Vadot 41c66ec88fSEmmanuel Vadot vref-supply: 42c66ec88fSEmmanuel Vadot description: 43c66ec88fSEmmanuel Vadot Phandle to the vref power supply 44c66ec88fSEmmanuel Vadot 45*8d13bc63SEmmanuel Vadot convst-gpios: 46*8d13bc63SEmmanuel Vadot description: 47*8d13bc63SEmmanuel Vadot GPIO connected to the CONVST pin. 48*8d13bc63SEmmanuel Vadot This logic input is used to initiate conversions on the analog 49*8d13bc63SEmmanuel Vadot input channels. 50c66ec88fSEmmanuel Vadot maxItems: 1 51c66ec88fSEmmanuel Vadot 52*8d13bc63SEmmanuel Vadot reset-gpios: 53*8d13bc63SEmmanuel Vadot maxItems: 1 54*8d13bc63SEmmanuel Vadot 55*8d13bc63SEmmanuel Vadot interrupts: 56*8d13bc63SEmmanuel Vadot description: 57*8d13bc63SEmmanuel Vadot Interrupt for signaling when conversion results exceed the high limit for 58*8d13bc63SEmmanuel Vadot ADC readings or fall below the low limit for them. Interrupt source must 59*8d13bc63SEmmanuel Vadot be attached to ALERT/BUSY/GPO0 pin. 60*8d13bc63SEmmanuel Vadot maxItems: 1 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel Vadotrequired: 63c66ec88fSEmmanuel Vadot - compatible 64c66ec88fSEmmanuel Vadot - reg 65c66ec88fSEmmanuel Vadot 66*8d13bc63SEmmanuel VadotallOf: 67*8d13bc63SEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 68*8d13bc63SEmmanuel Vadot 69*8d13bc63SEmmanuel Vadot # AD7091R-2 does not have ALERT/BUSY/GPO pin 70*8d13bc63SEmmanuel Vadot - if: 71*8d13bc63SEmmanuel Vadot properties: 72*8d13bc63SEmmanuel Vadot compatible: 73*8d13bc63SEmmanuel Vadot contains: 74*8d13bc63SEmmanuel Vadot enum: 75*8d13bc63SEmmanuel Vadot - adi,ad7091r2 76*8d13bc63SEmmanuel Vadot then: 77*8d13bc63SEmmanuel Vadot properties: 78*8d13bc63SEmmanuel Vadot interrupts: false 79*8d13bc63SEmmanuel Vadot 80*8d13bc63SEmmanuel Vadot - if: 81*8d13bc63SEmmanuel Vadot properties: 82*8d13bc63SEmmanuel Vadot compatible: 83*8d13bc63SEmmanuel Vadot contains: 84*8d13bc63SEmmanuel Vadot enum: 85*8d13bc63SEmmanuel Vadot - adi,ad7091r2 86*8d13bc63SEmmanuel Vadot - adi,ad7091r4 87*8d13bc63SEmmanuel Vadot - adi,ad7091r8 88*8d13bc63SEmmanuel Vadot then: 89*8d13bc63SEmmanuel Vadot required: 90*8d13bc63SEmmanuel Vadot - convst-gpios 91*8d13bc63SEmmanuel Vadot 92*8d13bc63SEmmanuel VadotunevaluatedProperties: false 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel Vadotexamples: 95c66ec88fSEmmanuel Vadot - | 96c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 97c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 98c66ec88fSEmmanuel Vadot i2c { 99c66ec88fSEmmanuel Vadot #address-cells = <1>; 100c66ec88fSEmmanuel Vadot #size-cells = <0>; 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot adc@2f { 103c66ec88fSEmmanuel Vadot compatible = "adi,ad7091r5"; 104c66ec88fSEmmanuel Vadot reg = <0x2f>; 105c66ec88fSEmmanuel Vadot 106c66ec88fSEmmanuel Vadot interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 107c66ec88fSEmmanuel Vadot interrupt-parent = <&gpio>; 108c66ec88fSEmmanuel Vadot }; 109c66ec88fSEmmanuel Vadot }; 110*8d13bc63SEmmanuel Vadot - | 111*8d13bc63SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 112*8d13bc63SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 113*8d13bc63SEmmanuel Vadot spi { 114*8d13bc63SEmmanuel Vadot #address-cells = <1>; 115*8d13bc63SEmmanuel Vadot #size-cells = <0>; 116*8d13bc63SEmmanuel Vadot 117*8d13bc63SEmmanuel Vadot adc@0 { 118*8d13bc63SEmmanuel Vadot compatible = "adi,ad7091r8"; 119*8d13bc63SEmmanuel Vadot reg = <0x0>; 120*8d13bc63SEmmanuel Vadot spi-max-frequency = <1000000>; 121*8d13bc63SEmmanuel Vadot vref-supply = <&adc_vref>; 122*8d13bc63SEmmanuel Vadot convst-gpios = <&gpio 25 GPIO_ACTIVE_LOW>; 123*8d13bc63SEmmanuel Vadot reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; 124*8d13bc63SEmmanuel Vadot interrupts = <22 IRQ_TYPE_EDGE_FALLING>; 125*8d13bc63SEmmanuel Vadot interrupt-parent = <&gpio>; 126*8d13bc63SEmmanuel Vadot }; 127*8d13bc63SEmmanuel Vadot }; 128c66ec88fSEmmanuel Vadot... 129