adi,ltc2984 (on spi bus)

Description

LTC2984 Multi-Sensor High Accuracy Digital Temperature Measurement System

The LTC2984 is register-compatible with the ADT7604 and additionally
supports thermocouples (with automatic cold junction compensation),
diodes, and Direct ADC voltage measurements across 20 channels.

Examples

#include <zephyr/dt-bindings/sensor/adt7604.h>

&spi0 {
    ltc2984: ltc2984@0 {
        compatible = "adi,ltc2984";
        reg = <0>;
        spi-max-frequency = <1000000>;

        reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
        int-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;

        adi,mux-delay-config-us = <0>;
        adi,filter-notch-freq = "50-60hz";

        #address-cells = <1>;
        #size-cells = <0>;

        channel@2 {
            reg = <0x2>;
            adi,sensor-type = <LTC2984_SENSOR_TYPE_DIODE>;
            adi,sensor-configuration = <LTC2984_DIODE_CONFIG_SINGLE_ENDED_3_READINGS>;
            adi,excitation-current = <LTC2984_DIODE_EXCITATION_CURRENT_10_UA>;
            adi,diode-ideality-factor = "1.003";
        };

        channel@4 {
            reg = <0x4>;
            adi,sensor-type = <LTC2984_SENSOR_TYPE_TC_TYPE_K>;
            adi,sensor-configuration = <LTC2984_TC_CONFIG_DIFF_10_UA>;
            adi,rsense-channel = <2>;
        };

        channel@6 {
            reg = <0x6>;
            adi,sensor-type = <LTC2984_SENSOR_TYPE_DIRECT_ADC>;
            adi,direct-adc-single-ended;
        };
    };
};

Properties

Top level properties

These property descriptions apply to “adi,ltc2984” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

Name

Type

Details

reset-gpios

phandle-array

Active low reset pin.

int-gpios

phandle-array

Active high interrupt pin.

adi,mux-delay-config-us

int

Multiplexer delay configuration in microseconds.
Adds settling time between channel switches.

Default value: 0

adi,filter-notch-freq

string

Digital filter notch frequency for line noise rejection. Default is
power-on setting ("50-60hz").
- "50-60hz": Rejection of both 50Hz and 60Hz
- "60hz": 60Hz rejection only
- "50hz": 50Hz rejection only

Default value: 50-60hz

Legal values: 50-60hz, 60hz, 50hz

friendly-name

string

Human readable string describing the sensor. It can be used to
distinguish multiple instances of the same model (e.g., lid accelerometer
vs. base accelerometer in a laptop) to a host operating system.

This property is defined in the Generic Sensor Property Usages of the HID
Usage Tables specification
(https://usb.org/sites/default/files/hut1_3_0.pdf, section 22.5).

spi-max-frequency

int

Maximum clock frequency of device's SPI interface in Hz

This property is required.

duplex

int

Duplex mode, full or half. By default it's always full duplex thus 0
as this is, by far, the most common mode.
Use the macros not the actual enum value, here is the concordance
list (see dt-bindings/spi/spi.h)
  0    SPI_FULL_DUPLEX
  2048 SPI_HALF_DUPLEX

Default value: 0

Legal values: 0, 2048

frame-format

int

Motorola or TI frame format. By default it's always Motorola's,
thus 0 as this is, by far, the most common format.
Use the macros not the actual enum value, here is the concordance
list (see dt-bindings/spi/spi.h)
  0     SPI_FRAME_FORMAT_MOTOROLA
  32768 SPI_FRAME_FORMAT_TI

Default value: 0

Legal values: 0, 32768

spi-cpol

boolean

SPI clock polarity which indicates the clock idle state.
If it is used, the clock idle state is logic high; otherwise, low.

spi-cpha

boolean

SPI clock phase that indicates on which edge data is sampled.
If it is used, data is sampled on the second edge; otherwise, on the first edge.

spi-lsb-first

boolean

The device requires least significant bit first data mode.

spi-hold-cs

boolean

In some cases, it is necessary for the controller to manage SPI chip select
under software control, so that multiple spi transactions can be performed
without releasing it. A typical use case is variable length SPI packets
where the first spi transaction reads the length and the second spi transaction
reads length bytes.

spi-cs-high

boolean

The device requires the chip select to be active high.

spi-interframe-delay-ns

int

Delay in nanoseconds between SPI words.
Default of 0 is special value which will assume to mean half of the SCK period.

Default value: 0

spi-cs-setup-delay-ns

int

Delay in nanoseconds to be introduced by the controller after CS is asserted.
Also known as enable lead time.

spi-cs-hold-delay-ns

int

Delay in nanoseconds to be introduced by the controller before the CS is de-asserted.
 Also known as enable lag time.

supply-gpios

phandle-array

GPIO specifier that controls power to the device.

This property should be provided when the device has a dedicated
switch that controls power to the device.  The supply state is
entirely the responsibility of the device driver.

Contrast with vin-supply.

vin-supply

phandle

Reference to the regulator that controls power to the device.
The referenced devicetree node must have a regulator compatible.

This property should be provided when device power is supplied
by a shared regulator.  The supply state is dependent on the
request status of all devices fed by the regulator.

Contrast with supply-gpios.  If both properties are provided
then the regulator must be requested before the supply GPIOS is
set to an active state, and the supply GPIOS must be set to an
inactive state before releasing the regulator.

Child node properties

Name

Type

Details

reg

int

Channel number (1-20)

This property is required.

Value range: 1 to 20

See Important properties for more information.

adi,sensor-type

int

Sensor type for this channel. Use macros from dt-bindings/sensor/adt7604.h:
  ADT7604_SENSOR_TYPE_RTD_PT_10 (10) = RTD PT-10
  ADT7604_SENSOR_TYPE_RTD_PT_50 (11) = RTD PT-50
  ADT7604_SENSOR_TYPE_RTD_PT_100 (12) = RTD PT-100
  ADT7604_SENSOR_TYPE_RTD_PT_200 (13) = RTD PT-200
  ADT7604_SENSOR_TYPE_RTD_PT_500 (14) = RTD PT-500
  ADT7604_SENSOR_TYPE_RTD_PT_1000 (15) = RTD PT-1000
  ADT7604_SENSOR_TYPE_RTD_1000 (16) = RTD 1000
  ADT7604_SENSOR_TYPE_RTD_NI_120 (17) = RTD NI-120
  ADT7604_SENSOR_TYPE_COPPER_TRACE (18) = Copper Trace
  ADT7604_SENSOR_TYPE_THERMISTOR_44004 (19) = Thermistor 44004/44033
  ADT7604_SENSOR_TYPE_THERMISTOR_44005 (20) = Thermistor 44005/44030
  ADT7604_SENSOR_TYPE_THERMISTOR_44007 (21) = Thermistor 44007/44034
  ADT7604_SENSOR_TYPE_THERMISTOR_44006 (22) = Thermistor 44006/44031
  ADT7604_SENSOR_TYPE_THERMISTOR_44008 (23) = Thermistor 44008/44032
  ADT7604_SENSOR_TYPE_THERMISTOR_YSI_400 (24) = Thermistor YSI-400
  ADT7604_SENSOR_TYPE_THERMISTOR_SPECTRUM (25) = Thermistor Spectrum
  ADT7604_SENSOR_TYPE_THERMISTOR_CUSTOM (26) = Thermistor Custom
  ADT7604_SENSOR_TYPE_LEAK_DETECTOR (27) = Leak Detector
  ADT7604_SENSOR_TYPE_RSENSE (29) = Sense Resistor

This property is required.

adi,rsense-channel

int

Reference sense resistor channel number for RTD, thermistor,
copper trace, or custom sensor types. Must point to a channel
configured as sense resistor (type 29).

LTC2984 thermocouples only: reused as the cold junction channel
pointer (1-20). Points to the channel (diode, RTD, or thermistor)
used for automatic cold junction compensation; that channel is
measured automatically whenever a conversion is performed on this
thermocouple channel.

Default value: 0

adi,rsense-val

string

Value of the reference sense resistor in ohms or mohms. Ohm values
can be fractional. Valid only if the sensor type is a sense resistor
(type 29).

Default value: 0

adi,rsense-mohm

boolean

Indicates whether the reference sense resistor value is specified in milliohms.

adi,sensor-configuration

int

Sensor configuration bit value. Use macros from dt-bindings/sensor/adt7604.h:
- RTD sensors: ADT7604_RTD_CONFIG_* (wire type + excitation mode)
- Thermistors: ADT7604_THERMISTOR_CONFIG_* (differential/single-ended + sharing)
- LTC2984 thermocouples: LTC2984_TC_CONFIG_* (differential/single-ended +
  open-circuit check enable + open-circuit detect current)
- LTC2984 diodes: LTC2984_DIODE_CONFIG_* (differential/single-ended + number of
  readings (2 or 3) + running average enable)
- Copper trace: Fixed value 0x9
- Leak sensor: Fixed value 0x1
Default 0 = basic configuration.

Default value: 0

adi,excitation-current

int

Excitation current bit value for the sensor. Use macros from
dt-bindings/sensor/adt7604.h for correct values:
- RTD sensors: ADT7604_RTD_EXCITATION_CURRENT_* (5µA to 1mA)
- Copper trace ≥1Ω: ADT7604_CT_EXCITATION_CURRENT_* (5µA to 1mA)
- Thermistors: ADT7604_THERMISTOR_EXCITATION_CURRENT_* (250nA to 1mA, AUTO)
- Leak sensors: ADT7604_LEAK_EXCITATION_CURRENT_* (250nA to 1mA)
- LTC2984 diodes: LTC2984_DIODE_EXCITATION_CURRENT_* (10µA to 80µA base/1x value;
  device automatically also measures at 4x/8x when 3-readings mode is selected)
Default 0 = reserved/disabled. Not used for LTC2984 thermocouples; see
adi,sensor-configuration (LTC2984_TC_CONFIG_*) instead.

Default value: 0

adi,diode-ideality-factor

string

LTC2984 diode non-ideality factor (eta), as a decimal string. Encoded as a Q2.20
unsigned fixed-point value (2 integer bits, 20 fractional bits, 1/1048576
resolution), valid range 0 to just under 4. Programming all zeros (an eta of
exactly 0) causes the device to use its internal factory-set default of 1.003
instead of literal 0 -- the default value of this property matches that
behavior. Valid only if the sensor type is a diode.

Default value: 1.003

adi,direct-adc-single-ended

boolean

LTC2984 Direct ADC mode: selects single-ended measurement (positive input tied
to this channel, negative input is COM) when set, or differential measurement
(negative input tied to the previous channel) when unset. Valid only if the
sensor type is Direct ADC.

adi,rtd-curve

string

RTD curve type for this channel. Valid only if the sensor type is an RTD.

Default value: european-curve

Legal values: european-curve, american, japanese, its-90, rtd1000-375, ni-120

adi,sub-ohm

boolean

Indicates whether the resistance of copper trace sensor tied to ADT7604 is
in sub-ohms (e.g. 0.25ohms). Valid only if the sensor type is a copper
trace resistor (type 18).
Note: Custom sensor data table address and length are automatically managed
at runtime when adt7604_write_custom_sensor_data_table() is called.