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, LTC2986, LTM2985 Multi-sensor Temperature system 8 9maintainers: 10 - Nuno Sá <nuno.sa@analog.com> 11 12description: | 13 Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital 14 Temperature Measurement Systems 15 16 https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf 17 https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf 18 https://www.analog.com/media/en/technical-documentation/data-sheets/29861fa.pdf 19 https://www.analog.com/media/en/technical-documentation/data-sheets/ltm2985.pdf 20 21properties: 22 compatible: 23 oneOf: 24 - enum: 25 - adi,ltc2983 26 - adi,ltc2986 27 - adi,ltm2985 28 - items: 29 - const: adi,ltc2984 30 - const: adi,ltc2983 31 32 reg: 33 maxItems: 1 34 35 interrupts: 36 maxItems: 1 37 38 adi,mux-delay-config-us: 39 description: | 40 Extra delay prior to each conversion, in addition to the internal 1ms 41 delay, for the multiplexer to switch input configurations and 42 excitation values. 43 44 This property is supposed to be in microseconds, but to maintain 45 compatibility, this value will be multiplied by 100 before usage. 46 maximum: 255 47 default: 0 48 49 adi,filter-notch-freq: 50 description: 51 Notch frequency of the digital filter. 52 0 - 50/60Hz rejection 53 1 - 60Hz rejection 54 2 - 50Hz rejection 55 $ref: /schemas/types.yaml#/definitions/uint32 56 minimum: 0 57 maximum: 2 58 default: 0 59 60 '#address-cells': 61 const: 1 62 63 '#size-cells': 64 const: 0 65 66patternProperties: 67 "@([0-9a-f]+)$": 68 type: object 69 description: Sensor. 70 71 properties: 72 reg: 73 description: 74 Channel number. Connects the sensor to the channel with this number 75 of the device. 76 minimum: 1 77 maximum: 20 78 79 adi,sensor-type: 80 description: Type of sensor connected to the device. 81 $ref: /schemas/types.yaml#/definitions/uint32 82 83 required: 84 - reg 85 - adi,sensor-type 86 87 "^thermocouple@": 88 type: object 89 description: Thermocouple sensor. 90 91 properties: 92 adi,sensor-type: 93 description: | 94 1 - Type J Thermocouple 95 2 - Type K Thermocouple 96 3 - Type E Thermocouple 97 4 - Type N Thermocouple 98 5 - Type R Thermocouple 99 6 - Type S Thermocouple 100 7 - Type T Thermocouple 101 8 - Type B Thermocouple 102 9 - Custom Thermocouple 103 $ref: /schemas/types.yaml#/definitions/uint32 104 minimum: 1 105 maximum: 9 106 107 adi,single-ended: 108 description: Whether the sensor is single-ended. 109 type: boolean 110 111 adi,sensor-oc-current-microamp: 112 description: Pulsed current value applied during open-circuit detect. 113 enum: [10, 100, 500, 1000] 114 default: 10 115 116 adi,cold-junction-handle: 117 description: 118 Sensor responsible for measuring the thermocouple cold junction 119 temperature. 120 $ref: /schemas/types.yaml#/definitions/phandle 121 122 adi,custom-thermocouple: 123 description: 124 Used for digitizing custom thermocouples. 125 See Page 59 of the datasheet. 126 $ref: /schemas/types.yaml#/definitions/uint64-matrix 127 minItems: 3 128 maxItems: 64 129 items: 130 items: 131 - description: Voltage point in nV, signed. 132 - description: Temperature point in uK. 133 134 allOf: 135 - if: 136 properties: 137 adi,sensor-type: 138 const: 9 139 then: 140 required: 141 - adi,custom-thermocouple 142 143 "^diode@": 144 type: object 145 description: Diode sensor. 146 147 properties: 148 adi,sensor-type: 149 description: Sensor type for diodes. 150 $ref: /schemas/types.yaml#/definitions/uint32 151 const: 28 152 153 adi,single-ended: 154 description: Whether the sensor is single-ended. 155 type: boolean 156 157 adi,three-conversion-cycles: 158 description: 159 Whether to use three conversion cycles to remove parasitic 160 resistance between the device and the diode. 161 type: boolean 162 163 adi,average-on: 164 description: 165 Whether to use a running average of the diode temperature 166 reading to reduce the noise when the diode is used as a cold 167 junction temperature element on an isothermal block where 168 temperatures change slowly. 169 type: boolean 170 171 adi,excitation-current-microamp: 172 description: 173 Magnitude of the 1l excitation current applied to the diode. 174 4l excitation current will be 4 times this value, and 8l 175 excitation current will be 8 times value. 176 enum: [10, 20, 40, 80] 177 default: 10 178 179 adi,ideal-factor-value: 180 description: 181 Diode ideality factor. 182 Set this property to 1000000 times the real value. 183 $ref: /schemas/types.yaml#/definitions/uint32 184 default: 0 185 186 "^rtd@": 187 type: object 188 description: RTD sensor. 189 190 properties: 191 reg: 192 minimum: 2 193 maximum: 20 194 195 adi,sensor-type: 196 description: | 197 10 - RTD PT-10 198 11 - RTD PT-50 199 12 - RTD PT-100 200 13 - RTD PT-200 201 14 - RTD PT-500 202 15 - RTD PT-1000 203 16 - RTD PT-1000 (0.00375) 204 17 - RTD NI-120 205 18 - RTD Custom 206 $ref: /schemas/types.yaml#/definitions/uint32 207 minimum: 10 208 maximum: 18 209 210 adi,rsense-handle: 211 description: Associated sense resistor sensor. 212 $ref: /schemas/types.yaml#/definitions/phandle 213 214 adi,number-of-wires: 215 description: 216 Number of wires used by the RTD. 217 5 means 4 wires with Kelvin sense resistor. 218 $ref: /schemas/types.yaml#/definitions/uint32 219 enum: [2, 3, 4, 5] 220 default: 2 221 222 adi,rsense-share: 223 description: 224 Whether to enable sense resistor sharing, where one sense 225 resistor is used by multiple sensors. 226 type: boolean 227 228 adi,excitation-current-microamp: 229 description: Excitation current applied to the RTD. 230 enum: [5, 10, 25, 50, 100, 250, 500, 1000] 231 default: 5 232 233 adi,rtd-curve: 234 description: | 235 RTD curve and the corresponding Callendar-VanDusen constants. 236 0 - European 237 1 - American 238 2 - Japanese 239 3 - ITS-90 240 $ref: /schemas/types.yaml#/definitions/uint32 241 minimum: 0 242 maximum: 3 243 default: 0 244 245 adi,custom-rtd: 246 description: 247 Used for digitizing custom RTDs. 248 See Page 62 of the datasheet. 249 $ref: /schemas/types.yaml#/definitions/uint64-matrix 250 minItems: 3 251 maxItems: 64 252 items: 253 items: 254 - description: Resistance point in uOhms. 255 - description: Temperature point in uK. 256 257 required: 258 - adi,rsense-handle 259 260 allOf: 261 - if: 262 properties: 263 adi,number-of-wires: 264 const: 4 265 then: 266 properties: 267 adi,current-rotate: 268 description: 269 Whether to enable excitation current rotation to automatically 270 remove parasitic thermocouple effects. 271 type: boolean 272 273 dependencies: 274 adi,current-rotate: [ "adi,rsense-share" ] 275 276 - if: 277 properties: 278 adi,sensor-type: 279 const: 18 280 then: 281 required: 282 - adi,custom-rtd 283 284 "^thermistor@": 285 type: object 286 description: Thermistor sensor. 287 288 properties: 289 adi,sensor-type: 290 description: 291 19 - Thermistor 44004/44033 2.252kohm at 25°C 292 20 - Thermistor 44005/44030 3kohm at 25°C 293 21 - Thermistor 44007/44034 5kohm at 25°C 294 22 - Thermistor 44006/44031 10kohm at 25°C 295 23 - Thermistor 44008/44032 30kohm at 25°C 296 24 - Thermistor YSI 400 2.252kohm at 25°C 297 25 - Thermistor Spectrum 1003k 1kohm 298 26 - Thermistor Custom Steinhart-Hart 299 27 - Custom Thermistor 300 $ref: /schemas/types.yaml#/definitions/uint32 301 minimum: 19 302 maximum: 27 303 304 adi,rsense-handle: 305 description: Associated sense resistor sensor. 306 $ref: /schemas/types.yaml#/definitions/phandle 307 308 adi,single-ended: 309 description: Whether the sensor is single-ended. 310 type: boolean 311 312 adi,rsense-share: 313 description: 314 Whether to enable sense resistor sharing, where one sense 315 resistor is used by multiple sensors. 316 type: boolean 317 318 adi,current-rotate: 319 description: 320 Whether to enable excitation current rotation to automatically 321 remove parasitic thermocouple effects. 322 type: boolean 323 324 adi,excitation-current-nanoamp: 325 description: 326 Excitation current applied to the thermistor. 327 0 sets the sensor in auto-range mode. 328 enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000, 329 500000, 1000000] 330 default: 0 331 332 adi,custom-thermistor: 333 description: 334 Used for digitizing custom thermistors. 335 See Page 65 of the datasheet. 336 $ref: /schemas/types.yaml#/definitions/uint64-matrix 337 minItems: 3 338 maxItems: 64 339 items: 340 items: 341 - description: Resistance point in uOhms. 342 - description: Temperature point in uK. 343 344 adi,custom-steinhart: 345 description: 346 Steinhart-Hart coefficients in raw format, used for digitizing 347 custom thermistors. 348 See Page 68 of the datasheet. 349 $ref: /schemas/types.yaml#/definitions/uint32-array 350 minItems: 6 351 maxItems: 6 352 353 required: 354 - adi,rsense-handle 355 356 dependencies: 357 adi,current-rotate: [ "adi,rsense-share" ] 358 359 allOf: 360 - if: 361 properties: 362 adi,sensor-type: 363 const: 26 364 then: 365 properties: 366 adi,excitation-current-nanoamp: 367 enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 368 250000, 500000, 1000000] 369 default: 1000 370 required: 371 - adi,custom-steinhart 372 - if: 373 properties: 374 adi,sensor-type: 375 const: 27 376 then: 377 properties: 378 adi,excitation-current-nanoamp: 379 enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 380 250000, 500000, 1000000] 381 default: 1000 382 required: 383 - adi,custom-thermistor 384 385 "^adc@": 386 type: object 387 description: Direct ADC sensor. 388 389 properties: 390 adi,sensor-type: 391 description: Sensor type for direct ADC sensors. 392 $ref: /schemas/types.yaml#/definitions/uint32 393 const: 30 394 395 adi,single-ended: 396 description: Whether the sensor is single-ended. 397 type: boolean 398 399 "^temp@": 400 type: object 401 description: Active analog temperature sensor. 402 403 properties: 404 adi,sensor-type: 405 description: Sensor type for active analog temperature sensors. 406 $ref: /schemas/types.yaml#/definitions/uint32 407 const: 31 408 409 adi,single-ended: 410 description: Whether the sensor is single-ended. 411 type: boolean 412 413 adi,custom-temp: 414 description: 415 Used for digitizing active analog temperature sensors. 416 See Page 67 of the LTM2985 datasheet. 417 $ref: /schemas/types.yaml#/definitions/uint64-matrix 418 minItems: 3 419 maxItems: 64 420 items: 421 items: 422 - description: Voltage point in nV, signed. 423 - description: Temperature point in uK. 424 425 required: 426 - adi,custom-temp 427 428 "^rsense@": 429 type: object 430 description: Sense resistor sensor. 431 432 properties: 433 reg: 434 minimum: 2 435 maximum: 20 436 437 adi,sensor-type: 438 description: Sensor type sense resistor sensors. 439 $ref: /schemas/types.yaml#/definitions/uint32 440 const: 29 441 442 adi,rsense-val-milli-ohms: 443 description: Value of the sense resistor. 444 445 required: 446 - adi,rsense-val-milli-ohms 447 448required: 449 - compatible 450 - reg 451 - interrupts 452 453additionalProperties: false 454 455allOf: 456 - if: 457 properties: 458 compatible: 459 contains: 460 enum: 461 - adi,ltc2983 462 - adi,ltc2984 463 then: 464 patternProperties: 465 "^temp@": false 466 467examples: 468 - | 469 #include <dt-bindings/interrupt-controller/irq.h> 470 spi { 471 #address-cells = <1>; 472 #size-cells = <0>; 473 474 temperature-sensor@0 { 475 compatible = "adi,ltc2983"; 476 reg = <0>; 477 478 #address-cells = <1>; 479 #size-cells = <0>; 480 481 interrupts = <20 IRQ_TYPE_EDGE_RISING>; 482 interrupt-parent = <&gpio>; 483 484 thermocouple@18 { 485 reg = <18>; 486 adi,sensor-type = <8>; //Type B 487 adi,sensor-oc-current-microamp = <10>; 488 adi,cold-junction-handle = <&diode5>; 489 }; 490 491 diode5: diode@5 { 492 reg = <5>; 493 adi,sensor-type = <28>; 494 }; 495 496 rsense2: rsense@2 { 497 reg = <2>; 498 adi,sensor-type = <29>; 499 adi,rsense-val-milli-ohms = <1200000>; //1.2Kohms 500 }; 501 502 rtd@14 { 503 reg = <14>; 504 adi,sensor-type = <15>; //PT1000 505 /*2-wire, internal gnd, no current rotation*/ 506 adi,number-of-wires = <2>; 507 adi,rsense-share; 508 adi,excitation-current-microamp = <500>; 509 adi,rsense-handle = <&rsense2>; 510 }; 511 512 adc@10 { 513 reg = <10>; 514 adi,sensor-type = <30>; 515 adi,single-ended; 516 }; 517 518 thermistor@12 { 519 reg = <12>; 520 adi,sensor-type = <26>; //Steinhart 521 adi,rsense-handle = <&rsense2>; 522 adi,custom-steinhart = <0x00f371ec 0x12345678 523 0x2c0f8733 0x10018c66 0xa0feaccd 524 0x90021d99>; //6 entries 525 }; 526 527 thermocouple@20 { 528 reg = <20>; 529 adi,sensor-type = <9>; //custom thermocouple 530 adi,single-ended; 531 adi,custom-thermocouple = 532 /bits/ 64 <(-50220000) 0>, 533 /bits/ 64 <(-30200000) 99100000>, 534 /bits/ 64 <(-5300000) 135400000>, 535 /bits/ 64 <0 273150000>, 536 /bits/ 64 <40200000 361200000>, 537 /bits/ 64 <55300000 522100000>, 538 /bits/ 64 <88300000 720300000>, 539 /bits/ 64 <132200000 811200000>, 540 /bits/ 64 <188700000 922500000>, 541 /bits/ 64 <460400000 1000000000>; //10 pairs 542 }; 543 }; 544 }; 545... 546