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

From: David Lechner

Date: Fri Jul 31 2026 - 10:00:11 EST


On 7/30/26 9:58 PM, 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.
>
> Signed-off-by: Kyle Hsieh <kylehsieh1995@xxxxxxxxx>
> ---
> .../devicetree/bindings/iio/adc/ti,ads112c04.yaml | 122 +++++++++++++++++++++
> 1 file changed, 122 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..6a5ffda84b80
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> @@ -0,0 +1,122 @@
> +# 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 <kylehsieh1995@xxxxxxxxx>
> +
> +description: |

The | isn't needed in this case. (It is only needed if we needed
to preserve formatting, or if there is a : in the text that would
be interpreted as a dict key.)

> + 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:
> + $ref: /schemas/types.yaml#/definitions/uint32

As the bot said, don't need $ref here because it is a standard unit.
(So don't forget to run `make dt_binding_check DT_SCHEMA_FILES=ads112c04`
before sending.)

> + description: Resistance of the external resistor between REFP and REFN.
> +
> +patternProperties:
> + "^channel@[0-9a-f]$":
> + $ref: adc.yaml
> + unevaluatedProperties: false
> + properties:
> + reg:
> + items:
> + - maximum: 15

This chip doesn't allow arbitrary combinations, so there
are actually only 12 possible single-channel + diff-channels
values. So maximum: 11 and channel@[0-9a-b] would make sense.

> +
> + single-channel:
> + maximum: 3
> +
> + diff-channels:
> + items:
> + maximum: 3

For this chip, we should also have excitation-channels, excitation-current-nanoamp,
and reference-sources.

> +
> + oneOf:
> + - required: [ single-channel ]
> + - required: [ diff-channels ]
> +