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