1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*8bab661aSEmmanuel Vadot# Copyright 2022 Analog Devices Inc. 3*8bab661aSEmmanuel Vadot%YAML 1.2 4*8bab661aSEmmanuel Vadot--- 5*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/adi,ad4130.yaml# 6*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7*8bab661aSEmmanuel Vadot 8*8bab661aSEmmanuel Vadottitle: Analog Devices AD4130 ADC device driver 9*8bab661aSEmmanuel Vadot 10*8bab661aSEmmanuel Vadotmaintainers: 11*8bab661aSEmmanuel Vadot - Cosmin Tanislav <cosmin.tanislav@analog.com> 12*8bab661aSEmmanuel Vadot 13*8bab661aSEmmanuel Vadotdescription: | 14*8bab661aSEmmanuel Vadot Bindings for the Analog Devices AD4130 ADC. Datasheet can be found here: 15*8bab661aSEmmanuel Vadot https://www.analog.com/media/en/technical-documentation/data-sheets/AD4130-8.pdf 16*8bab661aSEmmanuel Vadot 17*8bab661aSEmmanuel Vadotproperties: 18*8bab661aSEmmanuel Vadot compatible: 19*8bab661aSEmmanuel Vadot enum: 20*8bab661aSEmmanuel Vadot - adi,ad4130 21*8bab661aSEmmanuel Vadot 22*8bab661aSEmmanuel Vadot reg: 23*8bab661aSEmmanuel Vadot maxItems: 1 24*8bab661aSEmmanuel Vadot 25*8bab661aSEmmanuel Vadot clocks: 26*8bab661aSEmmanuel Vadot maxItems: 1 27*8bab661aSEmmanuel Vadot description: phandle to the master clock (mclk) 28*8bab661aSEmmanuel Vadot 29*8bab661aSEmmanuel Vadot clock-names: 30*8bab661aSEmmanuel Vadot items: 31*8bab661aSEmmanuel Vadot - const: mclk 32*8bab661aSEmmanuel Vadot 33*8bab661aSEmmanuel Vadot interrupts: 34*8bab661aSEmmanuel Vadot maxItems: 1 35*8bab661aSEmmanuel Vadot 36*8bab661aSEmmanuel Vadot interrupt-names: 37*8bab661aSEmmanuel Vadot description: | 38*8bab661aSEmmanuel Vadot Specify which interrupt pin should be configured as Data Ready / FIFO 39*8bab661aSEmmanuel Vadot interrupt. 40*8bab661aSEmmanuel Vadot Default if not supplied is int. 41*8bab661aSEmmanuel Vadot enum: 42*8bab661aSEmmanuel Vadot - int 43*8bab661aSEmmanuel Vadot - clk 44*8bab661aSEmmanuel Vadot - p2 45*8bab661aSEmmanuel Vadot - dout 46*8bab661aSEmmanuel Vadot 47*8bab661aSEmmanuel Vadot '#address-cells': 48*8bab661aSEmmanuel Vadot const: 1 49*8bab661aSEmmanuel Vadot 50*8bab661aSEmmanuel Vadot '#size-cells': 51*8bab661aSEmmanuel Vadot const: 0 52*8bab661aSEmmanuel Vadot 53*8bab661aSEmmanuel Vadot '#clock-cells': 54*8bab661aSEmmanuel Vadot const: 0 55*8bab661aSEmmanuel Vadot 56*8bab661aSEmmanuel Vadot clock-output-names: 57*8bab661aSEmmanuel Vadot maxItems: 1 58*8bab661aSEmmanuel Vadot 59*8bab661aSEmmanuel Vadot refin1-supply: 60*8bab661aSEmmanuel Vadot description: refin1 supply. Can be used as reference for conversion. 61*8bab661aSEmmanuel Vadot 62*8bab661aSEmmanuel Vadot refin2-supply: 63*8bab661aSEmmanuel Vadot description: refin2 supply. Can be used as reference for conversion. 64*8bab661aSEmmanuel Vadot 65*8bab661aSEmmanuel Vadot avdd-supply: 66*8bab661aSEmmanuel Vadot description: AVDD voltage supply. Can be used as reference for conversion. 67*8bab661aSEmmanuel Vadot 68*8bab661aSEmmanuel Vadot iovdd-supply: 69*8bab661aSEmmanuel Vadot description: IOVDD voltage supply. Used for the chip interface. 70*8bab661aSEmmanuel Vadot 71*8bab661aSEmmanuel Vadot spi-max-frequency: 72*8bab661aSEmmanuel Vadot maximum: 5000000 73*8bab661aSEmmanuel Vadot 74*8bab661aSEmmanuel Vadot adi,ext-clk-freq-hz: 75*8bab661aSEmmanuel Vadot description: Specify the frequency of the external clock. 76*8bab661aSEmmanuel Vadot enum: [76800, 153600] 77*8bab661aSEmmanuel Vadot default: 76800 78*8bab661aSEmmanuel Vadot 79*8bab661aSEmmanuel Vadot adi,bipolar: 80*8bab661aSEmmanuel Vadot description: Specify if the device should be used in bipolar mode. 81*8bab661aSEmmanuel Vadot type: boolean 82*8bab661aSEmmanuel Vadot 83*8bab661aSEmmanuel Vadot adi,vbias-pins: 84*8bab661aSEmmanuel Vadot description: Analog inputs to apply a voltage bias of (AVDD − AVSS) / 2 to. 85*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 86*8bab661aSEmmanuel Vadot minItems: 1 87*8bab661aSEmmanuel Vadot maxItems: 16 88*8bab661aSEmmanuel Vadot items: 89*8bab661aSEmmanuel Vadot minimum: 0 90*8bab661aSEmmanuel Vadot maximum: 15 91*8bab661aSEmmanuel Vadot 92*8bab661aSEmmanuel Vadotrequired: 93*8bab661aSEmmanuel Vadot - compatible 94*8bab661aSEmmanuel Vadot - reg 95*8bab661aSEmmanuel Vadot - interrupts 96*8bab661aSEmmanuel Vadot 97*8bab661aSEmmanuel VadotpatternProperties: 98*8bab661aSEmmanuel Vadot "^channel@([0-9a-f])$": 99*8bab661aSEmmanuel Vadot type: object 100*8bab661aSEmmanuel Vadot $ref: adc.yaml 101*8bab661aSEmmanuel Vadot unevaluatedProperties: false 102*8bab661aSEmmanuel Vadot 103*8bab661aSEmmanuel Vadot properties: 104*8bab661aSEmmanuel Vadot reg: 105*8bab661aSEmmanuel Vadot description: The channel number. 106*8bab661aSEmmanuel Vadot minimum: 0 107*8bab661aSEmmanuel Vadot maximum: 15 108*8bab661aSEmmanuel Vadot 109*8bab661aSEmmanuel Vadot diff-channels: 110*8bab661aSEmmanuel Vadot description: | 111*8bab661aSEmmanuel Vadot Besides the analog inputs available, internal inputs can be used. 112*8bab661aSEmmanuel Vadot 16: Internal temperature sensor. 113*8bab661aSEmmanuel Vadot 17: AVSS 114*8bab661aSEmmanuel Vadot 18: Internal reference 115*8bab661aSEmmanuel Vadot 19: DGND 116*8bab661aSEmmanuel Vadot 20: (AVDD − AVSS)/6+ 117*8bab661aSEmmanuel Vadot 21: (AVDD − AVSS)/6- 118*8bab661aSEmmanuel Vadot 22: (IOVDD − DGND)/6+ 119*8bab661aSEmmanuel Vadot 23: (IOVDD − DGND)/6- 120*8bab661aSEmmanuel Vadot 24: (ALDO − AVSS)/6+ 121*8bab661aSEmmanuel Vadot 25: (ALDO − AVSS)/6- 122*8bab661aSEmmanuel Vadot 26: (DLDO − DGND)/6+ 123*8bab661aSEmmanuel Vadot 27: (DLDO − DGND)/6- 124*8bab661aSEmmanuel Vadot 28: V_MV_P 125*8bab661aSEmmanuel Vadot 29: V_MV_M 126*8bab661aSEmmanuel Vadot items: 127*8bab661aSEmmanuel Vadot minimum: 0 128*8bab661aSEmmanuel Vadot maximum: 29 129*8bab661aSEmmanuel Vadot 130*8bab661aSEmmanuel Vadot adi,reference-select: 131*8bab661aSEmmanuel Vadot description: | 132*8bab661aSEmmanuel Vadot Select the reference source to use when converting on the 133*8bab661aSEmmanuel Vadot specific channel. Valid values are: 134*8bab661aSEmmanuel Vadot 0: REFIN1(+)/REFIN1(−) 135*8bab661aSEmmanuel Vadot 1: REFIN2(+)/REFIN2(−) 136*8bab661aSEmmanuel Vadot 2: REFOUT/AVSS (Internal reference) 137*8bab661aSEmmanuel Vadot 3: AVDD/AVSS 138*8bab661aSEmmanuel Vadot If not specified, REFIN1 is used. 139*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 140*8bab661aSEmmanuel Vadot enum: [0, 1, 2, 3] 141*8bab661aSEmmanuel Vadot default: 0 142*8bab661aSEmmanuel Vadot 143*8bab661aSEmmanuel Vadot adi,excitation-pin-0: 144*8bab661aSEmmanuel Vadot description: | 145*8bab661aSEmmanuel Vadot Analog input to apply excitation current to while the channel 146*8bab661aSEmmanuel Vadot is active. 147*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 148*8bab661aSEmmanuel Vadot minimum: 0 149*8bab661aSEmmanuel Vadot maximum: 15 150*8bab661aSEmmanuel Vadot default: 0 151*8bab661aSEmmanuel Vadot 152*8bab661aSEmmanuel Vadot adi,excitation-pin-1: 153*8bab661aSEmmanuel Vadot description: | 154*8bab661aSEmmanuel Vadot Analog input to apply excitation current to while this channel 155*8bab661aSEmmanuel Vadot is active. 156*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 157*8bab661aSEmmanuel Vadot minimum: 0 158*8bab661aSEmmanuel Vadot maximum: 15 159*8bab661aSEmmanuel Vadot default: 0 160*8bab661aSEmmanuel Vadot 161*8bab661aSEmmanuel Vadot adi,excitation-current-0-nanoamp: 162*8bab661aSEmmanuel Vadot description: | 163*8bab661aSEmmanuel Vadot Excitation current in nanoamps to be applied to pin specified in 164*8bab661aSEmmanuel Vadot adi,excitation-pin-0 while this channel is active. 165*8bab661aSEmmanuel Vadot enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000] 166*8bab661aSEmmanuel Vadot default: 0 167*8bab661aSEmmanuel Vadot 168*8bab661aSEmmanuel Vadot adi,excitation-current-1-nanoamp: 169*8bab661aSEmmanuel Vadot description: | 170*8bab661aSEmmanuel Vadot Excitation current in nanoamps to be applied to pin specified in 171*8bab661aSEmmanuel Vadot adi,excitation-pin-1 while this channel is active. 172*8bab661aSEmmanuel Vadot enum: [0, 100, 10000, 20000, 50000, 100000, 150000, 200000] 173*8bab661aSEmmanuel Vadot default: 0 174*8bab661aSEmmanuel Vadot 175*8bab661aSEmmanuel Vadot adi,burnout-current-nanoamp: 176*8bab661aSEmmanuel Vadot description: | 177*8bab661aSEmmanuel Vadot Burnout current in nanoamps to be applied for this channel. 178*8bab661aSEmmanuel Vadot enum: [0, 500, 2000, 4000] 179*8bab661aSEmmanuel Vadot default: 0 180*8bab661aSEmmanuel Vadot 181*8bab661aSEmmanuel Vadot adi,buffered-positive: 182*8bab661aSEmmanuel Vadot description: Enable buffered mode for positive input. 183*8bab661aSEmmanuel Vadot type: boolean 184*8bab661aSEmmanuel Vadot 185*8bab661aSEmmanuel Vadot adi,buffered-negative: 186*8bab661aSEmmanuel Vadot description: Enable buffered mode for negative input. 187*8bab661aSEmmanuel Vadot type: boolean 188*8bab661aSEmmanuel Vadot 189*8bab661aSEmmanuel Vadot required: 190*8bab661aSEmmanuel Vadot - reg 191*8bab661aSEmmanuel Vadot - diff-channels 192*8bab661aSEmmanuel Vadot 193*8bab661aSEmmanuel VadotallOf: 194*8bab661aSEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 195*8bab661aSEmmanuel Vadot 196*8bab661aSEmmanuel VadotunevaluatedProperties: false 197*8bab661aSEmmanuel Vadot 198*8bab661aSEmmanuel Vadotexamples: 199*8bab661aSEmmanuel Vadot - | 200*8bab661aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 201*8bab661aSEmmanuel Vadot 202*8bab661aSEmmanuel Vadot spi { 203*8bab661aSEmmanuel Vadot #address-cells = <1>; 204*8bab661aSEmmanuel Vadot #size-cells = <0>; 205*8bab661aSEmmanuel Vadot 206*8bab661aSEmmanuel Vadot adc@0 { 207*8bab661aSEmmanuel Vadot compatible = "adi,ad4130"; 208*8bab661aSEmmanuel Vadot reg = <0>; 209*8bab661aSEmmanuel Vadot 210*8bab661aSEmmanuel Vadot #address-cells = <1>; 211*8bab661aSEmmanuel Vadot #size-cells = <0>; 212*8bab661aSEmmanuel Vadot 213*8bab661aSEmmanuel Vadot spi-max-frequency = <5000000>; 214*8bab661aSEmmanuel Vadot interrupts = <27 IRQ_TYPE_EDGE_FALLING>; 215*8bab661aSEmmanuel Vadot interrupt-parent = <&gpio>; 216*8bab661aSEmmanuel Vadot 217*8bab661aSEmmanuel Vadot channel@0 { 218*8bab661aSEmmanuel Vadot reg = <0>; 219*8bab661aSEmmanuel Vadot 220*8bab661aSEmmanuel Vadot adi,reference-select = <2>; 221*8bab661aSEmmanuel Vadot 222*8bab661aSEmmanuel Vadot /* AIN8, AIN9 */ 223*8bab661aSEmmanuel Vadot diff-channels = <8 9>; 224*8bab661aSEmmanuel Vadot }; 225*8bab661aSEmmanuel Vadot 226*8bab661aSEmmanuel Vadot channel@1 { 227*8bab661aSEmmanuel Vadot reg = <1>; 228*8bab661aSEmmanuel Vadot 229*8bab661aSEmmanuel Vadot adi,reference-select = <2>; 230*8bab661aSEmmanuel Vadot 231*8bab661aSEmmanuel Vadot /* AIN10, AIN11 */ 232*8bab661aSEmmanuel Vadot diff-channels = <10 11>; 233*8bab661aSEmmanuel Vadot }; 234*8bab661aSEmmanuel Vadot 235*8bab661aSEmmanuel Vadot channel@2 { 236*8bab661aSEmmanuel Vadot reg = <2>; 237*8bab661aSEmmanuel Vadot 238*8bab661aSEmmanuel Vadot adi,reference-select = <2>; 239*8bab661aSEmmanuel Vadot 240*8bab661aSEmmanuel Vadot /* Temperature Sensor, DGND */ 241*8bab661aSEmmanuel Vadot diff-channels = <16 19>; 242*8bab661aSEmmanuel Vadot }; 243*8bab661aSEmmanuel Vadot 244*8bab661aSEmmanuel Vadot channel@3 { 245*8bab661aSEmmanuel Vadot reg = <3>; 246*8bab661aSEmmanuel Vadot 247*8bab661aSEmmanuel Vadot adi,reference-select = <2>; 248*8bab661aSEmmanuel Vadot 249*8bab661aSEmmanuel Vadot /* Internal reference, DGND */ 250*8bab661aSEmmanuel Vadot diff-channels = <18 19>; 251*8bab661aSEmmanuel Vadot }; 252*8bab661aSEmmanuel Vadot 253*8bab661aSEmmanuel Vadot channel@4 { 254*8bab661aSEmmanuel Vadot reg = <4>; 255*8bab661aSEmmanuel Vadot 256*8bab661aSEmmanuel Vadot adi,reference-select = <2>; 257*8bab661aSEmmanuel Vadot 258*8bab661aSEmmanuel Vadot /* DGND, DGND */ 259*8bab661aSEmmanuel Vadot diff-channels = <19 19>; 260*8bab661aSEmmanuel Vadot }; 261*8bab661aSEmmanuel Vadot }; 262*8bab661aSEmmanuel Vadot }; 263