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