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