xref: /linux/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml (revision db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/hwmon/adi,adm1275.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Analog Devices ADM1075/ADM127x/ADM1281/ADM129x digital power monitors
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |
13  The ADM1293 and ADM1294 are high accuracy integrated digital power monitors
14  that offer digital current, voltage, and power monitoring using an on-chip,
15  12-bit analog-to-digital converter (ADC), communicated through a PMBus
16  compliant I2C interface.
17
18  Datasheets:
19    https://www.analog.com/en/products/adm1294.html
20
21  The SQ24905C is also a Hot-swap controller compatibility to the ADM1278,
22  the PMBUS_MFR_MODEL is MC09C
23
24  Datasheets:
25    https://www.silergy.com/
26    download/downloadFile?id=5669&type=product&ftype=note
27
28properties:
29  compatible:
30    enum:
31      - adi,adm1075
32      - adi,adm1272
33      - adi,adm1273
34      - adi,adm1275
35      - adi,adm1276
36      - adi,adm1278
37      - adi,adm1281
38      - adi,adm1293
39      - adi,adm1294
40      - silergy,mc09c
41
42  reg:
43    maxItems: 1
44
45  adi,volt-curr-sample-average:
46    description: |
47      Number of samples to be used to report voltage and current values.
48    $ref: /schemas/types.yaml#/definitions/uint32
49    enum: [1, 2, 4, 8, 16, 32, 64, 128]
50
51  adi,power-sample-average:
52    description: |
53      Number of samples to be used to report power values.
54    $ref: /schemas/types.yaml#/definitions/uint32
55    enum: [1, 2, 4, 8, 16, 32, 64, 128]
56
57allOf:
58  - $ref: hwmon-common.yaml#
59  - if:
60      properties:
61        compatible:
62          contains:
63            enum:
64              - adi,adm1075
65              - adi,adm1276
66    then:
67      properties:
68        adi,volt-curr-sample-average:
69          default: 128
70        adi,power-sample-average: false
71
72  - if:
73      properties:
74        compatible:
75          contains:
76            enum:
77              - adi,adm1275
78    then:
79      properties:
80        adi,volt-curr-sample-average:
81          default: 16
82        adi,power-sample-average: false
83
84  - if:
85      properties:
86        compatible:
87          contains:
88            enum:
89              - adi,adm1272
90              - adi,adm1273
91    then:
92      properties:
93        adi,volt-curr-sample-average:
94          default: 128
95        adi,power-sample-average:
96          default: 128
97
98  - if:
99      properties:
100        compatible:
101          contains:
102            enum:
103              - adi,adm1278
104              - adi,adm1281
105              - adi,adm1293
106              - adi,adm1294
107              - silergy,mc09c
108    then:
109      properties:
110        adi,volt-curr-sample-average:
111          default: 128
112        adi,power-sample-average:
113          default: 1
114
115required:
116  - compatible
117  - reg
118
119unevaluatedProperties: false
120
121examples:
122  - |
123    i2c {
124        #address-cells = <1>;
125        #size-cells = <0>;
126
127        power-sensor@10 {
128            compatible = "adi,adm1272";
129            reg = <0x10>;
130            shunt-resistor-micro-ohms = <500>;
131            adi,volt-curr-sample-average = <128>;
132            adi,power-sample-average = <128>;
133        };
134    };
135