Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 167 additions & 3 deletions Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
$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, LTC2986, LTM2985, ADT7604 Multi-sensor Temperature system

maintainers:
- Nuno Sá <nuno.sa@analog.com>

description: |
Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital
Temperature Measurement Systems
Analog Devices LTC2983, LTC2984, LTC2986, LTM2985, ADT7604 Multi-Sensor
Digital Temperature Measurement Systems

https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf
Expand Down Expand Up @@ -44,6 +44,7 @@ properties:
compatible:
oneOf:
- enum:
- adi,adt7604
- adi,ltc2983
- adi,ltc2986
- adi,ltm2985
Expand Down Expand Up @@ -437,6 +438,96 @@ patternProperties:
required:
- adi,custom-temp

"^copper-trace@":
$ref: '#/$defs/sensor-node'
unevaluatedProperties: false
description: |
Copper trace resistance sensor (ADT7604 only). Uses the custom RTD
sensor type (18). 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: 18

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,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

"^leak-detector@":
$ref: '#/$defs/sensor-node'
unevaluatedProperties: false
description: |
Leak detector sensor (ADT7604 only). Uses the custom thermistor sensor
type (27). Outputs resistance in ohms and, when a custom table is
provided, a coverage percentage via IIO_TEMP (raw/1024 = coverage %).

properties:
reg:
minimum: 2
maximum: 20

adi,sensor-type:
Comment thread
leaveyoustun marked this conversation as resolved.
description: Sensor type for leak detector sensors.
$ref: /schemas/types.yaml#/definitions/uint32
const: 27

adi,rsense-handle:
description: Associated sense resistor sensor.
$ref: /schemas/types.yaml#/definitions/phandle

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

"^rsense@":
$ref: '#/$defs/sensor-node'
unevaluatedProperties: false
Expand Down Expand Up @@ -478,6 +569,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>
Expand Down Expand Up @@ -557,4 +664,61 @@ 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 = <18>;
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 = <27>;
adi,rsense-handle = <&r_sense>;
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>;
};
};
};
...
Loading
Loading