xref: /linux/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
19702fc87SDaniel Matyas# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
29702fc87SDaniel Matyas%YAML 1.2
39702fc87SDaniel Matyas---
49702fc87SDaniel Matyas$id: http://devicetree.org/schemas/hwmon/adi,max31827.yaml#
59702fc87SDaniel Matyas$schema: http://devicetree.org/meta-schemas/core.yaml#
69702fc87SDaniel Matyas
79702fc87SDaniel Matyastitle: Analog Devices MAX31827, MAX31828, MAX31829 Low-Power Temperature Switch
89702fc87SDaniel Matyas
99702fc87SDaniel Matyasmaintainers:
109702fc87SDaniel Matyas  - Daniel Matyas <daniel.matyas@analog.com>
119702fc87SDaniel Matyas
129702fc87SDaniel Matyasdescription: |
139702fc87SDaniel Matyas  Analog Devices MAX31827, MAX31828, MAX31829 Low-Power Temperature Switch with
149702fc87SDaniel Matyas  I2C Interface
159702fc87SDaniel Matyas  https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31827-MAX31829.pdf
169702fc87SDaniel Matyas
179702fc87SDaniel Matyasproperties:
189702fc87SDaniel Matyas  compatible:
199702fc87SDaniel Matyas    oneOf:
209702fc87SDaniel Matyas      - const: adi,max31827
219702fc87SDaniel Matyas      - items:
229702fc87SDaniel Matyas          - enum:
239702fc87SDaniel Matyas              - adi,max31828
249702fc87SDaniel Matyas              - adi,max31829
259702fc87SDaniel Matyas          - const: adi,max31827
269702fc87SDaniel Matyas
279702fc87SDaniel Matyas  reg:
289702fc87SDaniel Matyas    maxItems: 1
299702fc87SDaniel Matyas
309702fc87SDaniel Matyas  vref-supply:
319702fc87SDaniel Matyas    description:
329702fc87SDaniel Matyas      Must have values in the interval (1.6V; 3.6V) in order for the device to
339702fc87SDaniel Matyas      function correctly.
349702fc87SDaniel Matyas
35*6632b456SDaniel Matyas  adi,comp-int:
36*6632b456SDaniel Matyas    description:
37*6632b456SDaniel Matyas      If present interrupt mode is used. If not present comparator mode is used
38*6632b456SDaniel Matyas      (default).
39*6632b456SDaniel Matyas    type: boolean
40*6632b456SDaniel Matyas
41*6632b456SDaniel Matyas  adi,alarm-pol:
42*6632b456SDaniel Matyas    description:
43*6632b456SDaniel Matyas      Sets the alarms active state.
44*6632b456SDaniel Matyas            - 0 = active low
45*6632b456SDaniel Matyas            - 1 = active high
46*6632b456SDaniel Matyas    $ref: /schemas/types.yaml#/definitions/uint32
47*6632b456SDaniel Matyas    enum: [0, 1]
48*6632b456SDaniel Matyas
49*6632b456SDaniel Matyas  adi,fault-q:
50*6632b456SDaniel Matyas    description:
51*6632b456SDaniel Matyas      Select how many consecutive temperature faults must occur before
52*6632b456SDaniel Matyas      overtemperature or undertemperature faults are indicated in the
53*6632b456SDaniel Matyas      corresponding status bits.
54*6632b456SDaniel Matyas    $ref: /schemas/types.yaml#/definitions/uint32
55*6632b456SDaniel Matyas    enum: [1, 2, 4, 8]
56*6632b456SDaniel Matyas
57*6632b456SDaniel Matyas  adi,timeout-enable:
58*6632b456SDaniel Matyas    description:
59*6632b456SDaniel Matyas      Enables timeout. Bus timeout resets the I2C-compatible interface when SCL
60*6632b456SDaniel Matyas      is low for more than 30ms (nominal).
61*6632b456SDaniel Matyas    type: boolean
62*6632b456SDaniel Matyas
63*6632b456SDaniel MatyasallOf:
64*6632b456SDaniel Matyas  - if:
65*6632b456SDaniel Matyas      properties:
66*6632b456SDaniel Matyas        compatible:
67*6632b456SDaniel Matyas          contains:
68*6632b456SDaniel Matyas            const: adi,max31829
69*6632b456SDaniel Matyas
70*6632b456SDaniel Matyas    then:
71*6632b456SDaniel Matyas      properties:
72*6632b456SDaniel Matyas        adi,alarm-pol:
73*6632b456SDaniel Matyas          default: 1
74*6632b456SDaniel Matyas
75*6632b456SDaniel Matyas    else:
76*6632b456SDaniel Matyas      properties:
77*6632b456SDaniel Matyas        adi,alarm-pol:
78*6632b456SDaniel Matyas          default: 0
79*6632b456SDaniel Matyas
80*6632b456SDaniel Matyas  - if:
81*6632b456SDaniel Matyas      properties:
82*6632b456SDaniel Matyas        compatible:
83*6632b456SDaniel Matyas          contains:
84*6632b456SDaniel Matyas            const: adi,max31827
85*6632b456SDaniel Matyas
86*6632b456SDaniel Matyas    then:
87*6632b456SDaniel Matyas      properties:
88*6632b456SDaniel Matyas        adi,fault-q:
89*6632b456SDaniel Matyas          default: 1
90*6632b456SDaniel Matyas
91*6632b456SDaniel Matyas    else:
92*6632b456SDaniel Matyas      properties:
93*6632b456SDaniel Matyas        adi,fault-q:
94*6632b456SDaniel Matyas          default: 4
95*6632b456SDaniel Matyas
96*6632b456SDaniel Matyas
979702fc87SDaniel Matyasrequired:
989702fc87SDaniel Matyas  - compatible
999702fc87SDaniel Matyas  - reg
1009702fc87SDaniel Matyas  - vref-supply
1019702fc87SDaniel Matyas
1029702fc87SDaniel MatyasadditionalProperties: false
1039702fc87SDaniel Matyas
1049702fc87SDaniel Matyasexamples:
1059702fc87SDaniel Matyas  - |
1069702fc87SDaniel Matyas    i2c {
1079702fc87SDaniel Matyas        #address-cells = <1>;
1089702fc87SDaniel Matyas        #size-cells = <0>;
1099702fc87SDaniel Matyas
1109702fc87SDaniel Matyas        temperature-sensor@42 {
1119702fc87SDaniel Matyas            compatible = "adi,max31827";
1129702fc87SDaniel Matyas            reg = <0x42>;
1139702fc87SDaniel Matyas            vref-supply = <&reg_vdd>;
114*6632b456SDaniel Matyas            adi,comp-int;
115*6632b456SDaniel Matyas            adi,alarm-pol = <0>;
116*6632b456SDaniel Matyas            adi,fault-q = <1>;
117*6632b456SDaniel Matyas            adi,timeout-enable;
1189702fc87SDaniel Matyas        };
1199702fc87SDaniel Matyas    };
1209702fc87SDaniel Matyas...
121