1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/temperature/adi,ltc2983.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Analog Devices LTC2983 Multi-sensor Temperature system 8 9maintainers: 10 - Nuno Sá <nuno.sa@analog.com> 11 12description: | 13 Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System 14 https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf 15 16properties: 17 compatible: 18 enum: 19 - adi,ltc2983 20 21 reg: 22 maxItems: 1 23 24 interrupts: 25 maxItems: 1 26 27 adi,mux-delay-config-us: 28 description: 29 The LTC2983 performs 2 or 3 internal conversion cycles per temperature 30 result. Each conversion cycle is performed with different excitation and 31 input multiplexer configurations. Prior to each conversion, these 32 excitation circuits and input switch configurations are changed and an 33 internal 1ms delay ensures settling prior to the conversion cycle in most 34 cases. An extra delay can be configured using this property. The value is 35 rounded to nearest 100us. 36 maximum: 255 37 38 adi,filter-notch-freq: 39 description: 40 Set's the default setting of the digital filter. The default is 41 simultaneous 50/60Hz rejection. 42 0 - 50/60Hz rejection 43 1 - 60Hz rejection 44 2 - 50Hz rejection 45 allOf: 46 - $ref: /schemas/types.yaml#/definitions/uint32 47 - minimum: 0 48 maximum: 2 49 50 '#address-cells': 51 const: 1 52 53 '#size-cells': 54 const: 0 55 56patternProperties: 57 "@([1-9]|1[0-9]|20)$": 58 type: object 59 60 properties: 61 reg: 62 description: 63 The channel number. It can be connected to one of the 20 channels of 64 the device. 65 minimum: 1 66 maximum: 20 67 68 adi,sensor-type: 69 description: Identifies the type of sensor connected to the device. 70 $ref: /schemas/types.yaml#/definitions/uint32 71 72 required: 73 - reg 74 - adi,sensor-type 75 76 "^thermocouple@": 77 type: object 78 description: 79 Represents a thermocouple sensor which is connected to one of the device 80 channels. 81 82 properties: 83 adi,sensor-type: 84 description: | 85 1 - Type J Thermocouple 86 2 - Type K Thermocouple 87 3 - Type E Thermocouple 88 4 - Type N Thermocouple 89 5 - Type R Thermocouple 90 6 - Type S Thermocouple 91 7 - Type T Thermocouple 92 8 - Type B Thermocouple 93 9 - Custom Thermocouple 94 allOf: 95 - $ref: /schemas/types.yaml#/definitions/uint32 96 minimum: 1 97 maximum: 9 98 99 adi,single-ended: 100 description: 101 Boolean property which set's the thermocouple as single-ended. 102 type: boolean 103 104 adi,sensor-oc-current-microamp: 105 description: 106 This property set's the pulsed current value applied during 107 open-circuit detect. 108 enum: [10, 100, 500, 1000] 109 110 adi,cold-junction-handle: 111 description: 112 Phandle which points to a sensor object responsible for measuring 113 the thermocouple cold junction temperature. 114 $ref: "/schemas/types.yaml#/definitions/phandle" 115 116 adi,custom-thermocouple: 117 description: 118 This is a table, where each entry should be a pair of 119 voltage(mv)-temperature(K). The entries must be given in nv and uK 120 so that, the original values must be multiplied by 1000000. For 121 more details look at table 69 and 70. 122 Note should be signed, but dtc doesn't currently maintain the 123 sign. 124 allOf: 125 - $ref: /schemas/types.yaml#/definitions/uint64-matrix 126 items: 127 minItems: 3 128 maxItems: 64 129 items: 130 minItems: 2 131 maxItems: 2 132 133 "^diode@": 134 type: object 135 description: 136 Represents a diode sensor which is connected to one of the device 137 channels. 138 139 properties: 140 adi,sensor-type: 141 description: Identifies the sensor as a diode. 142 allOf: 143 - $ref: /schemas/types.yaml#/definitions/uint32 144 const: 28 145 146 adi,single-ended: 147 description: Boolean property which set's the diode as single-ended. 148 type: boolean 149 150 adi,three-conversion-cycles: 151 description: 152 Boolean property which set's three conversion cycles removing 153 parasitic resistance effects between the LTC2983 and the diode. 154 type: boolean 155 156 adi,average-on: 157 description: 158 Boolean property which enables a running average of the diode 159 temperature reading. This reduces the noise when the diode is used 160 as a cold junction temperature element on an isothermal block 161 where temperatures change slowly. 162 type: boolean 163 164 adi,excitation-current-microamp: 165 description: 166 This property controls the magnitude of the excitation current 167 applied to the diode. Depending on the number of conversions 168 cycles, this property will assume different predefined values on 169 each cycle. Just set the value of the first cycle (1l). 170 enum: [10, 20, 40, 80] 171 172 adi,ideal-factor-value: 173 description: 174 This property sets the diode ideality factor. The real value must 175 be multiplied by 1000000 to remove the fractional part. For more 176 information look at table 20 of the datasheet. 177 $ref: /schemas/types.yaml#/definitions/uint32 178 179 "^rtd@": 180 type: object 181 description: 182 Represents a rtd sensor which is connected to one of the device channels. 183 184 properties: 185 reg: 186 minimum: 2 187 maximum: 20 188 189 adi,sensor-type: 190 description: | 191 10 - RTD PT-10 192 11 - RTD PT-50 193 12 - RTD PT-100 194 13 - RTD PT-200 195 14 - RTD PT-500 196 15 - RTD PT-1000 197 16 - RTD PT-1000 (0.00375) 198 17 - RTD NI-120 199 18 - RTD Custom 200 allOf: 201 - $ref: /schemas/types.yaml#/definitions/uint32 202 minimum: 10 203 maximum: 18 204 205 adi,rsense-handle: 206 description: 207 Phandle pointing to a rsense object associated with this RTD. 208 $ref: "/schemas/types.yaml#/definitions/phandle" 209 210 adi,number-of-wires: 211 description: 212 Identifies the number of wires used by the RTD. Setting this 213 property to 5 means 4 wires with Kelvin Rsense. 214 allOf: 215 - $ref: /schemas/types.yaml#/definitions/uint32 216 - enum: [2, 3, 4, 5] 217 218 adi,rsense-share: 219 description: 220 Boolean property which enables Rsense sharing, where one sense 221 resistor is used for multiple 2-, 3-, and/or 4-wire RTDs. 222 type: boolean 223 224 adi,current-rotate: 225 description: 226 Boolean property which enables excitation current rotation to 227 automatically remove parasitic thermocouple effects. Note that 228 this property is not allowed for 2- and 3-wire RTDs. 229 type: boolean 230 231 adi,excitation-current-microamp: 232 description: 233 This property controls the magnitude of the excitation current 234 applied to the RTD. 235 enum: [5, 10, 25, 50, 100, 250, 500, 1000] 236 237 adi,rtd-curve: 238 description: 239 This property set the RTD curve used and the corresponding 240 Callendar-VanDusen constants. Look at table 30 of the datasheet. 241 allOf: 242 - $ref: /schemas/types.yaml#/definitions/uint32 243 - minimum: 0 244 maximum: 3 245 246 adi,custom-rtd: 247 description: 248 This is a table, where each entry should be a pair of 249 resistance(ohm)-temperature(K). The entries added here are in uohm 250 and uK. For more details values look at table 74 and 75. 251 allOf: 252 - $ref: /schemas/types.yaml#/definitions/uint64-matrix 253 items: 254 minItems: 3 255 maxItems: 64 256 items: 257 minItems: 2 258 maxItems: 2 259 260 required: 261 - adi,rsense-handle 262 263 dependencies: 264 adi,current-rotate: [ adi,rsense-share ] 265 266 "^thermistor@": 267 type: object 268 description: 269 Represents a thermistor sensor which is connected to one of the device 270 channels. 271 272 properties: 273 adi,sensor-type: 274 description: 275 19 - Thermistor 44004/44033 2.252kohm at 25°C 276 20 - Thermistor 44005/44030 3kohm at 25°C 277 21 - Thermistor 44007/44034 5kohm at 25°C 278 22 - Thermistor 44006/44031 10kohm at 25°C 279 23 - Thermistor 44008/44032 30kohm at 25°C 280 24 - Thermistor YSI 400 2.252kohm at 25°C 281 25 - Thermistor Spectrum 1003k 1kohm 282 26 - Thermistor Custom Steinhart-Hart 283 27 - Custom Thermistor 284 allOf: 285 - $ref: /schemas/types.yaml#/definitions/uint32 286 minimum: 19 287 maximum: 27 288 289 adi,rsense-handle: 290 description: 291 Phandle pointing to a rsense object associated with this 292 thermistor. 293 $ref: "/schemas/types.yaml#/definitions/phandle" 294 295 adi,single-ended: 296 description: 297 Boolean property which set's the thermistor as single-ended. 298 type: boolean 299 300 adi,rsense-share: 301 description: 302 Boolean property which enables Rsense sharing, where one sense 303 resistor is used for multiple thermistors. Note that this property 304 is ignored if adi,single-ended is set. 305 type: boolean 306 307 adi,current-rotate: 308 description: 309 Boolean property which enables excitation current rotation to 310 automatically remove parasitic thermocouple effects. 311 type: boolean 312 313 adi,excitation-current-nanoamp: 314 description: 315 This property controls the magnitude of the excitation current 316 applied to the thermistor. Value 0 set's the sensor in auto-range 317 mode. 318 allOf: 319 - $ref: /schemas/types.yaml#/definitions/uint32 320 - enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 321 250000, 500000, 1000000] 322 323 adi,custom-thermistor: 324 description: 325 This is a table, where each entry should be a pair of 326 resistance(ohm)-temperature(K). The entries added here are in uohm 327 and uK only for custom thermistors. For more details look at table 328 78 and 79. 329 allOf: 330 - $ref: /schemas/types.yaml#/definitions/uint64-matrix 331 items: 332 minItems: 3 333 maxItems: 64 334 items: 335 minItems: 2 336 maxItems: 2 337 338 adi,custom-steinhart: 339 description: 340 Steinhart-Hart coefficients are also supported and can 341 be programmed into the device memory using this property. For 342 Steinhart sensors the coefficients are given in the raw 343 format. Look at table 82 for more information. 344 allOf: 345 - $ref: /schemas/types.yaml#/definitions/uint32-array 346 items: 347 minItems: 6 348 maxItems: 6 349 350 required: 351 - adi,rsense-handle 352 353 dependencies: 354 adi,current-rotate: [ adi,rsense-share ] 355 356 "^adc@": 357 type: object 358 description: Represents a channel which is being used as a direct adc. 359 360 properties: 361 adi,sensor-type: 362 description: Identifies the sensor as a direct adc. 363 allOf: 364 - $ref: /schemas/types.yaml#/definitions/uint32 365 const: 30 366 367 adi,single-ended: 368 description: Boolean property which set's the adc as single-ended. 369 type: boolean 370 371 "^rsense@": 372 type: object 373 description: 374 Represents a rsense which is connected to one of the device channels. 375 Rsense are used by thermistors and RTD's. 376 377 properties: 378 reg: 379 minimum: 2 380 maximum: 20 381 382 adi,sensor-type: 383 description: Identifies the sensor as a rsense. 384 allOf: 385 - $ref: /schemas/types.yaml#/definitions/uint32 386 const: 29 387 388 adi,rsense-val-milli-ohms: 389 description: 390 Sets the value of the sense resistor. Look at table 20 of the 391 datasheet for information. 392 393 required: 394 - adi,rsense-val-milli-ohms 395 396required: 397 - compatible 398 - reg 399 - interrupts 400 401examples: 402 - | 403 #include <dt-bindings/interrupt-controller/irq.h> 404 spi { 405 #address-cells = <1>; 406 #size-cells = <0>; 407 408 sensor_ltc2983: ltc2983@0 { 409 compatible = "adi,ltc2983"; 410 reg = <0>; 411 412 #address-cells = <1>; 413 #size-cells = <0>; 414 415 interrupts = <20 IRQ_TYPE_EDGE_RISING>; 416 interrupt-parent = <&gpio>; 417 418 thermocouple@18 { 419 reg = <18>; 420 adi,sensor-type = <8>; //Type B 421 adi,sensor-oc-current-microamp = <10>; 422 adi,cold-junction-handle = <&diode5>; 423 }; 424 425 diode5: diode@5 { 426 reg = <5>; 427 adi,sensor-type = <28>; 428 }; 429 430 rsense2: rsense@2 { 431 reg = <2>; 432 adi,sensor-type = <29>; 433 adi,rsense-val-milli-ohms = <1200000>; //1.2Kohms 434 }; 435 436 rtd@14 { 437 reg = <14>; 438 adi,sensor-type = <15>; //PT1000 439 /*2-wire, internal gnd, no current rotation*/ 440 adi,number-of-wires = <2>; 441 adi,rsense-share; 442 adi,excitation-current-microamp = <500>; 443 adi,rsense-handle = <&rsense2>; 444 }; 445 446 adc@10 { 447 reg = <10>; 448 adi,sensor-type = <30>; 449 adi,single-ended; 450 }; 451 452 thermistor@12 { 453 reg = <12>; 454 adi,sensor-type = <26>; //Steinhart 455 adi,rsense-handle = <&rsense2>; 456 adi,custom-steinhart = <0x00F371EC 0x12345678 457 0x2C0F8733 0x10018C66 0xA0FEACCD 458 0x90021D99>; //6 entries 459 }; 460 461 thermocouple@20 { 462 reg = <20>; 463 adi,sensor-type = <9>; //custom thermocouple 464 adi,single-ended; 465 adi,custom-thermocouple = /bits/ 64 466 <(-50220000) 0 467 (-30200000) 99100000 468 (-5300000) 135400000 469 0 273150000 470 40200000 361200000 471 55300000 522100000 472 88300000 720300000 473 132200000 811200000 474 188700000 922500000 475 460400000 1000000000>; //10 pairs 476 }; 477 478 }; 479 }; 480... 481