Re: [PATCH 1/2] dt-bindings: iio: adc: Add TI ADS1220

From: David Lechner

Date: Fri Jun 12 2026 - 13:09:44 EST


On 6/12/26 11:10 AM, David Lechner wrote:
> On 6/10/26 10:13 AM, Nguyen Minh Tien wrote:
>> The ADS1220 is a 24-bit, 2-kSPS, 4-channel delta-sigma ADC from Texas
>> Instruments with an SPI (mode 1) interface, a programmable gain amplifier,
>> an internal 2.048V reference and a dedicated DRDY data-ready output.
>>

...

>> +patternProperties:
>> + "^channel@[0-6]$":
>> + $ref: adc.yaml
>> + type: object
>> + description: Represents one ADC input configuration (channel).
>> +
>> + properties:
>> + reg:
>> + minimum: 0
>> + maximum: 6
>
> I would add a comment explaining that the limit here is arbitrary. Also wouldn't
> hurt to make it a bit bigger. Technically, someone could have every possible
> combination of all inputs (16 differential + 4 single-ended).

>From the dataheet, it looks like there are 12 possible valid
channel settings rather than 7.

>
>> +
>> + diff-channels:
>> + description:
>> + Differential input pair routable by the ADS1220 multiplexer.
>> + oneOf:
>> + - items: [const: 0, const: 1]
>> + - items: [const: 0, const: 2]
>> + - items: [const: 0, const: 3]
>> + - items: [const: 1, const: 2]
>> + - items: [const: 1, const: 3]
>> + - items: [const: 2, const: 3]
>> + - items: [const: 1, const: 0]
>> + - items: [const: 3, const: 2]
>
> Sometimes, the same channel may be used as both positive and negative
> for a diagnostic, so I would just allow any combination instead of
> listing specific combinations.
>
And now that I read the datasheet better, I guess this is fine.