From: Liviu Stan <liviu.stan@analog.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Francesco Lavra" <flavra@baylibre.com>,
"Liviu Stan" <liviu.stan@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux@analog.com, devicetree@vger.kernel.org
Subject: [PATCH v2 6/7] dt-bindings: iio: temperature: Add ADT7604 support to adi,ltc2983
Date: Thu, 14 May 2026 17:46:53 +0300 [thread overview]
Message-ID: <20260514144712.64374-7-liviu.stan@analog.com> (raw)
In-Reply-To: <20260514144712.64374-1-liviu.stan@analog.com>
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
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@analog.com>
---
Changes in v2:
- Shortened title to "LTC2983 and similar".
- Converted device description list to bullet list in alphabetical
order.
- Retained separate copper-trace@ and leak-detector@ node types rather
than extending rtd@/thermistor@; rationale added to commit message.
- Replaced "ADT7604 only" with "some parts only".
.../bindings/iio/temperature/adi,ltc2983.yaml | 194 +++++++++++++++++-
1 file changed, 191 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
index a22725f7619b..c63b69bd9504 100644
--- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
@@ -4,14 +4,18 @@
$id: http://devicetree.org/schemas/iio/temperature/adi,ltc2983.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Analog Devices LTC2983, LTC2986, LTM2985 Multi-sensor Temperature system
+title: Analog Devices LTC2983 and similar Multi-sensor Temperature systems
maintainers:
- Nuno Sá <nuno.sa@analog.com>
description: |
- Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital
- Temperature Measurement Systems
+ Analog Devices Multi-Sensor Digital Temperature Measurement Systems:
+ - ADT7604
+ - LTC2983
+ - LTC2984
+ - LTC2986
+ - LTM2985
https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf
@@ -43,6 +47,7 @@ properties:
compatible:
oneOf:
- enum:
+ - adi,adt7604
- adi,ltc2983
- adi,ltc2986
- adi,ltm2985
@@ -436,6 +441,115 @@ patternProperties:
required:
- adi,custom-temp
+ '^copper-trace@':
+ $ref: '#/$defs/sensor-node'
+ unevaluatedProperties: false
+ description: |
+ Copper trace resistance sensor (some parts only). Two variants exist:
+ sub-ohm (< 1 ohm, no custom table allowed) and standard (> 1 ohm,
+ optional custom table).
+
+ properties:
+ reg:
+ minimum: 2
+ maximum: 20
+
+ adi,sensor-type:
+ description: Sensor type for copper trace sensors.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ const: 32
+
+ adi,rsense-handle:
+ description: Associated sense resistor sensor.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ adi,copper-trace-sub-ohm:
+ description:
+ Select the sub-ohm (< 1 ohm) copper trace variant. Custom table
+ and excitation current are not allowed in this mode.
+ type: boolean
+
+ adi,excitation-current-microamp:
+ description:
+ Excitation current applied to the copper trace. Not used in
+ sub-ohm mode. The datasheet recommends 1mA for copper trace
+ sensors due to their typically small resistance.
+ enum: [5, 10, 25, 50, 100, 250, 500, 1000]
+ default: 1000
+
+ adi,custom-rtd:
+ description:
+ Optional resistance-to-temperature table for copper trace sensors
+ with resistance > 1 ohm. See Page 62 of the datasheet.
+ $ref: /schemas/types.yaml#/definitions/uint64-matrix
+ minItems: 3
+ maxItems: 64
+ items:
+ items:
+ - description: Resistance point in uOhms.
+ - description: Temperature point in uK.
+
+ required:
+ - adi,rsense-handle
+
+ allOf:
+ - if:
+ required:
+ - adi,copper-trace-sub-ohm
+ then:
+ properties:
+ adi,custom-rtd: false
+ adi,excitation-current-microamp: false
+
+ '^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).
+ $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
+
'^rsense@':
$ref: '#/$defs/sensor-node'
unevaluatedProperties: false
@@ -477,6 +591,22 @@ allOf:
patternProperties:
'^temp@': false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,adt7604
+ then:
+ patternProperties:
+ '^thermocouple@': false
+ '^diode@': false
+ '^adc@': false
+ '^temp@': false
+ else:
+ patternProperties:
+ '^copper-trace@': false
+ '^leak-detector@': false
+
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
@@ -556,4 +686,62 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@0 {
+ compatible = "adi,adt7604";
+ reg = <0>;
+ interrupt-parent = <&gpio>;
+ interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ vdd-supply = <&supply>;
+
+ trace_rsense: rsense@2 {
+ reg = <2>;
+ adi,sensor-type = <29>;
+ adi,rsense-val-milli-ohms = <100000>; // 100 ohm
+ };
+
+ copper-trace@4 {
+ reg = <4>;
+ adi,sensor-type = <32>;
+ adi,rsense-handle = <&trace_rsense>;
+ adi,copper-trace-sub-ohm;
+ };
+
+ r_sense: rsense@12 {
+ reg = <12>;
+ adi,sensor-type = <29>;
+ adi,rsense-val-milli-ohms = <1000000>; // 1 kohm
+ };
+
+ leak-detector@14 {
+ reg = <14>;
+ adi,sensor-type = <33>;
+ adi,rsense-handle = <&r_sense>;
+ adi,excitation-current-nanoamp = <10000>;
+ adi,custom-leak-detector =
+ /bits/ 64 < 0 373150000>,
+ /bits/ 64 < 202020000 372150000>,
+ /bits/ 64 < 1000000000 293150000>;
+ };
+
+ rtd@18 {
+ reg = <18>;
+ adi,sensor-type = <12>; // PT100
+ adi,rsense-handle = <&r_sense>;
+ adi,number-of-wires = <2>;
+ adi,rsense-share;
+ adi,excitation-current-microamp = <500>;
+ adi,rtd-curve = <0>;
+ };
+ };
+ };
...
--
2.43.0
next prev parent reply other threads:[~2026-05-14 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 14:46 [PATCH v2 0/7] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
2026-05-14 14:46 ` [PATCH v2 1/7] iio: temperature: ltc2983: Fix macro parenthesization and rename Liviu Stan
2026-05-14 14:46 ` [PATCH v2 2/7] iio: temperature: ltc2983: Use local device pointer consistently Liviu Stan
2026-05-14 14:46 ` [PATCH v2 3/7] iio: temperature: ltc2983: Fix inconsistent channel wording in messages Liviu Stan
2026-05-14 14:46 ` [PATCH v2 4/7] iio: temperature: ltc2983: Use fwnode_property_present() for optional properties Liviu Stan
2026-05-14 14:46 ` [PATCH v2 5/7] iio: core: Add IIO_COVERAGE_PERCENT channel type Liviu Stan
2026-05-14 14:46 ` Liviu Stan [this message]
2026-05-14 14:46 ` [PATCH v2 7/7] iio: temperature: ltc2983: Add support for ADT7604 Liviu Stan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260514144712.64374-7-liviu.stan@analog.com \
--to=liviu.stan@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=flavra@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox