[PATCH 17/18] dt-bindings: iio: adc: ad4170-4: Add AD4171-8, AD4190-8 and AD4195-8
From: Janani Sunil
Date: Thu Dec 03 2026 - 10:21:37 EST
The AD4171-8, AD4190-8, and AD4195-8 double the analog front end of the
four differential input devices. They have 16 analog input pins, AIN0 to
AIN15, plus a dedicated AINCOM pin, which CHANNEL_MAPn AINP_N/AINM_N
decodes as codes 01001 to 01111 and 10000. Those codes are reserved on
the four input devices, and V_BIAS and CURRENT_SOURCEn I_OUT_PIN follow
the same pattern.
The common diff-channels, single-channel and common-mode-channel
constraints list the valid inputs of the four differential input
devices, leaving out AIN9 to AIN15 and AINCOM, and the excitation pin
constraints likewise leave out AIN9 to AIN15. Relax them to the full mux
input and I_OUT_PIN ranges and move the four input restrictions into a
conditional on those compatibles.
The AD4190-8 and AD4195-8 share the AD4190-4 feature set, while the
AD4171-8 keeps that of the AD4170-4: an integrated DAC routed to mux
input 20, XTAL1 and XTAL2 pins, and four excitation current sources.
The new devices have sixteen analog inputs and an AINCOM pin instead of
nine analog inputs, which requires distinct chip configuration in the
driver, precluding a fallback to the four differential input devices.
The AD4195-8 only differs from the AD4190-8 in its guaranteed
specifications, but it gets its own compatible to match the AD4195-4,
which has no fallback to the AD4190-4 either.
Signed-off-by: Janani Sunil <janani.sunil@xxxxxxxxxx>
---
.../devicetree/bindings/iio/adc/adi,ad4170-4.yaml | 124 ++++++++++++++++-----
1 file changed, 97 insertions(+), 27 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
index 4d2d69c5bb9a..d6ffe2a544fc 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml
@@ -13,8 +13,11 @@ description: |
Analog Devices AD4170-4 series of Sigma-delta Analog to Digital Converters.
Specifications can be found at:
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4170-4.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad4171-8.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4190-4.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4195-4.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad4190-8.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad4195-8.pdf
$ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -39,8 +42,11 @@ properties:
compatible:
enum:
- adi,ad4170-4
+ - adi,ad4171-8
- adi,ad4190-4
+ - adi,ad4190-8
- adi,ad4195-4
+ - adi,ad4195-8
avss-supply:
description:
@@ -128,20 +134,23 @@ properties:
description: Analog inputs to apply a voltage bias of (AVDD + AVSS) / 2 to.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
- maxItems: 9
+ maxItems: 16
items:
minimum: 0
- maximum: 8
+ maximum: 15
allOf:
- # Only AD4170-4 has an integrated DAC. On the other devices, the DAC output is
- # not routed to the multiplexer either, making mux input number 20 reserved.
+ # Only AD4170-4 and AD4171-8 have an integrated DAC. On the other devices, the
+ # DAC output is not routed to the multiplexer either, making mux input number
+ # 20 reserved.
- if:
properties:
compatible:
not:
contains:
- const: adi,ad4170-4
+ enum:
+ - adi,ad4170-4
+ - adi,ad4171-8
then:
properties:
ldac-gpios: false
@@ -162,26 +171,31 @@ allOf:
- maximum: 19
- minimum: 21
- # Only AD4170-4 can be clocked by an external crystal. The other devices
- # have no XTAL1 and XTAL2 pins.
+ # Only AD4170-4 and AD4171-8 can be clocked by an external crystal. The other
+ # devices have no XTAL1 and XTAL2 pins.
- if:
properties:
compatible:
not:
contains:
- const: adi,ad4170-4
+ enum:
+ - adi,ad4170-4
+ - adi,ad4171-8
then:
properties:
clock-names:
const: ext-clk
- # AD4170-4 has four excitation current sources. The other devices have two.
+ # AD4170-4 and AD4171-8 have four excitation current sources. The other
+ # devices have two.
- if:
properties:
compatible:
not:
contains:
- const: adi,ad4170-4
+ enum:
+ - adi,ad4170-4
+ - adi,ad4171-8
then:
patternProperties:
"^channel@[0-9a-f]$":
@@ -191,15 +205,18 @@ allOf:
adi,excitation-current-2-microamp: false
adi,excitation-current-3-microamp: false
- # Only AD4170-4 can AC excite a bridge with its GPIO outputs. On the other
- # devices, an AC excited bridge needs chopped excitation currents on IOUT0
- # and IOUT1, which must be nonzero. The driver also requires them to be equal.
+ # Only AD4170-4 and AD4171-8 can AC excite a bridge with their GPIO outputs.
+ # On the other devices, an AC excited bridge needs chopped excitation currents
+ # on IOUT0 and IOUT1, which must be nonzero. The driver also requires them to
+ # be equal.
- if:
properties:
compatible:
not:
contains:
- const: adi,ad4170-4
+ enum:
+ - adi,ad4170-4
+ - adi,ad4171-8
then:
patternProperties:
"^channel@[0-9a-f]$":
@@ -223,6 +240,52 @@ allOf:
adi,excitation-current-1-microamp:
minimum: 1
+ # Devices with four differential inputs have analog input pins AIN0 to AIN8
+ # only. They have neither AIN9 to AIN15 nor an AINCOM pin.
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad4170-4
+ - adi,ad4190-4
+ - adi,ad4195-4
+ then:
+ properties:
+ adi,vbias-pins:
+ maxItems: 9
+ items:
+ maximum: 8
+ patternProperties:
+ "^channel@[0-9a-f]$":
+ properties:
+ diff-channels:
+ items:
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29]
+ single-channel:
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29]
+ common-mode-channel:
+ enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29]
+ adi,excitation-pin-0:
+ anyOf:
+ - maximum: 8
+ - minimum: 17
+ adi,excitation-pin-1:
+ anyOf:
+ - maximum: 8
+ - minimum: 17
+ adi,excitation-pin-2:
+ anyOf:
+ - maximum: 8
+ - minimum: 17
+ adi,excitation-pin-3:
+ anyOf:
+ - maximum: 8
+ - minimum: 17
+
# Require to specify the interrupt pin when using interrupts
- if:
required:
@@ -270,12 +333,15 @@ patternProperties:
voltage channel. The first value is the positive input and the second
value is the negative input of the channel.
- Besides the analog input pins AIN0 to AIN8, there are special inputs
- that can be selected with the following values:
+ The analog input pins are AIN0 to AIN8 on AD4170-4, AD4190-4, and
+ AD4195-4, selected with values 0 to 8. AD4171-8, AD4190-8, and
+ AD4195-8 have AIN0 to AIN15 plus an AINCOM pin, selected with values
+ 0 to 15 and 16, respectively. Besides the analog input pins, there
+ are special inputs that can be selected with the following values:
17: Internal temperature sensor
18: (AVDD-AVSS)/5
19: (IOVDD-DGND)/5
- 20: DAC output (AD4170-4 only)
+ 20: DAC output (devices with an integrated DAC only)
21: ALDO
22: DLDO
23: AVSS
@@ -288,22 +354,22 @@ patternProperties:
For the internal temperature sensor, use the input number for both
inputs (i.e. diff-channels = <17 17>).
items:
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29]
+ minimum: 0
+ maximum: 29
single-channel:
description:
Positive input of a pseudo-differential channel. Uses the same input
numbers as diff-channels.
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29]
+ minimum: 0
+ maximum: 29
common-mode-channel:
description:
Negative input of a pseudo-differential channel. Uses the same input
numbers as diff-channels.
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29]
+ minimum: 0
+ maximum: 29
adi,reference-select:
description: |
@@ -345,7 +411,8 @@ patternProperties:
Analog input to apply excitation current to while the channel
is active.
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20]
+ minimum: 0
+ maximum: 20
default: 0
adi,excitation-pin-1:
@@ -353,7 +420,8 @@ patternProperties:
Analog input to apply excitation current to while the channel
is active.
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20]
+ minimum: 0
+ maximum: 20
default: 0
adi,excitation-pin-2:
@@ -361,7 +429,8 @@ patternProperties:
Analog input to apply excitation current to while the channel
is active.
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20]
+ minimum: 0
+ maximum: 20
default: 0
adi,excitation-pin-3:
@@ -369,7 +438,8 @@ patternProperties:
Analog input to apply excitation current to while the channel
is active.
$ref: /schemas/types.yaml#/definitions/uint32
- enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20]
+ minimum: 0
+ maximum: 20
default: 0
adi,excitation-current-0-microamp:
--
2.43.0