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