Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/thermal/generic-adc-thermal.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: General Purpose Analog To Digital Converter (ADC) based thermal sensor
8
9maintainers:
10 - Laxman Dewangan <ldewangan@nvidia.com>
11
12description:
13 On some of platforms, thermal sensor like thermistors are connected to
14 one of ADC channel and sensor resistance is read via voltage across the
15 sensor resistor. The voltage read across the sensor is mapped to
16 temperature using voltage-temperature lookup table.
17
18$ref: thermal-sensor.yaml#
19
20properties:
21 compatible:
22 const: generic-adc-thermal
23
24 '#thermal-sensor-cells':
25 const: 0
26
27 io-channels:
28 maxItems: 1
29
30 io-channel-names:
31 const: sensor-channel
32
33 temperature-lookup-table:
34 description: |
35 Lookup table to map the relation between ADC value and temperature.
36 When ADC is read, the value is looked up on the table to get the
37 equivalent temperature.
38
39 If not specified, driver assumes the ADC channel gives milliCelsius
40 directly.
41 $ref: /schemas/types.yaml#/definitions/int32-matrix
42 items:
43 items:
44 - description: Temperature in milliCelsius
45 - description: ADC read value
46
47required:
48 - compatible
49 - io-channels
50 - io-channel-names
51
52unevaluatedProperties: false
53
54examples:
55 - |
56 #include <dt-bindings/thermal/thermal.h>
57
58 thermal-sensor {
59 compatible = "generic-adc-thermal";
60 #thermal-sensor-cells = <0>;
61 io-channels = <&ads1015 1>;
62 io-channel-names = "sensor-channel";
63 temperature-lookup-table = <
64 (-40000) 2578
65 (-39000) 2577
66 (-38000) 2576
67 (-37000) 2575
68 (-36000) 2574
69 (-35000) 2573
70 (-34000) 2572
71 (-33000) 2571
72 (-32000) 2569
73 (-31000) 2568
74 (-30000) 2567
75 /* skip */
76 118000 254
77 119000 247
78 120000 240
79 121000 233
80 122000 226
81 123000 220
82 124000 214
83 125000 208>;
84 };
85...