Re: [PATCH v3 1/2] dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04
From: David Lechner
Date: Fri Aug 07 2026 - 16:26:29 EST
On 8/5/26 12:38 AM, 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 | 146 +++++++++++++++++++++
> 1 file changed, 146 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..ff079bb5b3dd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> @@ -0,0 +1,146 @@
> +# 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 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: 3
I{1,2}MUX can also be routed to the REFP and REFN pins, so we need to
go up to 5 here and add a description that explains the mapping.
> +
> + excitation-current-nanoamp:
> + maxItems: 2
> + items:
> + enum: [10000, 50000, 100000, 250000, 500000, 1000000, 1500000]
> +
The current outputs are not independently configurable on this one
so maxItems: 1 would be fine on this one.
Or I think this works too:
excitation-current-nanoamp:
items:
- enum: [10000, 50000, 100000, 250000, 500000, 1000000, 1500000]
> + burn-out-current-nanoamp:
> + items:
> + - enum: [10000]
When there is only one possibility:
- const: 10000
> +
> + reference-sources:
> + items:
> + - enum: [internal-2.048v, external, avdd]
> + default: internal-2.048v
Since there is only one internal, we can just call it "internal".
> +
> + 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
> + - required:
> + - ti,refp-refn-resistor-ohms
> + - properties:
> + refp-supply: false
> + refn-supply: false
> + ti,refp-refn-resistor-ohms: false
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/gpio/gpio.h>
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + adc@40 {
> + compatible = "ti,ads112c04";
> + reg = <0x40>;
> + interrupt-parent = <&gpio>;
> + interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
> +
> + reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
> + avdd-supply = <&vdd_3v3_reg>;
> + dvdd-supply = <&vdd_3v3_reg>;
> + refp-supply = <&vref_reg>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + channel@0 {
> + reg = <0>;
> + diff-channels = <0>, <1>;
> + };
> +
> + channel@1 {
> + reg = <1>;
> + single-channel = <2>;
> + };
> + };
> + };
>