NTC thermistor temperature sensors
Schema identifier ($id): "http://devicetree.org/schemas/hwmon/ntc-thermistor.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"
Thermistors with negative temperature coefficient (NTC) are resistors that vary in resistance in an often non-linear way in relation to temperature. The negative temperature coefficient means that the resistance decreases as the temperature rises. Since the relationship between resistance and temperature is non-linear, software drivers most often need to use a look up table and interpolation to get from resistance to temperature.
When used in practice, a thermistor is often connected between ground, a pull-up resistor or/and a pull-down resistor and a fixed voltage like this:
+ e.g. 5V = pull-up voltage (puv)
|
+-+
| |
| | Pull-up resistor
| | (puo)
+-+
|-------------------------o
+-+ | ^
| |/ |
| / |
|/| Thermistor | Measured voltage (mv)
/ | | "connected ground"
/| | |
+-+ |
|-------------------------o
+-+ ^
| | |
| | Pull-down resistor | Measured voltage (mv)
| | (pdo) | "connected positive"
+-+ |
| |
| v
+ GND GND
The arrangements of where we measure the voltage over the thermistor are called "connected ground" and "connected positive" and shall be understood as the cases when either pull-up or pull-down resistance is zero.
If the pull-up resistance is 0 one end of the thermistor is connected to the positive voltage and we get the thermistor on top of a pull-down resistor and we take the measure between the thermistor and the pull-down resistor.
Conversely if the pull-down resistance is zero, one end of the thermistor is connected to ground and we get the thermistor under the pull-up resistor and we take the measure between the pull-up resistor and the thermistor.
We can use both pull-up and pull-down resistors at the same time, and then the figure illustrates where the voltage will be measured for the "connected ground" and "connected positive" cases.
Properties and child nodes (properties) #
$nodename — not listed as required here #
String pattern (pattern): "^thermistor(.*)?$"
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"epcos,b57330v2103"
Rule 2
Exact value (
const):"epcos,b57891s0103"
Rule 3
Exact value (
const):"murata,ncp15wb473"
Rule 4
Exact value (
const):"murata,ncp18wb473"
Rule 5
Exact value (
const):"murata,ncp21wb473"
Rule 6
Exact value (
const):"murata,ncp03wb473"
Rule 7
Exact value (
const):"murata,ncp15wl333"
Rule 8
Exact value (
const):"murata,ncp03wf104"
Rule 9
Exact value (
const):"murata,ncp15xh103"
Rule 10
Exact value (
const):"murata,ncp18wm474"
Rule 11
Exact value (
const):"samsung,1404-001221"
Rule 12
Exact value (
const):"ntc,ncp15wb473"Deprecated (
deprecated):true
Rule 13
Exact value (
const):"ntc,ncp18wb473"Deprecated (
deprecated):true
Rule 14
Exact value (
const):"ntc,ncp21wb473"Deprecated (
deprecated):true
Rule 15
Exact value (
const):"ntc,ncp03wb473"Deprecated (
deprecated):true
Rule 16
Exact value (
const):"ntc,ncp15wl333"Deprecated (
deprecated):true
#thermal-sensor-cells — not listed as required here #
Thermal sensor cells if used for thermal sensoring.
Exact value (const): 0
pullup-uv — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Pull-up voltage in micro volts. Must always be specified.
pullup-ohm — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Pull-up resistance in ohms. Must always be specified, even if zero.
pulldown-ohm — required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Pull-down resistance in ohms. Must always be specified, even if zero.
connected-positive — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
Indicates how the thermistor is connected in series with a pull-up and/or a pull-down resistor. See the description above for an illustration. If this flag is NOT specified, the thermistor is assumed to be connected-ground, which usually means a pull-down resistance of zero but complex arrangements are possible.
io-channels — required here #
Maximum number of items (maxItems): 1
IIO ADC channel to read the voltage over the resistor. Must always be specified.
Required in this object (required): "compatible", "pullup-uv", "pullup-ohm", "pulldown-ohm", "io-channels"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
thermistor {
compatible = "murata,ncp18wb473";
io-channels = <&gpadc 0x06>;
pullup-uv = <1800000>;
pullup-ohm = <220000>;
pulldown-ohm = <0>;
#thermal-sensor-cells = <0>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 80: Deprecated "ntc," compatible strings
Line 118: See /schemas/iio/adc/adc.yaml