Re: [PATCH v2 6/7] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983

From: Jonathan Cameron

Date: Sat May 16 2026 - 13:04:21 EST


On Thu, 14 May 2026 17:46:53 +0300
Liviu Stan <liviu.stan@xxxxxxxxxx> wrote:

> The ADT7604 shares the same die as the LTC2984. It repurposes the
> custom RTD sensor type (18) as a copper trace resistance sensor
> and the custom thermistor type (27) as a leak detector, and
> removes thermocouple, diode and direct ADC sensor types.
>
> Add adi,adt7604 to the compatible list and introduce two new
> sensor node types specific to this device:
>
> - copper-trace@: maps to the custom RTD sensor type (18). Two

Mixed back from Sashiko on this one... But does point out that these
values are the hardware ones - binding shouldn't care as this
is using virtual ids to avoid reuse of existing ones.

Ignore it getting fussy about not matching hardware. We want them
to not match!


> variants: sub-ohm (< 1 ohm, adi,copper-trace-sub-ohm boolean,
> no custom table and excitation current) and standard (> 1 ohm,
> optional adi,custom-rtd table, optional excitation current
> defaulting to the datasheet recommended value). Primary output
> is resistance in ohms. When a custom table is provided, the
> chip also outputs temperature in millidegrees Celsius.
>
> - leak-detector@: maps to the custom thermistor sensor type (27).
> Takes an optional adi,custom-leak-detector lookup table encoding
> resistance (uOhm) against coverage data. Primary output is
> resistance in ohms. When a custom table is provided, the chip
> also outputs coverage in percent.
>
> Separate node types are used rather than extending the existing
> rtd@ and thermistor@ nodes because adi,custom-rtd and
> adi,custom-thermistor are currently required for types 18 and 27,
> and several properties (adi,number-of-wires, adi,rtd-curve,
> adi,rsense-share) have no meaning for copper trace and would need
> to be explicitly forbidden or ignored in the driver.
>
> allOf conditions are added to restrict thermocouple, diode, direct
> ADC and active temperature nodes to non-ADT7604 devices, and to
> restrict copper-trace and leak-detector nodes to the ADT7604
> (some parts only).
>
> Signed-off-by: Liviu Stan <liviu.stan@xxxxxxxxxx>


> + '^leak-detector@':
> + $ref: '#/$defs/sensor-node'
> + unevaluatedProperties: false
> + description: |
> + Leak detector sensor (some parts only). Outputs resistance in ohms and,
> + when a custom table is provided, a coverage percentage via
> + IIO_COVERAGE_PERCENT (raw/1024 = coverage %).
> +
> + properties:
> + reg:
> + minimum: 2
> + maximum: 20
> +
> + adi,sensor-type:
> + description: Sensor type for leak detector sensors.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + const: 33
> +
> + adi,rsense-handle:
> + description: Associated sense resistor sensor.
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + adi,excitation-current-nanoamp:
> + description:
> + Excitation current applied to the leak detector. The correct value
> + depends on the electrical characteristics of the liquid being sensed.
> + For example, 10000 (10µA) is recommended for PG25 (see datasheet
> + Table 39).
> + enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000,
> + 500000, 1000000]
> +
> + adi,custom-leak-detector:
> + description: |
> + Lookup table mapping resistance to coverage data. Entries must be
> + in ascending resistance order. The coverage data field encodes the
> + coverage percentage P as (P + 273.15) expressed in uK, i.e.
> + (P * 1000000 + 273150000).

I like sashiko's comment on this. Why are we having the hardware / driver
offset encoded in DT? Just put in the value without the offset and apply that
in the driver.

> + $ref: /schemas/types.yaml#/definitions/uint64-matrix
> + minItems: 3
> + maxItems: 64
> + items:
> + items:
> + - description: Resistance point in uOhms.
> + - description: Coverage data point (P + 273150000) in uK.
> +
> + required:
> + - adi,rsense-handle
> + - adi,excitation-current-nanoamp
> +