Re: [PATCH v5 1/2] dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04

Kyle Hsieh <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <CAF7HswMiAA454Y1eFA2O1DtGjg-SQXUwLimaM9tVkjkDJSJSuw@mail.gmail.com>
On Fri, Aug 14, 2026 at 12:57 AM Rob Herring <[email protected]> wrote:
>
> On Thu, Aug 13, 2026 at 11:06:02AM +0800, Kyle Hsieh wrote:
> > Add device tree binding documentation for Texas Instruments ADS112C04
> > I2C Analog-to-Digital Converters.
> >
> > These devices provide 4-channel, 16-bit delta-sigma ADCs with an I2C
> > interface, programmable gain amplifier (PGA), and data-ready (DRDY)
> > interrupt output.
> >
> > The binding uses child nodes to dynamically define the connected
> > single-ended or differential channels.
> >
> > Excitation current, burn-out current, and reference source properties
> > are also included to fully describe the chip's hardware capabilities,
> > aligned with the ti,ads112c14 binding conventions.
> >
> > Reviewed-by: David Lechner <[email protected]>
> > Acked-by: Conor Dooley <[email protected]>
> > Signed-off-by: Kyle Hsieh <[email protected]>
> > ---
> >  .../devicetree/bindings/iio/adc/ti,ads112c04.yaml  | 148 +++++++++++++++++++++
> >  MAINTAINERS                                        |   6 +
> >  2 files changed, 154 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> > new file mode 100644
> > index 000000000000..68a0df21cedd
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> > @@ -0,0 +1,148 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/ti,ads112c04.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Texas Instruments ADS112C04 ADC
> > +
> > +maintainers:
> > +  - Kyle Hsieh <[email protected]>
> > +
> > +description:
> > +  The ADS112C04 (16-bit) are precision analog-to-digital converters (ADCs)
> > +  with an I2C interface. They feature a flexible input multiplexer, a
> > +  low-noise programmable gain amplifier (PGA), two programmable excitation
> > +  current sources, a voltage reference, and a precision temperature sensor.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,ads112c04
> > +
> > +  reg:
> > +    maxItems: 1
> > +    description: I2C address of the device.
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +    description: Data ready (DRDY) interrupt output.
> > +
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 0
> > +
> > +  reset-gpios:
> > +    maxItems: 1
> > +    description: GPIO connected to the RESET pin. Active low.
> > +
> > +  avdd-supply: true
> > +  dvdd-supply: true
> > +
> > +  refp-supply: true
> > +  refn-supply: true
> > +
> > +  ti,refp-refn-resistor-ohms:
> > +    description: Resistance of the external resistor between REFP and REFN.
> > +
> > +patternProperties:
> > +  "^channel@[0-9a-b]$":
> > +    $ref: adc.yaml
> > +    unevaluatedProperties: false
> > +    properties:
> > +      reg:
> > +        items:
> > +          - maximum: 11
> > +
> > +      single-channel:
> > +        maximum: 3
> > +
> > +      diff-channels:
> > +        items:
> > +          maximum: 3
> > +
> > +      excitation-channels:
> > +        maxItems: 2
> > +        items:
> > +          maximum: 5
> > +        description:
> > +          Additionally to AIN0-AIN3, IDAC1/IDAC2 can also be routed to
> > +          REFP0 (4) and REFN0 (5).
> > +
> > +      excitation-current-nanoamp:
> > +        items:
> > +          - enum: [10000, 50000, 100000, 250000, 500000, 1000000, 1500000]
>
> Drop 'items'. Just enum is enough.
>
> > +
> > +      burn-out-current-nanoamp:
> > +        items:
> > +          - const: 10000
>
> Just 'const'
>
> > +
> > +      reference-sources:
> > +        items:
> > +          - enum: [internal, external, avdd]
> > +            default: internal
>
> default for an items entry doesn't make sense as the entry has to be
> present. Instead (at the same level as 'items'):
>
> default: [ internal ]
>

Will fix all three in v6, thanks.

> > +
> > +    dependencies:
> > +      excitation-channels: [ excitation-current-nanoamp ]
> > +      excitation-current-nanoamp: [ excitation-channels ]
> > +
> > +    oneOf:
> > +      - required: [ single-channel ]
> > +      - required: [ diff-channels ]
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - avdd-supply
> > +  - dvdd-supply
> > +
> > +dependencies:
> > +  refn-supply: [ refp-supply ]
> > +
> > +oneOf:
> > +  - required:
> > +      - refp-supply
>
> Just to make sure, refp-supply is allowed without refn-supply? If not,
> either this should be refn or the dependencies reversed.

Yes - refp-supply alone is valid when REFN is tied to AVSS/ground, which
is the common single-ended case (and what my board does). The
dependency is one-directional on purpose: refn-supply requires
refp-supply, but not the other way round.

Kyle Hsieh
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.