From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796406090; b=3Sch8iNptnjSO46SxDWY/DoHAfsj7kKVnSpAtU6upK9JDPyBEoIdZ+Mqd7zmeJEMBAgE MEvJIzaweHzpP9auT/h/Y64teqR71JKkgg1DsxLOOA19VkS61dB8gYL6KJB/St7W4Npho znFOIlMAEbh8Y6mzEz7a/N6mUApEuhvgOZX5amKpC2G1ti2R1588ZtSalnyVwDVEVNNjm 1SPT8mCWtfM9vIxZ1hSHokHA4lsmX56qf82HHk+wJAkJ0vFzRW4pbN0rcshlUxeIjWWLE SJPuocd+KteSsBKxW7hma7tjGemAKyhhf7fkKZJwEJq0s2kggehlyZmKnbAuzyJXmoQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796406090; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=P5DlIZhVAUBgLtdg3oos3T4W36nl7iXCAk60XjXnerk=; b=SxZ2zWLAAbwIN4ZRB6a9iMOIPonjfQxdP9fhDZ/7+Uzja+poRCwtY2zYNJsIX1Se104V h2B0puUKcrMlfzcJ54rgkl9zgaIKVs26GYF1/CLTpq3wjk/d23aFb3sDqGjfmu2gjdgBd qaa+0tkByeQNFSOJHrQkX5R0U5QrH6m7XKFEFTytcahRNvEAgrTV3q6Alg9amVZCi/dnd h2bgR2sW3PYIfiRsDLADMECo3KHkzbURrnWy5Vt8WuKWzXtm5K34JN093p8z8dO1oUtHZ geDtAk9rVwuNvksBVeVsCxWGhKQwZfLZ5vrgNZa2ZU8klJfDQ3dsBpzC0u14HdPyDJw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VRjEDNE+; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43D21606A322; Fri, 4 Dec 2026 17:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VRjEDNE+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCF2D1F00A07; Fri, 4 Dec 2026 17:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796406089; bh=P5DlIZhVAUBgLtdg3oos3T4W36nl7iXCAk60XjXnerk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=VRjEDNE+uU9/az0tbKkrp4BjfFXAuuj6xYP7BG2hTztNgOaZY5KB06jwyJjqa8s29 6ra52giX+zEVNp+t75t8NZHWUve892PzrZb8X3nRdPOUVxOFP23GYJz0qNElPegbbI gs5xwlW00yYH8S0JaXnKew9tYFBubQpd7eq4WK31xmrnUfCKUzJ1IC96uLqSDtBIHq 49lKIt4/ibXgS8qirxl4a8iwvURuSmo6BZELJ3TutOdBjim1+woXWGJTjZgQ31hWC/ ZUjBjHOS7taRP0kSHd0T97L10BrnbB3Al45hR4pAzLWlUPGKnp0kxPrqLxWhrg1Weq UY8cQ9cRRy56A== Date: Fri, 4 Dec 2026 17:41:24 +0000 From: Conor Dooley To: Janani Sunil Cc: Marcelo Schmitt , Nuno =?iso-8859-1?Q?S=E1?= , Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ana-Maria Cusco , Conor Dooley , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux@analog.com, devicetree@vger.kernel.org, Janani Sunil Subject: Re: [PATCH 17/18] dt-bindings: iio: adc: ad4170-4: Add AD4171-8, AD4190-8 and AD4195-8 Message-ID: <20261204-tapping-same-ec1be55a21f4@spud> References: <20261203-ad419x-release-v1-0-18578ab50524@analog.com> <20261203-ad419x-release-v1-17-18578ab50524@analog.com> X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G0b79Dsxu0UnFmH2" Content-Disposition: inline In-Reply-To: <20261203-ad419x-release-v1-17-18578ab50524@analog.com> --G0b79Dsxu0UnFmH2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Janani Sunil > --- > .../devicetree/bindings/iio/adc/adi,ad4170-4.yaml | 124 +++++++++++++++= +----- > 1 file changed, 97 insertions(+), 27 deletions(-) >=20 > 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 Conver= ters. > 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 > =20 > $ref: /schemas/spi/spi-peripheral-props.yaml# > =20 > @@ -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 > =20 > 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 > =20 > allOf: > - # Only AD4170-4 has an integrated DAC. On the other devices, the DAC o= utput is > - # not routed to the multiplexer either, making mux input number 20 res= erved. > + # Only AD4170-4 and AD4171-8 have an integrated DAC. On the other devi= ces, 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 > =20 > - # Only AD4170-4 can be clocked by an external crystal. The other devic= es > - # have no XTAL1 and XTAL2 pins. > + # Only AD4170-4 and AD4171-8 can be clocked by an external crystal. Th= e 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 > =20 > - # 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 > =20 > - # Only AD4170-4 can AC excite a bridge with its GPIO outputs. On the o= ther > - # devices, an AC excited bridge needs chopped excitation currents on I= OUT0 > - # and IOUT1, which must be nonzero. The driver also requires them to b= e equal. > + # Only AD4170-4 and AD4171-8 can AC excite a bridge with their GPIO ou= tputs. > + # 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 > =20 > + # 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. > =20 > - 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, t= here > + are special inputs that can be selected with the following val= ues: > 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 =3D <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 > =20 > 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 > =20 > 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 > =20 > 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 > =20 > 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 > =20 > 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 > =20 > 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 > =20 > adi,excitation-current-0-microamp: >=20 > --=20 > 2.43.0 >=20 --G0b79Dsxu0UnFmH2 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaxL7RAAKCRB4tDGHoIJi 0jHcAP9jXcT+wNQi/s4U6LhnWARSczkCMTNAlIxT9N25ER0wuQEA7Ugqxbz5CxTd hRel7WR5FIXzXwvZCRlaDxyfT2ok5gU= =Rnl1 -----END PGP SIGNATURE----- --G0b79Dsxu0UnFmH2--