115 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/afe/temperature-transducer.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Temperature Transducer8 9maintainers:10 - Liam Beguin <liambeguin@gmail.com>11 12description: |13 A temperature transducer is a device that converts a thermal quantity14 into any other physical quantity. This binding applies to temperature to15 voltage (like the LTC2997), and temperature to current (like the AD590)16 linear transducers.17 In both cases these are assumed to be connected to a voltage ADC.18 19 When an io-channel measures the output voltage of a temperature analog front20 end such as a temperature transducer, the interesting measurement is almost21 always the corresponding temperature, not the voltage output. This binding22 describes such a circuit.23 24 The general transfer function here is (using SI units)25 V(T) = Rsense * Isense(T)26 T = (Isense(T) / alpha) + offset27 T = 1 / (Rsense * alpha) * (V + offset * Rsense * alpha)28 29 When using a temperature to voltage transducer, Rsense is set to 1.30 31 The following circuits show a temperature to current and a temperature to32 voltage transducer that can be used with this binding.33 34 VCC35 -----36 |37 +---+---+38 | AD590 | VCC39 +---+---+ -----40 | |41 V proportional to T +----+----+42 | D+ --+ |43 +---- Vout | LTC2997 +--- Vout44 | D- --+ |45 +---+----+ +---------+46 | Rsense | |47 +---+----+ -----48 | GND49 -----50 GND51 52properties:53 compatible:54 const: temperature-transducer55 56 io-channels:57 maxItems: 158 description: |59 Channel node of a voltage io-channel.60 61 '#io-channel-cells':62 const: 063 64 sense-offset-millicelsius:65 description: |66 Temperature offset.67 This offset is commonly used to convert from Kelvins to degrees Celsius.68 In that case, sense-offset-millicelsius would be set to <(-273150)>.69 default: 070 71 sense-resistor-ohms:72 description: |73 The sense resistor.74 By default sense-resistor-ohms cancels out the resistor making the75 circuit behave like a temperature transducer.76 default: 177 78 alpha-ppm-per-celsius:79 description: |80 Sometimes referred to as output gain, slope, or temperature coefficient.81 82 alpha is expressed in parts per million which can be micro-amps per83 degrees Celsius or micro-volts per degrees Celsius. The is the main84 characteristic of a temperature transducer and should be stated in the85 datasheet.86 87additionalProperties: false88 89required:90 - compatible91 - io-channels92 - alpha-ppm-per-celsius93 94examples:95 - |96 ad950: temperature-sensor-0 {97 compatible = "temperature-transducer";98 #io-channel-cells = <0>;99 io-channels = <&temp_adc 3>;100 101 sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */102 sense-resistor-ohms = <8060>;103 alpha-ppm-per-celsius = <1>; /* 1 uA/K */104 };105 - |106 znq_tmp: temperature-sensor-1 {107 compatible = "temperature-transducer";108 #io-channel-cells = <0>;109 io-channels = <&temp_adc 2>;110 111 sense-offset-millicelsius = <(-273150)>; /* Kelvin to degrees Celsius */112 alpha-ppm-per-celsius = <4000>; /* 4 mV/K */113 };114...115