@@ -19,7 +19,18 @@ description: |
1919 primarily for measurement of signals close to DC but also delivers
2020 outstanding performance with input bandwidths out to ~10kHz.
2121
22+ Analog Devices AD411x ADC's:
23+ The AD411X family encompasses a series of low power, low noise, 24-bit,
24+ sigma-delta analog-to-digital converters that offer a versatile range of
25+ specifications. They integrate an analog front end suitable for processing
26+ fully differential/single-ended and bipolar voltage inputs.
27+
2228 Datasheets for supported chips:
29+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
30+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
31+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
32+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
33+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
2334 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf
2435 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf
2536 https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf
@@ -31,6 +42,11 @@ description: |
3142properties :
3243 compatible :
3344 enum :
45+ - adi,ad4111
46+ - adi,ad4112
47+ - adi,ad4114
48+ - adi,ad4115
49+ - adi,ad4116
3450 - adi,ad7172-2
3551 - adi,ad7172-4
3652 - adi,ad7173-8
@@ -129,10 +145,56 @@ patternProperties:
129145 maximum : 15
130146
131147 diff-channels :
148+ description : |
149+ This property is used for defining the inputs of a differential
150+ voltage channel. The first value is the positive input and the second
151+ value is the negative input of the channel.
152+
153+ Family AD411x supports a dedicated VINCOM voltage input.
154+ To select it set the second channel to 16.
155+ (VIN2, VINCOM) -> diff-channels = <2 16>
156+
157+ There are special values that can be selected besides the voltage
158+ analog inputs:
159+ 21: REF+
160+ 22: REF−
161+
162+ Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8, AD7177-2,
163+ must be paired together and can be used to monitor the power supply
164+ of the ADC:
165+ 19: ((AVDD1 − AVSS)/5)+
166+ 20: ((AVDD1 − AVSS)/5)−
167+
132168 items :
133169 minimum : 0
134170 maximum : 31
135171
172+ single-channel :
173+ description : |
174+ This property is used for defining a current channel or the positive
175+ input of a voltage channel (single-ended or pseudo-differential).
176+
177+ Models AD4111 and AD4112 support current channels.
178+ Example: (IIN2+, IIN2−) -> single-channel = <2>
179+ To correctly configure a current channel set the "adi,current-channel"
180+ property to true.
181+
182+ To configure a single-ended/pseudo-differential channel set the
183+ "common-mode-channel" property to the desired negative voltage input.
184+
185+ When used as a voltage channel, special inputs are valid as well.
186+ minimum : 0
187+ maximum : 31
188+
189+ common-mode-channel :
190+ description :
191+ This property is used for defining the negative input of a
192+ single-ended or pseudo-differential voltage channel.
193+
194+ Special inputs are valid as well.
195+ minimum : 0
196+ maximum : 31
197+
136198 adi,reference-select :
137199 description : |
138200 Select the reference source to use when converting on
@@ -154,9 +216,31 @@ patternProperties:
154216 - avdd
155217 default : refout-avss
156218
219+ adi,current-channel :
220+ $ref : /schemas/types.yaml#/definitions/flag
221+ description : |
222+ Signal that the selected inputs are current channels.
223+ Only available on AD4111 and AD4112.
224+
157225 required :
158226 - reg
159- - diff-channels
227+
228+ allOf :
229+ - oneOf :
230+ - required : [single-channel]
231+ properties :
232+ diff-channels : false
233+ - required : [diff-channels]
234+ properties :
235+ single-channel : false
236+ adi,current-channel : false
237+ common-mode-channel : false
238+
239+ - if :
240+ required : [common-mode-channel]
241+ then :
242+ properties :
243+ adi,current-channel : false
160244
161245required :
162246 - compatible
@@ -166,7 +250,6 @@ allOf:
166250 - $ref : /schemas/spi/spi-peripheral-props.yaml#
167251
168252 # Only ad7172-4, ad7173-8 and ad7175-8 support vref2
169- # Other models have [0-3] channel registers
170253 - if :
171254 properties :
172255 compatible :
@@ -187,6 +270,37 @@ allOf:
187270 - vref
188271 - refout-avss
189272 - avdd
273+
274+ - if :
275+ properties :
276+ compatible :
277+ contains :
278+ enum :
279+ - adi,ad4114
280+ - adi,ad4115
281+ - adi,ad4116
282+ - adi,ad7173-8
283+ - adi,ad7175-8
284+ then :
285+ patternProperties :
286+ " ^channel@[0-9a-f]$ " :
287+ properties :
288+ reg :
289+ maximum : 15
290+
291+ - if :
292+ properties :
293+ compatible :
294+ contains :
295+ enum :
296+ - adi,ad7172-2
297+ - adi,ad7175-2
298+ - adi,ad7176-2
299+ - adi,ad7177-2
300+ then :
301+ patternProperties :
302+ " ^channel@[0-9a-f]$ " :
303+ properties :
190304 reg :
191305 maximum : 3
192306
@@ -210,6 +324,34 @@ allOf:
210324 required :
211325 - adi,reference-select
212326
327+ - if :
328+ properties :
329+ compatible :
330+ contains :
331+ enum :
332+ - adi,ad4111
333+ - adi,ad4112
334+ - adi,ad4114
335+ - adi,ad4115
336+ - adi,ad4116
337+ then :
338+ properties :
339+ avdd2-supply : false
340+
341+ - if :
342+ properties :
343+ compatible :
344+ not :
345+ contains :
346+ enum :
347+ - adi,ad4111
348+ - adi,ad4112
349+ then :
350+ patternProperties :
351+ " ^channel@[0-9a-f]$ " :
352+ properties :
353+ adi,current-channel : false
354+
213355 - if :
214356 anyOf :
215357 - required : [clock-names]
@@ -221,6 +363,7 @@ allOf:
221363unevaluatedProperties : false
222364
223365examples :
366+ # Example AD7173-8 with external reference connected to REF+/REF-:
224367 - |
225368 #include <dt-bindings/gpio/gpio.h>
226369 #include <dt-bindings/interrupt-controller/irq.h>
@@ -277,3 +420,50 @@ examples:
277420 };
278421 };
279422 };
423+
424+ # Example AD4111 with current channel and single-ended channel:
425+ - |
426+ #include <dt-bindings/gpio/gpio.h>
427+ #include <dt-bindings/interrupt-controller/irq.h>
428+
429+ spi {
430+ #address-cells = <1>;
431+ #size-cells = <0>;
432+
433+ adc@0 {
434+ compatible = "adi,ad4111";
435+ reg = <0>;
436+
437+ #address-cells = <1>;
438+ #size-cells = <0>;
439+
440+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
441+ interrupt-names = "rdy";
442+ interrupt-parent = <&gpio>;
443+ spi-max-frequency = <5000000>;
444+ gpio-controller;
445+ #gpio-cells = <2>;
446+ #clock-cells = <0>;
447+
448+ channel@0 {
449+ reg = <0>;
450+ bipolar;
451+ diff-channels = <4 5>;
452+ };
453+
454+ // Single ended channel VIN2/VINCOM
455+ channel@1 {
456+ reg = <1>;
457+ bipolar;
458+ single-channel = <2>;
459+ common-mode-channel = <16>;
460+ };
461+
462+ // Current channel IN2+/IN2-
463+ channel@2 {
464+ reg = <2>;
465+ single-channel = <2>;
466+ adi,current-channel;
467+ };
468+ };
469+ };
0 commit comments