summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd/ams,as3711.yaml
blob: ad8649cbb2ccef34a45fd09259d5eb69c1c39c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/ams,as3711.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger

maintainers:
  - Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

description:
  AS3711 is an I2C PMIC from Austria MicroSystems with multiple DC/DC and LDO
  power supplies, a battery charger and an RTC.  So far only bindings for the
  two step-up DC/DC converters are defined.

properties:
  compatible:
    const: ams,as3711

  reg:
    maxItems: 1

  backlight:
    description:
      Step-up converter configuration, to be used as a backlight source
    type: object
    additionalProperties: false
    properties:
      compatible:
        const: ams,as3711-bl

      su1-dev:
        description: Framebuffer phandle for the first step-up converter
        $ref: /schemas/types.yaml#/definitions/phandle

      su1-max-uA:
        description: Maximum current for the first step-up converter
        $ref: /schemas/types.yaml#/definitions/uint32

      su2-dev:
        description: Framebuffer phandle for the second step-up converter
        $ref: /schemas/types.yaml#/definitions/phandle

      su2-max-uA:
        description: Maximum current for the second step-up converter
        $ref: /schemas/types.yaml#/definitions/uint32

      su2-feedback-voltage:
        description: Second step-up converter uses voltage feedback
        type: boolean

      su2-feedback-curr1:
        description:
          Second step-up converter uses CURR1 input for current feedback
        type: boolean

      su2-feedback-curr2:
        description:
          Second step-up converter uses CURR2 input for current feedback
        type: boolean

      su2-feedback-curr3:
        description:
          Second step-up converter uses CURR3 input for current feedback
        type: boolean

      su2-feedback-curr-auto:
        description:
          Second step-up converter uses automatic current feedback selection
        type: boolean

      su2-fbprot-lx-sd4:
        description:
          Second step-up converter uses LX_SD4 for over-voltage protection
        type: boolean

      su2-fbprot-gpio2:
        description:
          Second step-up converter uses GPIO2 for over-voltage protection
        type: boolean

      su2-fbprot-gpio3:
        description:
          Second step-up converter uses GPIO3 for over-voltage protection
        type: boolean

      su2-fbprot-gpio4:
        description:
          Second step-up converter uses GPIO4 for over-voltage protection
        type: boolean

      su2-auto-curr1:
        description:
          Second step-up converter uses CURR1 input for automatic current
          feedback
        type: boolean

      su2-auto-curr2:
        description:
          Second step-up converter uses CURR2 input for automatic current
          feedback
        type: boolean

      su2-auto-curr3:
        description:
          Second step-up converter uses CURR3 input for automatic current
          feedback
        type: boolean

    required:
      - compatible

    dependentRequired:
      # To use the SU1 converter as a backlight source the following two
      # properties must be provided:
      su1-dev: [ su1-max-uA ]
      su1-max-uA: [ su1-dev ]

      # To use the SU2 converter as a backlight source the following two
      # properties must be provided:
      su2-dev: [ su2-max-uA ]
      su2-max-uA: [ su2-dev ]

      su2-feedback-voltage: [ su2-dev ]
      su2-feedback-curr1: [ su2-dev ]
      su2-feedback-curr2: [ su2-dev ]
      su2-feedback-curr3: [ su2-dev ]
      su2-feedback-curr-auto: [ su2-dev ]
      su2-fbprot-lx-sd4: [ su2-dev ]
      su2-fbprot-gpio2: [ su2-dev ]
      su2-fbprot-gpio3: [ su2-dev ]
      su2-fbprot-gpio4: [ su2-dev ]
      su2-auto-curr1: [ su2-feedback-curr-auto ]
      su2-auto-curr2: [ su2-feedback-curr-auto ]
      su2-auto-curr3: [ su2-feedback-curr-auto ]

    dependentSchemas:
      su2-dev:
        allOf:
          - oneOf:
              - required:
                  - su2-feedback-voltage
              - required:
                  - su2-feedback-curr1
              - required:
                  - su2-feedback-curr2
              - required:
                  - su2-feedback-curr3
              - required:
                  - su2-feedback-curr-auto
          - oneOf:
              - required:
                  - su2-fbprot-lx-sd4
              - required:
                  - su2-fbprot-gpio2
              - required:
                  - su2-fbprot-gpio3
              - required:
                  - su2-fbprot-gpio4

      su2-feedback-curr-auto:
        anyOf:
          - required:
              - su2-auto-curr1
          - required:
              - su2-auto-curr2
          - required:
              - su2-auto-curr3

  regulators:
    description: Other DC/DC and LDO supplies
    type: object
    unevaluatedProperties: false
    patternProperties:
      "^(sd[1-4]|ldo[1-8])$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@40 {
            compatible = "ams,as3711";
            reg = <0x40>;

            regulators {
                sd4 {
                    regulator-name = "1.215V";
                    regulator-min-microvolt = <1215000>;
                    regulator-max-microvolt = <1235000>;
                };
                ldo2 {
                    regulator-name = "2.8V CPU";
                    regulator-min-microvolt = <2800000>;
                    regulator-max-microvolt = <2800000>;
                    regulator-always-on;
                    regulator-boot-on;
                };
            };

            backlight {
                compatible = "ams,as3711-bl";
                su2-dev = <&lcdc>;
                su2-max-uA = <36000>;
                su2-feedback-curr-auto;
                su2-fbprot-gpio4;
                su2-auto-curr1;
                su2-auto-curr2;
                su2-auto-curr3;
            };
        };
    };