1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/hwmon/national,lm90.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: LM90 series thermometer 8 9maintainers: 10 - Jean Delvare <jdelvare@suse.com> 11 - Guenter Roeck <linux@roeck-us.net> 12 13properties: 14 compatible: 15 enum: 16 - adi,adm1032 17 - adi,adt7461 18 - adi,adt7461a 19 - adi,adt7481 20 - dallas,max6646 21 - dallas,max6647 22 - dallas,max6649 23 - dallas,max6657 24 - dallas,max6658 25 - dallas,max6659 26 - dallas,max6680 27 - dallas,max6681 28 - dallas,max6695 29 - dallas,max6696 30 - gmt,g781 31 - national,lm86 32 - national,lm89 33 - national,lm90 34 - national,lm99 35 - nuvoton,nct7716 36 - nuvoton,nct7717 37 - nuvoton,nct7718 38 - nxp,sa56004 39 - onnn,nct1008 40 - ti,tmp451 41 - ti,tmp461 42 - winbond,w83l771 43 44 45 interrupts: 46 items: 47 - description: | 48 Single interrupt specifier which describes the LM90 "-ALERT" pin 49 output. 50 51 reg: 52 maxItems: 1 53 54 "#thermal-sensor-cells": 55 const: 1 56 57 '#address-cells': 58 const: 1 59 60 '#size-cells': 61 const: 0 62 63 vcc-supply: 64 description: phandle to the regulator that provides the +VCC supply 65 66 ti,extended-range-enable: 67 description: Set to enable extended range temperature. 68 type: boolean 69 70required: 71 - compatible 72 - reg 73 74patternProperties: 75 "^channel@([0-2])$": 76 type: object 77 description: Represents channels of the device and their specific configuration. 78 79 properties: 80 reg: 81 description: The channel number. 0 is local channel, 1-2 are remote channels. 82 items: 83 minimum: 0 84 maximum: 2 85 86 label: 87 description: A descriptive name for this channel, like "ambient" or "psu". 88 89 temperature-offset-millicelsius: 90 description: Temperature offset to be added to or subtracted from remote temperature measurements. 91 92 required: 93 - reg 94 95 additionalProperties: false 96 97allOf: 98 - if: 99 not: 100 properties: 101 compatible: 102 contains: 103 enum: 104 - adi,adt7461 105 - adi,adt7461a 106 - adi,adt7481 107 - ti,tmp451 108 - ti,tmp461 109 then: 110 properties: 111 ti,extended-range-enable: false 112 113 - if: 114 properties: 115 compatible: 116 contains: 117 enum: 118 - dallas,max6646 119 - dallas,max6647 120 - dallas,max6649 121 - dallas,max6657 122 - dallas,max6658 123 - dallas,max6659 124 - dallas,max6695 125 - dallas,max6696 126 - nuvoton,nct7716 127 - nuvoton,nct7717 128 then: 129 patternProperties: 130 "^channel@([0-2])$": 131 properties: 132 temperature-offset-millicelsius: false 133 134 - if: 135 properties: 136 compatible: 137 contains: 138 enum: 139 - adi,adt7461 140 - adi,adt7461a 141 - adi,adt7481 142 - onnn,nct1008 143 then: 144 patternProperties: 145 "^channel@([0-2])$": 146 properties: 147 temperature-offset-millicelsius: 148 maximum: 127750 149 150 - if: 151 properties: 152 compatible: 153 contains: 154 enum: 155 - adi,adm1032 156 - dallas,max6680 157 - dallas,max6681 158 - gmt,g781 159 - national,lm86 160 - national,lm89 161 - national,lm90 162 - national,lm99 163 - nuvoton,nct7718 164 - nxp,sa56004 165 - winbond,w83l771 166 then: 167 patternProperties: 168 "^channel@([0-2])$": 169 properties: 170 temperature-offset-millicelsius: 171 maximum: 127875 172 173 - if: 174 properties: 175 compatible: 176 contains: 177 enum: 178 - ti,tmp451 179 - ti,tmp461 180 then: 181 patternProperties: 182 "^channel@([0-2])$": 183 properties: 184 temperature-offset-millicelsius: 185 maximum: 127937 186 187additionalProperties: false 188 189examples: 190 - | 191 #include <dt-bindings/interrupt-controller/irq.h> 192 193 i2c { 194 #address-cells = <1>; 195 #size-cells = <0>; 196 197 sensor@4c { 198 compatible = "onnn,nct1008"; 199 reg = <0x4c>; 200 vcc-supply = <&palmas_ldo6_reg>; 201 interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 202 #thermal-sensor-cells = <1>; 203 }; 204 }; 205 - | 206 i2c { 207 #address-cells = <1>; 208 #size-cells = <0>; 209 210 sensor@4c { 211 compatible = "adi,adt7481"; 212 reg = <0x4c>; 213 #address-cells = <1>; 214 #size-cells = <0>; 215 216 channel@0 { 217 reg = <0x0>; 218 label = "local"; 219 }; 220 221 channel@1 { 222 reg = <0x1>; 223 label = "front"; 224 temperature-offset-millicelsius = <4000>; 225 }; 226 227 channel@2 { 228 reg = <0x2>; 229 label = "back"; 230 temperature-offset-millicelsius = <750>; 231 }; 232 }; 233 }; 234