summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/hwmon/national,lm90.yaml
blob: 6e59c8fdef308d078c7a21f3a19250398b9c584d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/national,lm90.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LM90 series thermometer

maintainers:
  - Jean Delvare <jdelvare@suse.com>
  - Guenter Roeck <linux@roeck-us.net>

properties:
  compatible:
    enum:
      - adi,adm1032
      - adi,adt7461
      - adi,adt7461a
      - adi,adt7481
      - dallas,max6646
      - dallas,max6647
      - dallas,max6649
      - dallas,max6657
      - dallas,max6658
      - dallas,max6659
      - dallas,max6680
      - dallas,max6681
      - dallas,max6695
      - dallas,max6696
      - gmt,g781
      - national,lm86
      - national,lm89
      - national,lm90
      - national,lm99
      - nxp,sa56004
      - onnn,nct1008
      - ti,tmp451
      - ti,tmp461
      - winbond,w83l771


  interrupts:
    items:
      - description: |
          Single interrupt specifier which describes the LM90 "-ALERT" pin
          output.

  reg:
    maxItems: 1

  "#thermal-sensor-cells":
    const: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  vcc-supply:
    description: phandle to the regulator that provides the +VCC supply

  ti,extended-range-enable:
    description: Set to enable extended range temperature.
    type: boolean

required:
  - compatible
  - reg

patternProperties:
  "^channel@([0-2])$":
    type: object
    description: Represents channels of the device and their specific configuration.

    properties:
      reg:
        description: The channel number. 0 is local channel, 1-2 are remote channels.
        items:
          minimum: 0
          maximum: 2

      label:
        description: A descriptive name for this channel, like "ambient" or "psu".

      temperature-offset-millicelsius:
        description: Temperature offset to be added to or subtracted from remote temperature measurements.

    required:
      - reg

    additionalProperties: false

allOf:
  - if:
      not:
        properties:
          compatible:
            contains:
              enum:
                - adi,adt7461
                - adi,adt7461a
                - adi,adt7481
                - ti,tmp451
                - ti,tmp461
    then:
      properties:
        ti,extended-range-enable: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - dallas,max6646
              - dallas,max6647
              - dallas,max6649
              - dallas,max6657
              - dallas,max6658
              - dallas,max6659
              - dallas,max6695
              - dallas,max6696
    then:
      patternProperties:
        "^channel@([0-2])$":
          properties:
            temperature-offset-millicelsius: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,adt7461
              - adi,adt7461a
              - adi,adt7481
              - onnn,nct1008
    then:
      patternProperties:
        "^channel@([0-2])$":
          properties:
            temperature-offset-millicelsius:
              maximum: 127750

  - if:
      properties:
        compatible:
          contains:
            enum:
              - adi,adm1032
              - dallas,max6680
              - dallas,max6681
              - gmt,g781
              - national,lm86
              - national,lm89
              - national,lm90
              - national,lm99
              - nxp,sa56004
              - winbond,w83l771
    then:
      patternProperties:
        "^channel@([0-2])$":
          properties:
            temperature-offset-millicelsius:
              maximum: 127875

  - if:
      properties:
        compatible:
          contains:
            enum:
              - ti,tmp451
              - ti,tmp461
    then:
      patternProperties:
        "^channel@([0-2])$":
          properties:
            temperature-offset-millicelsius:
              maximum: 127937

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        sensor@4c {
            compatible = "onnn,nct1008";
            reg = <0x4c>;
            vcc-supply = <&palmas_ldo6_reg>;
            interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
            #thermal-sensor-cells = <1>;
        };
    };
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        sensor@4c {
            compatible = "adi,adt7481";
            reg = <0x4c>;
            #address-cells = <1>;
            #size-cells = <0>;

            channel@0 {
                reg = <0x0>;
                label = "local";
            };

            channel@1 {
                reg = <0x1>;
                label = "front";
                temperature-offset-millicelsius = <4000>;
            };

            channel@2 {
                reg = <0x2>;
                label = "back";
                temperature-offset-millicelsius = <750>;
            };
        };
    };