1*96472f18SMarcelo Schmitt# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*96472f18SMarcelo Schmitt%YAML 1.2 3*96472f18SMarcelo Schmitt--- 4*96472f18SMarcelo Schmitt$id: http://devicetree.org/schemas/iio/adc/adi,ad4000.yaml# 5*96472f18SMarcelo Schmitt$schema: http://devicetree.org/meta-schemas/core.yaml# 6*96472f18SMarcelo Schmitt 7*96472f18SMarcelo Schmitttitle: Analog Devices AD4000 and similar Analog to Digital Converters 8*96472f18SMarcelo Schmitt 9*96472f18SMarcelo Schmittmaintainers: 10*96472f18SMarcelo Schmitt - Marcelo Schmitt <marcelo.schmitt@analog.com> 11*96472f18SMarcelo Schmitt 12*96472f18SMarcelo Schmittdescription: | 13*96472f18SMarcelo Schmitt Analog Devices AD4000 family of Analog to Digital Converters with SPI support. 14*96472f18SMarcelo Schmitt Specifications can be found at: 15*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/ad4000-4004-4008.pdf 16*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/ad4001-4005.pdf 17*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/ad4002-4006-4010.pdf 18*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/ad4003-4007-4011.pdf 19*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/ad4020-4021-4022.pdf 20*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4001.pdf 21*96472f18SMarcelo Schmitt https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4003.pdf 22*96472f18SMarcelo Schmitt 23*96472f18SMarcelo Schmitt$ref: /schemas/spi/spi-peripheral-props.yaml# 24*96472f18SMarcelo Schmitt 25*96472f18SMarcelo Schmittproperties: 26*96472f18SMarcelo Schmitt compatible: 27*96472f18SMarcelo Schmitt oneOf: 28*96472f18SMarcelo Schmitt - const: adi,ad4000 29*96472f18SMarcelo Schmitt - items: 30*96472f18SMarcelo Schmitt - enum: 31*96472f18SMarcelo Schmitt - adi,ad4004 32*96472f18SMarcelo Schmitt - adi,ad4008 33*96472f18SMarcelo Schmitt - const: adi,ad4000 34*96472f18SMarcelo Schmitt 35*96472f18SMarcelo Schmitt - const: adi,ad4001 36*96472f18SMarcelo Schmitt - items: 37*96472f18SMarcelo Schmitt - enum: 38*96472f18SMarcelo Schmitt - adi,ad4005 39*96472f18SMarcelo Schmitt - const: adi,ad4001 40*96472f18SMarcelo Schmitt 41*96472f18SMarcelo Schmitt - const: adi,ad4002 42*96472f18SMarcelo Schmitt - items: 43*96472f18SMarcelo Schmitt - enum: 44*96472f18SMarcelo Schmitt - adi,ad4006 45*96472f18SMarcelo Schmitt - adi,ad4010 46*96472f18SMarcelo Schmitt - const: adi,ad4002 47*96472f18SMarcelo Schmitt 48*96472f18SMarcelo Schmitt - const: adi,ad4003 49*96472f18SMarcelo Schmitt - items: 50*96472f18SMarcelo Schmitt - enum: 51*96472f18SMarcelo Schmitt - adi,ad4007 52*96472f18SMarcelo Schmitt - adi,ad4011 53*96472f18SMarcelo Schmitt - const: adi,ad4003 54*96472f18SMarcelo Schmitt 55*96472f18SMarcelo Schmitt - const: adi,ad4020 56*96472f18SMarcelo Schmitt - items: 57*96472f18SMarcelo Schmitt - enum: 58*96472f18SMarcelo Schmitt - adi,ad4021 59*96472f18SMarcelo Schmitt - adi,ad4022 60*96472f18SMarcelo Schmitt - const: adi,ad4020 61*96472f18SMarcelo Schmitt 62*96472f18SMarcelo Schmitt - const: adi,adaq4001 63*96472f18SMarcelo Schmitt 64*96472f18SMarcelo Schmitt - const: adi,adaq4003 65*96472f18SMarcelo Schmitt 66*96472f18SMarcelo Schmitt reg: 67*96472f18SMarcelo Schmitt maxItems: 1 68*96472f18SMarcelo Schmitt 69*96472f18SMarcelo Schmitt spi-max-frequency: 70*96472f18SMarcelo Schmitt maximum: 102040816 # for VIO > 2.7 V, 81300813 for VIO > 1.7 V 71*96472f18SMarcelo Schmitt 72*96472f18SMarcelo Schmitt adi,sdi-pin: 73*96472f18SMarcelo Schmitt $ref: /schemas/types.yaml#/definitions/string 74*96472f18SMarcelo Schmitt enum: [ high, low, cs, sdi ] 75*96472f18SMarcelo Schmitt default: sdi 76*96472f18SMarcelo Schmitt description: 77*96472f18SMarcelo Schmitt Describes how the ADC SDI pin is wired. A value of "sdi" indicates that 78*96472f18SMarcelo Schmitt the ADC SDI is connected to host SDO. "high" indicates that the ADC SDI 79*96472f18SMarcelo Schmitt pin is hard-wired to logic high (VIO). "low" indicates that it is 80*96472f18SMarcelo Schmitt hard-wired low (GND). "cs" indicates that the ADC SDI pin is connected to 81*96472f18SMarcelo Schmitt the host CS line. 82*96472f18SMarcelo Schmitt 83*96472f18SMarcelo Schmitt '#daisy-chained-devices': true 84*96472f18SMarcelo Schmitt 85*96472f18SMarcelo Schmitt vdd-supply: 86*96472f18SMarcelo Schmitt description: A 1.8V supply that powers the chip (VDD). 87*96472f18SMarcelo Schmitt 88*96472f18SMarcelo Schmitt vio-supply: 89*96472f18SMarcelo Schmitt description: 90*96472f18SMarcelo Schmitt A 1.8V to 5.5V supply for the digital inputs and outputs (VIO). 91*96472f18SMarcelo Schmitt 92*96472f18SMarcelo Schmitt ref-supply: 93*96472f18SMarcelo Schmitt description: 94*96472f18SMarcelo Schmitt A 2.5 to 5V supply for the external reference voltage (REF). 95*96472f18SMarcelo Schmitt 96*96472f18SMarcelo Schmitt cnv-gpios: 97*96472f18SMarcelo Schmitt description: 98*96472f18SMarcelo Schmitt When provided, this property indicates the GPIO that is connected to the 99*96472f18SMarcelo Schmitt CNV pin. 100*96472f18SMarcelo Schmitt maxItems: 1 101*96472f18SMarcelo Schmitt 102*96472f18SMarcelo Schmitt adi,high-z-input: 103*96472f18SMarcelo Schmitt type: boolean 104*96472f18SMarcelo Schmitt description: 105*96472f18SMarcelo Schmitt High-Z mode allows the amplifier and RC filter in front of the ADC to be 106*96472f18SMarcelo Schmitt chosen based on the signal bandwidth of interest, rather than the settling 107*96472f18SMarcelo Schmitt requirements of the switched capacitor SAR ADC inputs. 108*96472f18SMarcelo Schmitt 109*96472f18SMarcelo Schmitt adi,gain-milli: 110*96472f18SMarcelo Schmitt description: | 111*96472f18SMarcelo Schmitt The hardware gain applied to the ADC input (in milli units). 112*96472f18SMarcelo Schmitt The gain provided by the ADC input scaler is defined by the hardware 113*96472f18SMarcelo Schmitt connections between chip pins OUT+, R1K-, R1K1-, R1K+, R1K1+, and OUT-. 114*96472f18SMarcelo Schmitt If not present, default to 1000 (no actual gain applied). 115*96472f18SMarcelo Schmitt $ref: /schemas/types.yaml#/definitions/uint16 116*96472f18SMarcelo Schmitt enum: [454, 909, 1000, 1900] 117*96472f18SMarcelo Schmitt default: 1000 118*96472f18SMarcelo Schmitt 119*96472f18SMarcelo Schmitt interrupts: 120*96472f18SMarcelo Schmitt description: 121*96472f18SMarcelo Schmitt The SDO pin can also function as a busy indicator. This node should be 122*96472f18SMarcelo Schmitt connected to an interrupt that is triggered when the SDO line goes low 123*96472f18SMarcelo Schmitt while the SDI line is high and the CNV line is low ("3-wire" mode) or the 124*96472f18SMarcelo Schmitt SDI line is low and the CNV line is high ("4-wire" mode); or when the SDO 125*96472f18SMarcelo Schmitt line goes high while the SDI and CNV lines are high (chain mode), 126*96472f18SMarcelo Schmitt maxItems: 1 127*96472f18SMarcelo Schmitt 128*96472f18SMarcelo Schmittrequired: 129*96472f18SMarcelo Schmitt - compatible 130*96472f18SMarcelo Schmitt - reg 131*96472f18SMarcelo Schmitt - vdd-supply 132*96472f18SMarcelo Schmitt - vio-supply 133*96472f18SMarcelo Schmitt - ref-supply 134*96472f18SMarcelo Schmitt 135*96472f18SMarcelo SchmittallOf: 136*96472f18SMarcelo Schmitt # The configuration register can only be accessed if SDI is connected to MOSI 137*96472f18SMarcelo Schmitt - if: 138*96472f18SMarcelo Schmitt required: 139*96472f18SMarcelo Schmitt - adi,sdi-pin 140*96472f18SMarcelo Schmitt then: 141*96472f18SMarcelo Schmitt properties: 142*96472f18SMarcelo Schmitt adi,high-z-input: false 143*96472f18SMarcelo Schmitt # chain mode has lower SCLK max rate 144*96472f18SMarcelo Schmitt - if: 145*96472f18SMarcelo Schmitt required: 146*96472f18SMarcelo Schmitt - '#daisy-chained-devices' 147*96472f18SMarcelo Schmitt then: 148*96472f18SMarcelo Schmitt properties: 149*96472f18SMarcelo Schmitt spi-max-frequency: 150*96472f18SMarcelo Schmitt maximum: 50000000 # for VIO > 2.7 V, 40000000 for VIO > 1.7 V 151*96472f18SMarcelo Schmitt # Gain property only applies to ADAQ devices 152*96472f18SMarcelo Schmitt - if: 153*96472f18SMarcelo Schmitt properties: 154*96472f18SMarcelo Schmitt compatible: 155*96472f18SMarcelo Schmitt not: 156*96472f18SMarcelo Schmitt contains: 157*96472f18SMarcelo Schmitt enum: 158*96472f18SMarcelo Schmitt - adi,adaq4001 159*96472f18SMarcelo Schmitt - adi,adaq4003 160*96472f18SMarcelo Schmitt then: 161*96472f18SMarcelo Schmitt properties: 162*96472f18SMarcelo Schmitt adi,gain-milli: false 163*96472f18SMarcelo Schmitt 164*96472f18SMarcelo SchmittunevaluatedProperties: false 165*96472f18SMarcelo Schmitt 166*96472f18SMarcelo Schmittexamples: 167*96472f18SMarcelo Schmitt - | 168*96472f18SMarcelo Schmitt #include <dt-bindings/gpio/gpio.h> 169*96472f18SMarcelo Schmitt spi { 170*96472f18SMarcelo Schmitt #address-cells = <1>; 171*96472f18SMarcelo Schmitt #size-cells = <0>; 172*96472f18SMarcelo Schmitt adc@0 { 173*96472f18SMarcelo Schmitt compatible = "adi,ad4020"; 174*96472f18SMarcelo Schmitt reg = <0>; 175*96472f18SMarcelo Schmitt spi-max-frequency = <71000000>; 176*96472f18SMarcelo Schmitt vdd-supply = <&supply_1_8V>; 177*96472f18SMarcelo Schmitt vio-supply = <&supply_1_8V>; 178*96472f18SMarcelo Schmitt ref-supply = <&supply_5V>; 179*96472f18SMarcelo Schmitt adi,sdi-pin = "cs"; 180*96472f18SMarcelo Schmitt cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>; 181*96472f18SMarcelo Schmitt }; 182*96472f18SMarcelo Schmitt }; 183*96472f18SMarcelo Schmitt - | 184*96472f18SMarcelo Schmitt spi { 185*96472f18SMarcelo Schmitt #address-cells = <1>; 186*96472f18SMarcelo Schmitt #size-cells = <0>; 187*96472f18SMarcelo Schmitt adc@0 { 188*96472f18SMarcelo Schmitt compatible = "adi,adaq4003"; 189*96472f18SMarcelo Schmitt reg = <0>; 190*96472f18SMarcelo Schmitt spi-max-frequency = <80000000>; 191*96472f18SMarcelo Schmitt vdd-supply = <&supply_1_8V>; 192*96472f18SMarcelo Schmitt vio-supply = <&supply_1_8V>; 193*96472f18SMarcelo Schmitt ref-supply = <&supply_5V>; 194*96472f18SMarcelo Schmitt adi,high-z-input; 195*96472f18SMarcelo Schmitt adi,gain-milli = /bits/ 16 <454>; 196*96472f18SMarcelo Schmitt }; 197*96472f18SMarcelo Schmitt }; 198