blob: b680612949642fb9c56bb9d08fea3f9e205315eb [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# 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
Tom Rini53633a82024-02-29 12:33:36 -050036 adi,volt-curr-sample-average:
37 description: |
38 Number of samples to be used to report voltage and current values.
39 $ref: /schemas/types.yaml#/definitions/uint32
40 enum: [1, 2, 4, 8, 16, 32, 64, 128]
41
42 adi,power-sample-average:
43 description: |
44 Number of samples to be used to report power values.
45 $ref: /schemas/types.yaml#/definitions/uint32
46 enum: [1, 2, 4, 8, 16, 32, 64, 128]
47
48allOf:
Tom Rini6bb92fc2024-05-20 09:54:58 -060049 - $ref: hwmon-common.yaml#
Tom Rini53633a82024-02-29 12:33:36 -050050 - if:
51 properties:
52 compatible:
53 contains:
54 enum:
55 - adi,adm1075
56 - adi,adm1276
57 then:
58 properties:
59 adi,volt-curr-sample-average:
60 default: 128
61 adi,power-sample-average: false
62
63 - if:
64 properties:
65 compatible:
66 contains:
67 enum:
68 - adi,adm1275
69 then:
70 properties:
71 adi,volt-curr-sample-average:
72 default: 16
73 adi,power-sample-average: false
74
75 - if:
76 properties:
77 compatible:
78 contains:
79 enum:
80 - adi,adm1272
81 then:
82 properties:
83 adi,volt-curr-sample-average:
84 default: 128
85 adi,power-sample-average:
86 default: 128
87
88 - if:
89 properties:
90 compatible:
91 contains:
92 enum:
93 - adi,adm1278
94 - adi,adm1293
95 - adi,adm1294
96 then:
97 properties:
98 adi,volt-curr-sample-average:
99 default: 128
100 adi,power-sample-average:
101 default: 1
102
103required:
104 - compatible
105 - reg
106
Tom Rini6bb92fc2024-05-20 09:54:58 -0600107unevaluatedProperties: false
Tom Rini53633a82024-02-29 12:33:36 -0500108
109examples:
110 - |
111 i2c {
112 #address-cells = <1>;
113 #size-cells = <0>;
114
115 power-sensor@10 {
116 compatible = "adi,adm1272";
117 reg = <0x10>;
118 shunt-resistor-micro-ohms = <500>;
119 adi,volt-curr-sample-average = <128>;
120 adi,power-sample-average = <128>;
121 };
122 };