xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/maxim,max14577.yaml (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/maxim,max14577.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |
13  This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
14  Integrated Circuit (MUIC).
15
16  The Maxim MAX14577 is a MicroUSB and Companion Power Management IC which
17  includes voltage safeout regulators, charger and MicroUSB management IC.
18
19  The Maxim MAX77836 is a MicroUSB and Companion Power Management IC which
20  includes voltage safeout and LDO regulators, charger, fuel-gauge and MicroUSB
21  management IC.
22
23properties:
24  compatible:
25    enum:
26      - maxim,max14577
27      - maxim,max77836
28
29  interrupts:
30    maxItems: 1
31
32  reg:
33    maxItems: 1
34
35  wakeup-source: true
36
37  charger:
38    $ref: /schemas/power/supply/maxim,max14577.yaml
39
40  extcon:
41    type: object
42    properties:
43      compatible:
44        enum:
45          - maxim,max14577-muic
46          - maxim,max77836-muic
47
48    required:
49      - compatible
50
51  regulators:
52    $ref: /schemas/regulator/maxim,max14577.yaml
53
54required:
55  - compatible
56  - interrupts
57  - reg
58  - charger
59
60allOf:
61  - if:
62      properties:
63        compatible:
64          contains:
65            const: maxim,max14577
66    then:
67      properties:
68        charger:
69          properties:
70            compatible:
71              const: maxim,max14577-charger
72        extcon:
73          properties:
74            compatible:
75              const: maxim,max14577-muic
76        regulator:
77          properties:
78            compatible:
79              const: maxim,max14577-regulator
80    else:
81      properties:
82        charger:
83          properties:
84            compatible:
85              const: maxim,max77836-charger
86        extcon:
87          properties:
88            compatible:
89              const: maxim,max77836-muic
90        regulator:
91          properties:
92            compatible:
93              const: maxim,max77836-regulator
94
95additionalProperties: false
96
97examples:
98  - |
99    #include <dt-bindings/interrupt-controller/irq.h>
100
101    i2c {
102        #address-cells = <1>;
103        #size-cells = <0>;
104
105        pmic@25 {
106            compatible = "maxim,max14577";
107            reg = <0x25>;
108            interrupt-parent = <&gpx1>;
109            interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
110
111            extcon {
112                compatible = "maxim,max14577-muic";
113            };
114
115            regulators {
116                compatible = "maxim,max14577-regulator";
117
118                SAFEOUT {
119                    regulator-name = "SAFEOUT";
120                };
121
122                CHARGER {
123                    regulator-name = "CHARGER";
124                    regulator-min-microamp = <90000>;
125                    regulator-max-microamp = <950000>;
126                    regulator-boot-on;
127                };
128            };
129
130            charger {
131                compatible = "maxim,max14577-charger";
132
133                maxim,constant-uvolt = <4350000>;
134                maxim,fast-charge-uamp = <450000>;
135                maxim,eoc-uamp = <50000>;
136                maxim,ovp-uvolt = <6500000>;
137            };
138        };
139    };
140
141  - |
142    #include <dt-bindings/interrupt-controller/irq.h>
143
144    i2c {
145        #address-cells = <1>;
146        #size-cells = <0>;
147
148        pmic@25 {
149            compatible = "maxim,max77836";
150            interrupt-parent = <&gpx1>;
151            interrupts = <5 IRQ_TYPE_NONE>;
152            reg = <0x25>;
153            wakeup-source;
154
155            extcon {
156                compatible = "maxim,max77836-muic";
157            };
158
159            regulators {
160                compatible = "maxim,max77836-regulator";
161
162                SAFEOUT {
163                    regulator-name = "SAFEOUT";
164                };
165
166                CHARGER {
167                    regulator-name = "CHARGER";
168                    regulator-min-microamp = <45000>;
169                    regulator-max-microamp = <475000>;
170                    regulator-boot-on;
171                };
172
173                LDO1 {
174                    regulator-name = "MOT_2.7V";
175                    regulator-min-microvolt = <1100000>;
176                    regulator-max-microvolt = <2700000>;
177                };
178
179                LDO2 {
180                    regulator-name = "UNUSED_LDO2";
181                    regulator-min-microvolt = <800000>;
182                    regulator-max-microvolt = <3950000>;
183                };
184            };
185
186            charger {
187                compatible = "maxim,max77836-charger";
188
189                maxim,constant-uvolt = <4350000>;
190                maxim,fast-charge-uamp = <225000>;
191                maxim,eoc-uamp = <7500>;
192                maxim,ovp-uvolt = <6500000>;
193            };
194        };
195    };
196