General Purpose Analog To Digital Converter (ADC) based thermal sensor
Schema identifier ($id): "http://devicetree.org/schemas/thermal/generic-adc-thermal.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Laxman Dewangan <ldewangan@nvidia.com>"
On some of platforms, thermal sensor like thermistors are connected to one of ADC channel and sensor resistance is read via voltage across the sensor resistor. The voltage read across the sensor is mapped to temperature using voltage-temperature lookup table.
Shared schema rule ($ref): thermal-sensor.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "generic-adc-thermal"
#thermal-sensor-cells — not listed as required here #
Exact value (const): 0
io-channels — required here #
Maximum number of items (maxItems): 1
io-channel-names — required here #
Exact value (const): "sensor-channel"
temperature-lookup-table — not listed as required here #
Lookup table to map the relation between ADC value and temperature. When ADC is read, the value is looked up on the table to get the equivalent temperature.
If not specified, driver assumes the ADC channel gives milliCelsius directly.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/int32-matrix
Array item rules (items) #
Array item rules (
items)Item 1
Temperature in milliCelsius
Item 2
ADC read value
Required in this object (required): "compatible", "io-channels", "io-channel-names"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/thermal/thermal.h>
thermal-sensor {
compatible = "generic-adc-thermal";
#thermal-sensor-cells = <0>;
io-channels = <&ads1015 1>;
io-channel-names = "sensor-channel";
temperature-lookup-table = <
(-40000) 2578
(-39000) 2577
(-38000) 2576
(-37000) 2575
(-36000) 2574
(-35000) 2573
(-34000) 2572
(-33000) 2571
(-32000) 2569
(-31000) 2568
(-30000) 2567
/* skip */
118000 254
119000 247
120000 240
121000 233
122000 226
123000 220
124000 214
125000 208>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause