1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*b2d2a78aSEmmanuel Vadot%YAML 1.2 3*b2d2a78aSEmmanuel Vadot--- 4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad4695.yaml# 5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*b2d2a78aSEmmanuel Vadot 7*b2d2a78aSEmmanuel Vadottitle: Analog Devices Easy Drive Multiplexed SAR Analog to Digital Converters 8*b2d2a78aSEmmanuel Vadot 9*b2d2a78aSEmmanuel Vadotmaintainers: 10*b2d2a78aSEmmanuel Vadot - Michael Hennerich <Michael.Hennerich@analog.com> 11*b2d2a78aSEmmanuel Vadot - Nuno Sá <nuno.sa@analog.com> 12*b2d2a78aSEmmanuel Vadot 13*b2d2a78aSEmmanuel Vadotdescription: | 14*b2d2a78aSEmmanuel Vadot A family of similar multi-channel analog to digital converters with SPI bus. 15*b2d2a78aSEmmanuel Vadot 16*b2d2a78aSEmmanuel Vadot * https://www.analog.com/en/products/ad4695.html 17*b2d2a78aSEmmanuel Vadot * https://www.analog.com/en/products/ad4696.html 18*b2d2a78aSEmmanuel Vadot * https://www.analog.com/en/products/ad4697.html 19*b2d2a78aSEmmanuel Vadot * https://www.analog.com/en/products/ad4698.html 20*b2d2a78aSEmmanuel Vadot 21*b2d2a78aSEmmanuel Vadot$ref: /schemas/spi/spi-peripheral-props.yaml# 22*b2d2a78aSEmmanuel Vadot 23*b2d2a78aSEmmanuel Vadotproperties: 24*b2d2a78aSEmmanuel Vadot compatible: 25*b2d2a78aSEmmanuel Vadot enum: 26*b2d2a78aSEmmanuel Vadot - adi,ad4695 27*b2d2a78aSEmmanuel Vadot - adi,ad4696 28*b2d2a78aSEmmanuel Vadot - adi,ad4697 29*b2d2a78aSEmmanuel Vadot - adi,ad4698 30*b2d2a78aSEmmanuel Vadot 31*b2d2a78aSEmmanuel Vadot reg: 32*b2d2a78aSEmmanuel Vadot maxItems: 1 33*b2d2a78aSEmmanuel Vadot 34*b2d2a78aSEmmanuel Vadot spi-max-frequency: 35*b2d2a78aSEmmanuel Vadot maximum: 80000000 36*b2d2a78aSEmmanuel Vadot 37*b2d2a78aSEmmanuel Vadot spi-cpol: true 38*b2d2a78aSEmmanuel Vadot spi-cpha: true 39*b2d2a78aSEmmanuel Vadot 40*b2d2a78aSEmmanuel Vadot spi-rx-bus-width: 41*b2d2a78aSEmmanuel Vadot minimum: 1 42*b2d2a78aSEmmanuel Vadot maximum: 4 43*b2d2a78aSEmmanuel Vadot 44*b2d2a78aSEmmanuel Vadot avdd-supply: 45*b2d2a78aSEmmanuel Vadot description: Analog power supply. 46*b2d2a78aSEmmanuel Vadot 47*b2d2a78aSEmmanuel Vadot vio-supply: 48*b2d2a78aSEmmanuel Vadot description: I/O pin power supply. 49*b2d2a78aSEmmanuel Vadot 50*b2d2a78aSEmmanuel Vadot ldo-in-supply: 51*b2d2a78aSEmmanuel Vadot description: Internal LDO Input. Mutually exclusive with vdd-supply. 52*b2d2a78aSEmmanuel Vadot 53*b2d2a78aSEmmanuel Vadot vdd-supply: 54*b2d2a78aSEmmanuel Vadot description: Core power supply. Mutually exclusive with ldo-in-supply. 55*b2d2a78aSEmmanuel Vadot 56*b2d2a78aSEmmanuel Vadot ref-supply: 57*b2d2a78aSEmmanuel Vadot description: 58*b2d2a78aSEmmanuel Vadot External reference voltage. Mutually exclusive with refin-supply. 59*b2d2a78aSEmmanuel Vadot 60*b2d2a78aSEmmanuel Vadot refin-supply: 61*b2d2a78aSEmmanuel Vadot description: 62*b2d2a78aSEmmanuel Vadot Internal reference buffer input. Mutually exclusive with ref-supply. 63*b2d2a78aSEmmanuel Vadot 64*b2d2a78aSEmmanuel Vadot com-supply: 65*b2d2a78aSEmmanuel Vadot description: Common voltage supply for pseudo-differential analog inputs. 66*b2d2a78aSEmmanuel Vadot 67*b2d2a78aSEmmanuel Vadot adi,no-ref-current-limit: 68*b2d2a78aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 69*b2d2a78aSEmmanuel Vadot description: 70*b2d2a78aSEmmanuel Vadot When this flag is present, the REF Overvoltage Reduced Current protection 71*b2d2a78aSEmmanuel Vadot is disabled. 72*b2d2a78aSEmmanuel Vadot 73*b2d2a78aSEmmanuel Vadot adi,no-ref-high-z: 74*b2d2a78aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 75*b2d2a78aSEmmanuel Vadot description: 76*b2d2a78aSEmmanuel Vadot Enable this flag if the ref-supply requires Reference Input High-Z Mode 77*b2d2a78aSEmmanuel Vadot to be disabled for proper operation. 78*b2d2a78aSEmmanuel Vadot 79*b2d2a78aSEmmanuel Vadot cnv-gpios: 80*b2d2a78aSEmmanuel Vadot description: The Convert Input (CNV). If omitted, CNV is tied to SPI CS. 81*b2d2a78aSEmmanuel Vadot maxItems: 1 82*b2d2a78aSEmmanuel Vadot 83*b2d2a78aSEmmanuel Vadot reset-gpios: 84*b2d2a78aSEmmanuel Vadot description: The Reset Input (RESET). Should be configured GPIO_ACTIVE_LOW. 85*b2d2a78aSEmmanuel Vadot maxItems: 1 86*b2d2a78aSEmmanuel Vadot 87*b2d2a78aSEmmanuel Vadot interrupts: 88*b2d2a78aSEmmanuel Vadot minItems: 1 89*b2d2a78aSEmmanuel Vadot items: 90*b2d2a78aSEmmanuel Vadot - description: Signal coming from the BSY_ALT_GP0 pin (ALERT or BUSY). 91*b2d2a78aSEmmanuel Vadot - description: Signal coming from the GP2 pin (ALERT). 92*b2d2a78aSEmmanuel Vadot - description: Signal coming from the GP3 pin (BUSY). 93*b2d2a78aSEmmanuel Vadot 94*b2d2a78aSEmmanuel Vadot interrupt-names: 95*b2d2a78aSEmmanuel Vadot minItems: 1 96*b2d2a78aSEmmanuel Vadot items: 97*b2d2a78aSEmmanuel Vadot - const: gp0 98*b2d2a78aSEmmanuel Vadot - const: gp2 99*b2d2a78aSEmmanuel Vadot - const: gp3 100*b2d2a78aSEmmanuel Vadot 101*b2d2a78aSEmmanuel Vadot gpio-controller: true 102*b2d2a78aSEmmanuel Vadot 103*b2d2a78aSEmmanuel Vadot "#gpio-cells": 104*b2d2a78aSEmmanuel Vadot const: 2 105*b2d2a78aSEmmanuel Vadot description: | 106*b2d2a78aSEmmanuel Vadot The first cell is the GPn number: 0 to 3. 107*b2d2a78aSEmmanuel Vadot The second cell takes standard GPIO flags. 108*b2d2a78aSEmmanuel Vadot 109*b2d2a78aSEmmanuel Vadot "#address-cells": 110*b2d2a78aSEmmanuel Vadot const: 1 111*b2d2a78aSEmmanuel Vadot 112*b2d2a78aSEmmanuel Vadot "#size-cells": 113*b2d2a78aSEmmanuel Vadot const: 0 114*b2d2a78aSEmmanuel Vadot 115*b2d2a78aSEmmanuel VadotpatternProperties: 116*b2d2a78aSEmmanuel Vadot "^in(?:[13579]|1[135])-supply$": 117*b2d2a78aSEmmanuel Vadot description: 118*b2d2a78aSEmmanuel Vadot Optional voltage supply for odd numbered channels when they are used as 119*b2d2a78aSEmmanuel Vadot the negative input for a pseudo-differential channel. 120*b2d2a78aSEmmanuel Vadot 121*b2d2a78aSEmmanuel Vadot "^channel@[0-9a-f]$": 122*b2d2a78aSEmmanuel Vadot type: object 123*b2d2a78aSEmmanuel Vadot $ref: adc.yaml 124*b2d2a78aSEmmanuel Vadot unevaluatedProperties: false 125*b2d2a78aSEmmanuel Vadot description: 126*b2d2a78aSEmmanuel Vadot Describes each individual channel. In addition the properties defined 127*b2d2a78aSEmmanuel Vadot below, bipolar from adc.yaml is also supported. 128*b2d2a78aSEmmanuel Vadot 129*b2d2a78aSEmmanuel Vadot properties: 130*b2d2a78aSEmmanuel Vadot reg: 131*b2d2a78aSEmmanuel Vadot maximum: 15 132*b2d2a78aSEmmanuel Vadot 133*b2d2a78aSEmmanuel Vadot common-mode-channel: 134*b2d2a78aSEmmanuel Vadot description: 135*b2d2a78aSEmmanuel Vadot Describes the common mode channel for single channels. 0xFF is REFGND 136*b2d2a78aSEmmanuel Vadot and OxFE is COM. Macros are available for these values in 137*b2d2a78aSEmmanuel Vadot dt-bindings/iio/adi,ad4695.h. Values 1 to 15 correspond to INx inputs. 138*b2d2a78aSEmmanuel Vadot Only odd numbered INx inputs can be used as common mode channels. 139*b2d2a78aSEmmanuel Vadot enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF] 140*b2d2a78aSEmmanuel Vadot default: 0xFF 141*b2d2a78aSEmmanuel Vadot 142*b2d2a78aSEmmanuel Vadot adi,no-high-z: 143*b2d2a78aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 144*b2d2a78aSEmmanuel Vadot description: 145*b2d2a78aSEmmanuel Vadot Enable this flag if the input pin requires the Analog Input High-Z 146*b2d2a78aSEmmanuel Vadot Mode to be disabled for proper operation. 147*b2d2a78aSEmmanuel Vadot 148*b2d2a78aSEmmanuel Vadot required: 149*b2d2a78aSEmmanuel Vadot - reg 150*b2d2a78aSEmmanuel Vadot 151*b2d2a78aSEmmanuel Vadot allOf: 152*b2d2a78aSEmmanuel Vadot # bipolar mode can't be used with REFGND 153*b2d2a78aSEmmanuel Vadot - if: 154*b2d2a78aSEmmanuel Vadot properties: 155*b2d2a78aSEmmanuel Vadot common-mode-channel: 156*b2d2a78aSEmmanuel Vadot const: 0xFF 157*b2d2a78aSEmmanuel Vadot then: 158*b2d2a78aSEmmanuel Vadot properties: 159*b2d2a78aSEmmanuel Vadot bipolar: false 160*b2d2a78aSEmmanuel Vadot 161*b2d2a78aSEmmanuel Vadotrequired: 162*b2d2a78aSEmmanuel Vadot - compatible 163*b2d2a78aSEmmanuel Vadot - reg 164*b2d2a78aSEmmanuel Vadot - avdd-supply 165*b2d2a78aSEmmanuel Vadot - vio-supply 166*b2d2a78aSEmmanuel Vadot 167*b2d2a78aSEmmanuel VadotallOf: 168*b2d2a78aSEmmanuel Vadot - oneOf: 169*b2d2a78aSEmmanuel Vadot - required: 170*b2d2a78aSEmmanuel Vadot - ldo-in-supply 171*b2d2a78aSEmmanuel Vadot - required: 172*b2d2a78aSEmmanuel Vadot - vdd-supply 173*b2d2a78aSEmmanuel Vadot 174*b2d2a78aSEmmanuel Vadot - oneOf: 175*b2d2a78aSEmmanuel Vadot - required: 176*b2d2a78aSEmmanuel Vadot - ref-supply 177*b2d2a78aSEmmanuel Vadot - required: 178*b2d2a78aSEmmanuel Vadot - refin-supply 179*b2d2a78aSEmmanuel Vadot 180*b2d2a78aSEmmanuel Vadot # the internal reference buffer always requires high-z mode 181*b2d2a78aSEmmanuel Vadot - if: 182*b2d2a78aSEmmanuel Vadot required: 183*b2d2a78aSEmmanuel Vadot - refin-supply 184*b2d2a78aSEmmanuel Vadot then: 185*b2d2a78aSEmmanuel Vadot properties: 186*b2d2a78aSEmmanuel Vadot adi,no-ref-high-z: false 187*b2d2a78aSEmmanuel Vadot 188*b2d2a78aSEmmanuel Vadot # limit channels for 8-channel chips 189*b2d2a78aSEmmanuel Vadot - if: 190*b2d2a78aSEmmanuel Vadot properties: 191*b2d2a78aSEmmanuel Vadot compatible: 192*b2d2a78aSEmmanuel Vadot contains: 193*b2d2a78aSEmmanuel Vadot enum: 194*b2d2a78aSEmmanuel Vadot - adi,ad4697 195*b2d2a78aSEmmanuel Vadot - adi,ad4698 196*b2d2a78aSEmmanuel Vadot then: 197*b2d2a78aSEmmanuel Vadot patternProperties: 198*b2d2a78aSEmmanuel Vadot "^in(?:9|1[135])-supply$": false 199*b2d2a78aSEmmanuel Vadot "^channel@[0-7]$": 200*b2d2a78aSEmmanuel Vadot properties: 201*b2d2a78aSEmmanuel Vadot reg: 202*b2d2a78aSEmmanuel Vadot maximum: 7 203*b2d2a78aSEmmanuel Vadot common-mode-channel: 204*b2d2a78aSEmmanuel Vadot enum: [1, 3, 5, 7, 0xFE, 0xFF] 205*b2d2a78aSEmmanuel Vadot "^channel@[8-9a-f]$": false 206*b2d2a78aSEmmanuel Vadot 207*b2d2a78aSEmmanuel VadotunevaluatedProperties: false 208*b2d2a78aSEmmanuel Vadot 209*b2d2a78aSEmmanuel Vadotexamples: 210*b2d2a78aSEmmanuel Vadot - | 211*b2d2a78aSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 212*b2d2a78aSEmmanuel Vadot #include <dt-bindings/iio/adi,ad4695.h> 213*b2d2a78aSEmmanuel Vadot 214*b2d2a78aSEmmanuel Vadot spi { 215*b2d2a78aSEmmanuel Vadot #address-cells = <1>; 216*b2d2a78aSEmmanuel Vadot #size-cells = <0>; 217*b2d2a78aSEmmanuel Vadot 218*b2d2a78aSEmmanuel Vadot adc@0 { 219*b2d2a78aSEmmanuel Vadot compatible = "adi,ad4695"; 220*b2d2a78aSEmmanuel Vadot reg = <0>; 221*b2d2a78aSEmmanuel Vadot spi-cpol; 222*b2d2a78aSEmmanuel Vadot spi-cpha; 223*b2d2a78aSEmmanuel Vadot spi-max-frequency = <80000000>; 224*b2d2a78aSEmmanuel Vadot avdd-supply = <&power_supply>; 225*b2d2a78aSEmmanuel Vadot ldo-in-supply = <&power_supply>; 226*b2d2a78aSEmmanuel Vadot vio-supply = <&io_supply>; 227*b2d2a78aSEmmanuel Vadot refin-supply = <&supply_5V>; 228*b2d2a78aSEmmanuel Vadot com-supply = <&supply_2V5>; 229*b2d2a78aSEmmanuel Vadot in3-supply = <&supply_2V5>; 230*b2d2a78aSEmmanuel Vadot reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; 231*b2d2a78aSEmmanuel Vadot 232*b2d2a78aSEmmanuel Vadot #address-cells = <1>; 233*b2d2a78aSEmmanuel Vadot #size-cells = <0>; 234*b2d2a78aSEmmanuel Vadot 235*b2d2a78aSEmmanuel Vadot /* Pseudo-differential channel between IN0 and REFGND. */ 236*b2d2a78aSEmmanuel Vadot channel@0 { 237*b2d2a78aSEmmanuel Vadot reg = <0>; 238*b2d2a78aSEmmanuel Vadot }; 239*b2d2a78aSEmmanuel Vadot 240*b2d2a78aSEmmanuel Vadot /* Pseudo-differential channel between IN1 and COM. */ 241*b2d2a78aSEmmanuel Vadot channel@1 { 242*b2d2a78aSEmmanuel Vadot reg = <1>; 243*b2d2a78aSEmmanuel Vadot common-mode-channel = <AD4695_COMMON_MODE_COM>; 244*b2d2a78aSEmmanuel Vadot bipolar; 245*b2d2a78aSEmmanuel Vadot }; 246*b2d2a78aSEmmanuel Vadot 247*b2d2a78aSEmmanuel Vadot /* Pseudo-differential channel between IN2 and IN3. */ 248*b2d2a78aSEmmanuel Vadot channel@2 { 249*b2d2a78aSEmmanuel Vadot reg = <2>; 250*b2d2a78aSEmmanuel Vadot common-mode-channel = <3>; 251*b2d2a78aSEmmanuel Vadot bipolar; 252*b2d2a78aSEmmanuel Vadot }; 253*b2d2a78aSEmmanuel Vadot }; 254*b2d2a78aSEmmanuel Vadot }; 255