1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/ams,as3711.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger
8
9maintainers:
10  - Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
11
12description:
13  AS3711 is an I2C PMIC from Austria MicroSystems with multiple DC/DC and LDO
14  power supplies, a battery charger and an RTC.  So far only bindings for the
15  two step-up DC/DC converters are defined.
16
17properties:
18  compatible:
19    const: ams,as3711
20
21  reg:
22    maxItems: 1
23
24  backlight:
25    description:
26      Step-up converter configuration, to be used as a backlight source
27    type: object
28    additionalProperties: false
29    properties:
30      compatible:
31        const: ams,as3711-bl
32
33      su1-dev:
34        description: Framebuffer phandle for the first step-up converter
35        $ref: /schemas/types.yaml#/definitions/phandle
36
37      su1-max-uA:
38        description: Maximum current for the first step-up converter
39        $ref: /schemas/types.yaml#/definitions/uint32
40
41      su2-dev:
42        description: Framebuffer phandle for the second step-up converter
43        $ref: /schemas/types.yaml#/definitions/phandle
44
45      su2-max-uA:
46        description: Maximum current for the second step-up converter
47        $ref: /schemas/types.yaml#/definitions/uint32
48
49      su2-feedback-voltage:
50        description: Second step-up converter uses voltage feedback
51        type: boolean
52
53      su2-feedback-curr1:
54        description:
55          Second step-up converter uses CURR1 input for current feedback
56        type: boolean
57
58      su2-feedback-curr2:
59        description:
60          Second step-up converter uses CURR2 input for current feedback
61        type: boolean
62
63      su2-feedback-curr3:
64        description:
65          Second step-up converter uses CURR3 input for current feedback
66        type: boolean
67
68      su2-feedback-curr-auto:
69        description:
70          Second step-up converter uses automatic current feedback selection
71        type: boolean
72
73      su2-fbprot-lx-sd4:
74        description:
75          Second step-up converter uses LX_SD4 for over-voltage protection
76        type: boolean
77
78      su2-fbprot-gpio2:
79        description:
80          Second step-up converter uses GPIO2 for over-voltage protection
81        type: boolean
82
83      su2-fbprot-gpio3:
84        description:
85          Second step-up converter uses GPIO3 for over-voltage protection
86        type: boolean
87
88      su2-fbprot-gpio4:
89        description:
90          Second step-up converter uses GPIO4 for over-voltage protection
91        type: boolean
92
93      su2-auto-curr1:
94        description:
95          Second step-up converter uses CURR1 input for automatic current
96          feedback
97        type: boolean
98
99      su2-auto-curr2:
100        description:
101          Second step-up converter uses CURR2 input for automatic current
102          feedback
103        type: boolean
104
105      su2-auto-curr3:
106        description:
107          Second step-up converter uses CURR3 input for automatic current
108          feedback
109        type: boolean
110
111    required:
112      - compatible
113
114    dependentRequired:
115      # To use the SU1 converter as a backlight source the following two
116      # properties must be provided:
117      su1-dev: [ su1-max-uA ]
118      su1-max-uA: [ su1-dev ]
119
120      # To use the SU2 converter as a backlight source the following two
121      # properties must be provided:
122      su2-dev: [ su2-max-uA ]
123      su2-max-uA: [ su2-dev ]
124
125      su2-feedback-voltage: [ su2-dev ]
126      su2-feedback-curr1: [ su2-dev ]
127      su2-feedback-curr2: [ su2-dev ]
128      su2-feedback-curr3: [ su2-dev ]
129      su2-feedback-curr-auto: [ su2-dev ]
130      su2-fbprot-lx-sd4: [ su2-dev ]
131      su2-fbprot-gpio2: [ su2-dev ]
132      su2-fbprot-gpio3: [ su2-dev ]
133      su2-fbprot-gpio4: [ su2-dev ]
134      su2-auto-curr1: [ su2-feedback-curr-auto ]
135      su2-auto-curr2: [ su2-feedback-curr-auto ]
136      su2-auto-curr3: [ su2-feedback-curr-auto ]
137
138    dependentSchemas:
139      su2-dev:
140        allOf:
141          - oneOf:
142              - required:
143                  - su2-feedback-voltage
144              - required:
145                  - su2-feedback-curr1
146              - required:
147                  - su2-feedback-curr2
148              - required:
149                  - su2-feedback-curr3
150              - required:
151                  - su2-feedback-curr-auto
152          - oneOf:
153              - required:
154                  - su2-fbprot-lx-sd4
155              - required:
156                  - su2-fbprot-gpio2
157              - required:
158                  - su2-fbprot-gpio3
159              - required:
160                  - su2-fbprot-gpio4
161
162      su2-feedback-curr-auto:
163        anyOf:
164          - required:
165              - su2-auto-curr1
166          - required:
167              - su2-auto-curr2
168          - required:
169              - su2-auto-curr3
170
171  regulators:
172    description: Other DC/DC and LDO supplies
173    type: object
174    unevaluatedProperties: false
175    patternProperties:
176      "^(sd[1-4]|ldo[1-8])$":
177        type: object
178        $ref: /schemas/regulator/regulator.yaml#
179        unevaluatedProperties: false
180
181required:
182  - compatible
183  - reg
184
185additionalProperties: false
186
187examples:
188  - |
189    i2c {
190        #address-cells = <1>;
191        #size-cells = <0>;
192
193        pmic@40 {
194            compatible = "ams,as3711";
195            reg = <0x40>;
196
197            regulators {
198                sd4 {
199                    regulator-name = "1.215V";
200                    regulator-min-microvolt = <1215000>;
201                    regulator-max-microvolt = <1235000>;
202                };
203                ldo2 {
204                    regulator-name = "2.8V CPU";
205                    regulator-min-microvolt = <2800000>;
206                    regulator-max-microvolt = <2800000>;
207                    regulator-always-on;
208                    regulator-boot-on;
209                };
210            };
211
212            backlight {
213                compatible = "ams,as3711-bl";
214                su2-dev = <&lcdc>;
215                su2-max-uA = <36000>;
216                su2-feedback-curr-auto;
217                su2-fbprot-gpio4;
218                su2-auto-curr1;
219                su2-auto-curr2;
220                su2-auto-curr3;
221            };
222        };
223    };
224