Re: [PATCH v3 1/9] dt-bindings: iio: adc: support the TI ADS126x ADC family

David Lechner <[email protected]>
Newsgroups org.kernel.vger.linux-gpio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/9/26 3:26 AM, Kurt Borja wrote:
> On Sat Aug 8, 2026 at 1:38 PM -05, David Lechner wrote:
>> On 8/7/26 10:58 PM, Kurt Borja wrote:
>>> The ADS1262 and ADS1263 are 32-bit, 38.4-kSPS delta-sigma ADCs with an
>>> integrated PGA, internal reference, excitation and burn-out current
>>> sources for sensor biasing and diagnostics. The ADS1263 adds a second,
>>> 24-bit delta-sigma ADC (ADC2) for background measurements.
>>>
>>
>> ...
>>
>>> +patternProperties:
>>> +  "^ain([0-9]|com)-supply$":
>>> +    description:
>>> +      Common-mode voltage supply connected to AIN<N> or AINCOM.
>>> +
>>> +  "^refp[1-3]-supply$":
>>> +    description:
>>> +      Positive voltage reference connected to REFP1 (AIN0), REFP2 (AIN2) or
>>> +      REFP3 (AIN4). If not described, its assumed to be connected to ground
>>> +      (0V).
>>
>> Would we really have a case with a negative only reference? I would say if not
>> described, assume the pin is free for other use.
> 
> In bipolar supply configurations, I believe it would make sense to wire
> the negative reference to -2.5V and ground the positive. Also we have
> the ti,reference-reversal case, where you may wire the "negative"
> reference to say 2.5V and the positive to ground.
> 

OK. I guess the better wording for both of these would be that if any
channel references one of these in reference-sources and it is not present
assume it is connected to ground (0V).

>>
>>> +
>>> +  "^refn[1-3]-supply$":
>>> +    description:
>>> +      Negative voltage reference connected to REFN1 (AIN1), REFN2 (AIN3) or
>>> +      REFN3 (AIN5). If not described, its assumed to be connected to ground
>>> +      (0V).
>>
>> Assumption is only true when corresponding refp supply is described. Otherwise
>> we should assume the pin is free for other uses.
> 
> I'll clarify it.
> 
>>
>>> +
>>> +  "^ti,refp[1-3]-refn[1-3]-resistor-ohms$":
>>> +    description:
>>> +      Magnitude of the external reference resistor connected between REFP<N>
>>> +      and REFN<M>. In ratiometric configurations, such as RTD measurements, the
>>> +      IDAC excitation current returns through this resistor, generating the
>>> +      reference voltage for the conversion.
>>> +
>>> +  "^channel@[0-9]+$":
>>> +    $ref: /schemas/iio/adc/adc.yaml#
>>> +    unevaluatedProperties: false
>>> +
>>> +    properties:
>>> +      reg:
>>> +        maxItems: 1
>>> +
>>> +      single-channel:
>>> +        minimum: 0
>>> +        maximum: 10
>>> +
>>> +      common-mode-channel:
>>> +        minimum: 0
>>> +        maximum: 10
>>> +        default: 10
>>> +
>>> +      diff-channels:
>>> +        description: |
>>> +          In addition to the analog input pins 0 (AIN0) - 10 (AINCOM), there are
>>> +          special inputs that can be selected from the following values:
>>> +          11: Temperature sensor monitor
>>> +          12: Analog power supply monitor
>>> +          13: Digital power supply monitor
>>> +          14: TDAC test signal
>>
>> For reasons mentioned in the reply to the cover letter, I'm not a fan of the
>> monitor channels here.
>>
>>> +        items:
>>> +          minimum: 0
>>> +          maximum: 14
>>> +
>>
>> ...
>>
>>> +      input-chopping: true
>>> +
>>> +      ti,idac-rotation:
>>
>> Should we make this one a standard property like input-chopping?
> 
> Maybe excitation-current-chopping or excitation-channel-chopping?

I suppose. All of the TI literature seems to call it "rotation" rather
than "chopping", but I did find a few other sources that call it
"chopping" and that would be consistent with input-chopping.

I would go with excitation-channel-chopping since we are swapping
the current generators, not just the current magnitude.

> 
>>
>>> +        $ref: /schemas/types.yaml#/definitions/flag
>>> +        description:
>>> +          Automatically swap the IDAC1 and IDAC2 connections of alternate
>>> +          conversions. The ADC averages the alternate conversions to eliminate
>>> +          IDAC mismatch.
>>> +
>>
>> ...
>>
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/gpio/gpio.h>
>>> +    #include <dt-bindings/interrupt-controller/irq.h>
>>> +
>>> +    spi {
>>> +        #address-cells = <1>;
>>> +        #size-cells = <0>;
>>> +
>>> +        adc@0 {
>>> +            compatible = "ti,ads1262";
>>> +            reg = <0>;
>>> +            spi-max-frequency = <8000000>;
>>> +            spi-cpha;
>>> +            avdd-supply = <&avdd>;
>>> +            dvdd-supply = <&dvdd>;
>>> +            #address-cells = <1>;
>>> +            #size-cells = <0>;
>>> +
>>> +            interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_FALLING>;
>>> +            interrupt-names = "drdy";
>>> +
>>> +            /* Typical common mode voltage configuration */
>>> +            aincom-supply = <&ads1262_vbias>;
>>> +
>>> +            regulators {
>>> +                ads1262_vbias: vbias {
>>> +                    regulator-name = "vbias";
>>
>> The node name is already "vbias" so giving regulator-name is redundant.
> 
> Is it okay to leave it empty?
> 
>     ads1262_vbias: vbias { };
> 

Yes. (Unless make dt_binding_check says otherwise.)

>>
>>> +                };
>>> +            };
>>> +
>>> +            channel@0 {
>>> +                reg = <0>;
>>> +                single-channel = <0>;
>>> +                /* The VBIAS is enabled on pin 10 (AINCOM) */
>>> +                common-mode-channel = <10>;
>>> +            };
>>> +        };
>>> +    };
>>> +
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.