dt-bindings: iio: adi,ltc2983: Add missing quotes on dependencies
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / iio / temperature / adi,ltc2983.yaml
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
7 title: Analog Devices LTC2983 Multi-sensor Temperature system
8
9 maintainers:
10   - Nuno Sá <nuno.sa@analog.com>
11
12 description: |
13   Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System
14   https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf
15
16 properties:
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
56 patternProperties:
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         minItems: 3
127         maxItems: 64
128         items:
129           minItems: 2
130           maxItems: 2
131
132   "^diode@":
133     type: object
134     description:
135       Represents a diode sensor which is connected to one of the device
136       channels.
137
138     properties:
139       adi,sensor-type:
140         description: Identifies the sensor as a diode.
141         allOf:
142           - $ref: /schemas/types.yaml#/definitions/uint32
143         const: 28
144
145       adi,single-ended:
146         description: Boolean property which set's the diode as single-ended.
147         type: boolean
148
149       adi,three-conversion-cycles:
150         description:
151           Boolean property which set's three conversion cycles removing
152           parasitic resistance effects between the LTC2983 and the diode.
153         type: boolean
154
155       adi,average-on:
156         description:
157           Boolean property which enables a running average of the diode
158           temperature reading. This reduces the noise when the diode is used
159           as a cold junction temperature element on an isothermal block
160           where temperatures change slowly.
161         type: boolean
162
163       adi,excitation-current-microamp:
164         description:
165           This property controls the magnitude of the excitation current
166           applied to the diode. Depending on the number of conversions
167           cycles, this property will assume different predefined values on
168           each cycle. Just set the value of the first cycle (1l).
169         enum: [10, 20, 40, 80]
170
171       adi,ideal-factor-value:
172         description:
173           This property sets the diode ideality factor. The real value must
174           be multiplied by 1000000 to remove the fractional part. For more
175           information look at table 20 of the datasheet.
176         $ref: /schemas/types.yaml#/definitions/uint32
177
178   "^rtd@":
179     type: object
180     description:
181       Represents a rtd sensor which is connected to one of the device channels.
182
183     properties:
184       reg:
185         minimum: 2
186         maximum: 20
187
188       adi,sensor-type:
189         description: |
190           10 - RTD PT-10
191           11 - RTD PT-50
192           12 - RTD PT-100
193           13 - RTD PT-200
194           14 - RTD PT-500
195           15 - RTD PT-1000
196           16 - RTD PT-1000 (0.00375)
197           17 - RTD NI-120
198           18 - RTD Custom
199         allOf:
200           - $ref: /schemas/types.yaml#/definitions/uint32
201         minimum: 10
202         maximum: 18
203
204       adi,rsense-handle:
205         description:
206           Phandle pointing to a rsense object associated with this RTD.
207         $ref: "/schemas/types.yaml#/definitions/phandle"
208
209       adi,number-of-wires:
210         description:
211           Identifies the number of wires used by the RTD. Setting this
212           property to 5 means 4 wires with Kelvin Rsense.
213         allOf:
214           - $ref: /schemas/types.yaml#/definitions/uint32
215           - enum: [2, 3, 4, 5]
216
217       adi,rsense-share:
218         description:
219           Boolean property which enables Rsense sharing, where one sense
220           resistor is used for multiple 2-, 3-, and/or 4-wire RTDs.
221         type: boolean
222
223       adi,current-rotate:
224         description:
225           Boolean property which enables excitation current rotation to
226           automatically remove parasitic thermocouple effects. Note that
227           this property is not allowed for 2- and 3-wire RTDs.
228         type: boolean
229
230       adi,excitation-current-microamp:
231         description:
232           This property controls the magnitude of the excitation current
233           applied to the RTD.
234         enum: [5, 10, 25, 50, 100, 250, 500, 1000]
235
236       adi,rtd-curve:
237         description:
238           This property set the RTD curve used and the corresponding
239           Callendar-VanDusen constants. Look at table 30 of the datasheet.
240         allOf:
241           - $ref: /schemas/types.yaml#/definitions/uint32
242           - minimum: 0
243             maximum: 3
244
245       adi,custom-rtd:
246         description:
247           This is a table, where each entry should be a pair of
248           resistance(ohm)-temperature(K). The entries added here are in uohm
249           and uK. For more details values look at table 74 and 75.
250         allOf:
251           - $ref: /schemas/types.yaml#/definitions/uint64-matrix
252         items:
253           minItems: 3
254           maxItems: 64
255           items:
256             minItems: 2
257             maxItems: 2
258
259     required:
260       - adi,rsense-handle
261
262     dependencies:
263       adi,current-rotate: [ "adi,rsense-share" ]
264
265   "^thermistor@":
266     type: object
267     description:
268       Represents a thermistor sensor which is connected to one of the device
269       channels.
270
271     properties:
272       adi,sensor-type:
273         description:
274           19 - Thermistor 44004/44033 2.252kohm at 25°C
275           20 - Thermistor 44005/44030 3kohm at 25°C
276           21 - Thermistor 44007/44034 5kohm at 25°C
277           22 - Thermistor 44006/44031 10kohm at 25°C
278           23 - Thermistor 44008/44032 30kohm at 25°C
279           24 - Thermistor YSI 400 2.252kohm at 25°C
280           25 - Thermistor Spectrum 1003k 1kohm
281           26 - Thermistor Custom Steinhart-Hart
282           27 - Custom Thermistor
283         allOf:
284           - $ref: /schemas/types.yaml#/definitions/uint32
285         minimum: 19
286         maximum: 27
287
288       adi,rsense-handle:
289         description:
290           Phandle pointing to a rsense object associated with this
291           thermistor.
292         $ref: "/schemas/types.yaml#/definitions/phandle"
293
294       adi,single-ended:
295         description:
296           Boolean property which set's the thermistor as single-ended.
297         type: boolean
298
299       adi,rsense-share:
300         description:
301           Boolean property which enables Rsense sharing, where one sense
302           resistor is used for multiple thermistors. Note that this property
303           is ignored if adi,single-ended is set.
304         type: boolean
305
306       adi,current-rotate:
307         description:
308           Boolean property which enables excitation current rotation to
309           automatically remove parasitic thermocouple effects.
310         type: boolean
311
312       adi,excitation-current-nanoamp:
313         description:
314           This property controls the magnitude of the excitation current
315           applied to the thermistor. Value 0 set's the sensor in auto-range
316           mode.
317         allOf:
318           - $ref: /schemas/types.yaml#/definitions/uint32
319           - enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000,
320                    250000, 500000, 1000000]
321
322       adi,custom-thermistor:
323         description:
324           This is a table, where each entry should be a pair of
325           resistance(ohm)-temperature(K). The entries added here are in uohm
326           and uK only for custom thermistors. For more details look at table
327           78 and 79.
328         allOf:
329           - $ref: /schemas/types.yaml#/definitions/uint64-matrix
330         minItems: 3
331         maxItems: 64
332         items:
333           minItems: 2
334           maxItems: 2
335
336       adi,custom-steinhart:
337         description:
338           Steinhart-Hart coefficients are also supported and can
339           be programmed into the device memory using this property. For
340           Steinhart sensors the coefficients are given in the raw
341           format. Look at table 82 for more information.
342         allOf:
343           - $ref: /schemas/types.yaml#/definitions/uint32-array
344         items:
345           minItems: 6
346           maxItems: 6
347
348     required:
349       - adi,rsense-handle
350
351     dependencies:
352       adi,current-rotate: [ "adi,rsense-share" ]
353
354   "^adc@":
355     type: object
356     description: Represents a channel which is being used as a direct adc.
357
358     properties:
359       adi,sensor-type:
360         description: Identifies the sensor as a direct adc.
361         allOf:
362           - $ref: /schemas/types.yaml#/definitions/uint32
363         const: 30
364
365       adi,single-ended:
366         description: Boolean property which set's the adc as single-ended.
367         type: boolean
368
369   "^rsense@":
370     type: object
371     description:
372       Represents a rsense which is connected to one of the device channels.
373       Rsense are used by thermistors and RTD's.
374
375     properties:
376       reg:
377         minimum: 2
378         maximum: 20
379
380       adi,sensor-type:
381         description: Identifies the sensor as a rsense.
382         allOf:
383           - $ref: /schemas/types.yaml#/definitions/uint32
384         const: 29
385
386       adi,rsense-val-milli-ohms:
387         description:
388           Sets the value of the sense resistor. Look at table 20 of the
389           datasheet for information.
390
391     required:
392       - adi,rsense-val-milli-ohms
393
394 required:
395   - compatible
396   - reg
397   - interrupts
398
399 additionalProperties: false
400
401 examples:
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 ...