Path: blob/master/Documentation/devicetree/bindings/iio/afe/temperature-transducer.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/afe/temperature-transducer.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Temperature Transducer78maintainers:9- Liam Beguin <liambeguin@gmail.com>1011description: |12A temperature transducer is a device that converts a thermal quantity13into any other physical quantity. This binding applies to temperature to14voltage (like the LTC2997), and temperature to current (like the AD590)15linear transducers.16In both cases these are assumed to be connected to a voltage ADC.1718When an io-channel measures the output voltage of a temperature analog front19end such as a temperature transducer, the interesting measurement is almost20always the corresponding temperature, not the voltage output. This binding21describes such a circuit.2223The general transfer function here is (using SI units)24V(T) = Rsense * Isense(T)25T = (Isense(T) / alpha) + offset26T = 1 / (Rsense * alpha) * (V + offset * Rsense * alpha)2728When using a temperature to voltage transducer, Rsense is set to 1.2930The following circuits show a temperature to current and a temperature to31voltage transducer that can be used with this binding.3233VCC34-----35|36+---+---+37| AD590 | VCC38+---+---+ -----39| |40V proportional to T +----+----+41| D+ --+ |42+---- Vout | LTC2997 +--- Vout43| D- --+ |44+---+----+ +---------+45| Rsense | |46+---+----+ -----47| GND48-----49GND5051properties:52compatible:53const: temperature-transducer5455io-channels:56maxItems: 157description: |58Channel node of a voltage io-channel.5960'#io-channel-cells':61const: 06263sense-offset-millicelsius:64description: |65Temperature offset.66This offset is commonly used to convert from Kelvins to degrees Celsius.67In that case, sense-offset-millicelsius would be set to <(-273150)>.68default: 06970sense-resistor-ohms:71description: |72The sense resistor.73By default sense-resistor-ohms cancels out the resistor making the74circuit behave like a temperature transducer.75default: 17677alpha-ppm-per-celsius:78description: |79Sometimes referred to as output gain, slope, or temperature coefficient.8081alpha is expressed in parts per million which can be micro-amps per82degrees Celsius or micro-volts per degrees Celsius. The is the main83characteristic of a temperature transducer and should be stated in the84datasheet.8586additionalProperties: false8788required:89- compatible90- io-channels91- alpha-ppm-per-celsius9293examples:94- |95ad950: temperature-sensor-0 {96compatible = "temperature-transducer";97#io-channel-cells = <0>;98io-channels = <&temp_adc 3>;99100sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */101sense-resistor-ohms = <8060>;102alpha-ppm-per-celsius = <1>; /* 1 uA/K */103};104- |105znq_tmp: temperature-sensor-1 {106compatible = "temperature-transducer";107#io-channel-cells = <0>;108io-channels = <&temp_adc 2>;109110sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */111alpha-ppm-per-celsius = <4000>; /* 4 mV/K */112};113...114115116