From: Conor Dooley <conor@kernel.org>
To: Janani Sunil <janani.sunil@analog.com>
Cc: "Marcelo Schmitt" <marcelo.schmitt@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Ana-Maria Cusco" <ana-maria.cusco@analog.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@analog.com, devicetree@vger.kernel.org,
"Janani Sunil" <jananisunil.dev@gmail.com>
Subject: Re: [PATCH 17/18] dt-bindings: iio: adc: ad4170-4: Add AD4171-8, AD4190-8 and AD4195-8
Date: Fri, 4 Dec 2026 17:41:24 +0000 [thread overview]
Message-ID: <20261204-tapping-same-ec1be55a21f4@spud> (raw)
In-Reply-To: <20261203-ad419x-release-v1-17-18578ab50524@analog.com>
[-- Attachment #1: Type: text/plain, Size: 11866 bytes --]
On Thu, Dec 03, 2026 at 04:19:57PM +0100, Janani Sunil wrote:
> 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.
I don't love this rationale, it sounds like "this old thing was not done
correctly, so don't do the correct thing now either".
Otherwise, this seems okay.
Conor.
>
> Signed-off-by: Janani Sunil <janani.sunil@analog.com>
> ---
> .../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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-12-04 17:41 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 15:19 [PATCH 00/18] iio: adc: ad4170-4: Fixes and AD4171-8/AD4190-8/AD4195-8 support Janani Sunil
2026-12-03 15:19 ` [PATCH 01/18] dt-bindings: iio: adc: ad4170-4: Restrict AD4170-4 only properties Janani Sunil
2026-12-04 17:46 ` Conor Dooley
2026-12-03 15:19 ` [PATCH 02/18] dt-bindings: iio: adc: ad4170-4: Restrict channel inputs to valid codes Janani Sunil
2026-12-04 17:44 ` Conor Dooley
2026-12-03 15:19 ` [PATCH 03/18] dt-bindings: iio: adc: ad4170-4: Allow running from the internal oscillator only Janani Sunil
2026-12-04 17:42 ` Conor Dooley
2026-12-03 15:19 ` [PATCH 04/18] dt-bindings: iio: adc: ad4170-4: Fix the voltage bias description Janani Sunil
2026-12-04 17:42 ` Conor Dooley
2026-12-03 15:19 ` [PATCH 05/18] iio: adc: ad4170-4: Fix out-of-bounds accesses to pins_fn[] Janani Sunil
2026-12-03 15:19 ` [PATCH 06/18] iio: adc: ad4170-4: Fix voltage bias programming Janani Sunil
2026-12-03 17:11 ` Andy Shevchenko
2026-12-03 15:19 ` [PATCH 07/18] iio: adc: ad4170-4: Fix overflow in sample rate fractional part Janani Sunil
2026-12-03 16:22 ` sashiko-bot
2026-12-03 17:13 ` Andy Shevchenko
2026-12-03 15:19 ` [PATCH 08/18] iio: adc: ad4170-4: Fix output data rate on AD4190-4 and AD4195-4 Janani Sunil
2026-12-03 16:40 ` sashiko-bot
2026-12-03 15:19 ` [PATCH 09/18] iio: adc: ad4170-4: Fix filter_fs adjustment on filter type change Janani Sunil
2026-12-03 15:19 ` [PATCH 10/18] iio: adc: ad4170-4: Fix lock order inversion with IIO direct mode Janani Sunil
2026-12-03 17:16 ` Andy Shevchenko
2026-12-03 15:19 ` [PATCH 11/18] iio: adc: ad4170-4: Fix sinc5 filter FILTER_FS range on AD4190-4 and AD4195-4 Janani Sunil
2026-12-03 17:03 ` sashiko-bot
2026-12-03 17:17 ` Andy Shevchenko
2026-12-03 15:19 ` [PATCH 12/18] iio: adc: ad4170-4: Do not drive XTAL2 when using the internal clock Janani Sunil
2026-12-03 15:19 ` [PATCH 13/18] iio: adc: ad4170-4: Restrict current sources and AC excitation to supported parts Janani Sunil
2026-12-03 15:19 ` [PATCH 14/18] iio: adc: ad4170-4: Require equal chopped excitation currents Janani Sunil
2026-12-03 15:19 ` [PATCH 15/18] iio: adc: ad4170-4: Fix channel count with 15 external channels Janani Sunil
2026-12-03 15:19 ` [PATCH 16/18] iio: adc: ad4170-4: Drop ad4170_iout_pin_tbl Janani Sunil
2026-12-03 17:21 ` Andy Shevchenko
2026-12-03 15:19 ` [PATCH 17/18] dt-bindings: iio: adc: ad4170-4: Add AD4171-8, AD4190-8 and AD4195-8 Janani Sunil
2026-12-03 18:02 ` sashiko-bot
2026-12-04 17:41 ` Conor Dooley [this message]
2026-12-03 15:19 ` [PATCH 18/18] iio: adc: ad4170-4: Add support for " Janani Sunil
2026-12-03 17:23 ` Andy Shevchenko
2026-12-03 17:18 ` [PATCH 00/18] iio: adc: ad4170-4: Fixes and AD4171-8/AD4190-8/AD4195-8 support Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204-tapping-same-ec1be55a21f4@spud \
--to=conor@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=ana-maria.cusco@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=janani.sunil@analog.com \
--cc=jananisunil.dev@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox