0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/afe/temperature-transducer.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Temperature Transducer
0008
0009 maintainers:
0010 - Liam Beguin <liambeguin@gmail.com>
0011
0012 description: |
0013 A temperature transducer is a device that converts a thermal quantity
0014 into any other physical quantity. This binding applies to temperature to
0015 voltage (like the LTC2997), and temperature to current (like the AD590)
0016 linear transducers.
0017 In both cases these are assumed to be connected to a voltage ADC.
0018
0019 When an io-channel measures the output voltage of a temperature analog front
0020 end such as a temperature transducer, the interesting measurement is almost
0021 always the corresponding temperature, not the voltage output. This binding
0022 describes such a circuit.
0023
0024 The general transfer function here is (using SI units)
0025 V(T) = Rsense * Isense(T)
0026 T = (Isense(T) / alpha) + offset
0027 T = 1 / (Rsense * alpha) * (V + offset * Rsense * alpha)
0028
0029 When using a temperature to voltage transducer, Rsense is set to 1.
0030
0031 The following circuits show a temperature to current and a temperature to
0032 voltage transducer that can be used with this binding.
0033
0034 VCC
0035 -----
0036 |
0037 +---+---+
0038 | AD590 | VCC
0039 +---+---+ -----
0040 | |
0041 V proportional to T +----+----+
0042 | D+ --+ |
0043 +---- Vout | LTC2997 +--- Vout
0044 | D- --+ |
0045 +---+----+ +---------+
0046 | Rsense | |
0047 +---+----+ -----
0048 | GND
0049 -----
0050 GND
0051
0052 properties:
0053 compatible:
0054 const: temperature-transducer
0055
0056 io-channels:
0057 maxItems: 1
0058 description: |
0059 Channel node of a voltage io-channel.
0060
0061 '#io-channel-cells':
0062 const: 0
0063
0064 sense-offset-millicelsius:
0065 description: |
0066 Temperature offset.
0067 This offset is commonly used to convert from Kelvins to degrees Celsius.
0068 In that case, sense-offset-millicelsius would be set to <(-273150)>.
0069 default: 0
0070
0071 sense-resistor-ohms:
0072 description: |
0073 The sense resistor.
0074 By default sense-resistor-ohms cancels out the resistor making the
0075 circuit behave like a temperature transducer.
0076 default: 1
0077
0078 alpha-ppm-per-celsius:
0079 description: |
0080 Sometimes referred to as output gain, slope, or temperature coefficient.
0081
0082 alpha is expressed in parts per million which can be micro-amps per
0083 degrees Celsius or micro-volts per degrees Celsius. The is the main
0084 characteristic of a temperature transducer and should be stated in the
0085 datasheet.
0086
0087 additionalProperties: false
0088
0089 required:
0090 - compatible
0091 - io-channels
0092 - alpha-ppm-per-celsius
0093
0094 examples:
0095 - |
0096 ad950: temperature-sensor-0 {
0097 compatible = "temperature-transducer";
0098 #io-channel-cells = <0>;
0099 io-channels = <&temp_adc 3>;
0100
0101 sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */
0102 sense-resistor-ohms = <8060>;
0103 alpha-ppm-per-celsius = <1>; /* 1 uA/K */
0104 };
0105 - |
0106 znq_tmp: temperature-sensor-1 {
0107 compatible = "temperature-transducer";
0108 #io-channel-cells = <0>;
0109 io-channels = <&temp_adc 2>;
0110
0111 sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */
0112 alpha-ppm-per-celsius = <4000>; /* 4 mV/K */
0113 };
0114 ...