File Index
Files and directories
Sign in
FILE

ntc-thermistor.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/hwmon/ntc-thermistor.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2---
  3$id: http://devicetree.org/schemas/hwmon/ntc-thermistor.yaml#
  4$schema: http://devicetree.org/meta-schemas/core.yaml#
  5
  6title: NTC thermistor temperature sensors
  7
  8maintainers:
  9  - Linus Walleij <linusw@kernel.org>
 10
 11description: |
 12  Thermistors with negative temperature coefficient (NTC) are resistors that
 13  vary in resistance in an often non-linear way in relation to temperature.
 14  The negative temperature coefficient means that the resistance decreases
 15  as the temperature rises. Since the relationship between resistance and
 16  temperature is non-linear, software drivers most often need to use a look
 17  up table and interpolation to get from resistance to temperature.
 18
 19  When used in practice, a thermistor is often connected between ground, a
 20  pull-up resistor or/and a pull-down resistor and a fixed voltage like this:
 21
 22      + e.g. 5V = pull-up voltage (puv)
 23      |
 24     +-+
 25     | |
 26     | | Pull-up resistor
 27     | | (puo)
 28     +-+
 29      |-------------------------o
 30     +-+ |                      ^
 31     | |/                       |
 32     | /                        |
 33     |/| Thermistor             | Measured voltage (mv)
 34     / |                        | "connected ground"
 35    /| |                        |
 36     +-+                        |
 37      |-------------------------o
 38     +-+                        ^
 39     | |                        |
 40     | | Pull-down resistor     | Measured voltage (mv)
 41     | | (pdo)                  | "connected positive"
 42     +-+                        |
 43      |                         |
 44      |                         v
 45      + GND                     GND
 46
 47  The arrangements of where we measure the voltage over the thermistor are
 48  called "connected ground" and "connected positive" and shall be understood as
 49  the cases when either pull-up or pull-down resistance is zero.
 50
 51  If the pull-up resistance is 0 one end of the thermistor is connected to the
 52  positive voltage and we get the thermistor on top of a pull-down resistor
 53  and we take the measure between the thermistor and the pull-down resistor.
 54
 55  Conversely if the pull-down resistance is zero, one end of the thermistor is
 56  connected to ground and we get the thermistor under the pull-up resistor
 57  and we take the measure between the pull-up resistor and the thermistor.
 58
 59  We can use both pull-up and pull-down resistors at the same time, and then
 60  the figure illustrates where the voltage will be measured for the "connected
 61  ground" and "connected positive" cases.
 62
 63properties:
 64  $nodename:
 65    pattern: "^thermistor(.*)?$"
 66
 67  compatible:
 68    oneOf:
 69      - const: epcos,b57330v2103
 70      - const: epcos,b57891s0103
 71      - const: murata,ncp15wb473
 72      - const: murata,ncp18wb473
 73      - const: murata,ncp21wb473
 74      - const: murata,ncp03wb473
 75      - const: murata,ncp15wl333
 76      - const: murata,ncp03wf104
 77      - const: murata,ncp15xh103
 78      - const: murata,ncp18wm474
 79      - const: samsung,1404-001221
 80      # Deprecated "ntc," compatible strings
 81      - const: ntc,ncp15wb473
 82        deprecated: true
 83      - const: ntc,ncp18wb473
 84        deprecated: true
 85      - const: ntc,ncp21wb473
 86        deprecated: true
 87      - const: ntc,ncp03wb473
 88        deprecated: true
 89      - const: ntc,ncp15wl333
 90        deprecated: true
 91
 92  "#thermal-sensor-cells":
 93    description: Thermal sensor cells if used for thermal sensoring.
 94    const: 0
 95
 96  pullup-uv:
 97    $ref: /schemas/types.yaml#/definitions/uint32
 98    description: Pull-up voltage in micro volts. Must always be specified.
 99
100  pullup-ohm:
101    $ref: /schemas/types.yaml#/definitions/uint32
102    description: Pull-up resistance in ohms. Must always be specified, even
103      if zero.
104
105  pulldown-ohm:
106    $ref: /schemas/types.yaml#/definitions/uint32
107    description: Pull-down resistance in ohms. Must always be specified, even
108      if zero.
109
110  connected-positive:
111    $ref: /schemas/types.yaml#/definitions/flag
112    description: Indicates how the thermistor is connected in series with
113      a pull-up and/or a pull-down resistor. See the description above for
114      an illustration. If this flag is NOT specified, the thermistor is assumed
115      to be connected-ground, which usually means a pull-down resistance of
116      zero but complex arrangements are possible.
117
118  # See /schemas/iio/adc/adc.yaml
119  io-channels:
120    maxItems: 1
121    description: IIO ADC channel to read the voltage over the resistor. Must
122      always be specified.
123
124required:
125  - compatible
126  - pullup-uv
127  - pullup-ohm
128  - pulldown-ohm
129  - io-channels
130
131additionalProperties: false
132
133examples:
134  - |
135    thermistor {
136      compatible = "murata,ncp18wb473";
137      io-channels = <&gpadc 0x06>;
138      pullup-uv = <1800000>;
139      pullup-ohm = <220000>;
140      pulldown-ohm = <0>;
141      #thermal-sensor-cells = <0>;
142    };
~/ Read-only file preview.