summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mfd/wlf,arizona.yaml
blob: ea3337dafaf5366e1980d89ad4cfbb0552a98d65 (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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/wlf,arizona.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs

maintainers:
  - patches@opensource.cirrus.com

description: |
  These devices are audio SoCs with extensive digital capabilities and a
  range of analogue I/O.

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml
  - $ref: /schemas/sound/wlf,arizona.yaml#
  - $ref: /schemas/regulator/wlf,arizona.yaml#
  - $ref: /schemas/extcon/wlf,arizona.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - cirrus,cs47l24
              - wlf,wm1831
    then:
      required:
        - DCVDD-supply
        - MICVDD-supply
    else:
      properties:
        LDOVDD-supply:
          description:
            Digital power supply, used internally to generate DCVDD when
            internally supplied.

  - if:
      properties:
        compatible:
          contains:
            enum:
              - wlf,wm1814
              - wlf,wm5102
              - wlf,wm5110
              - wlf,wm8280
              - wlf,wm8997
              - wlf,wm8998
    then:
      properties:
        DBVDD2-supply:
          description:
            Databus power supply.

      required:
        - DBVDD2-supply
  - if:
      properties:
        compatible:
          contains:
            enum:
              - wlf,wm1814
              - wlf,wm5102
              - wlf,wm5110
              - wlf,wm8280
              - wlf,wm8998
    then:
      properties:
        DBVDD3-supply:
          description:
            Databus power supply.

      required:
        - DBVDD3-supply
  - if:
      properties:
        compatible:
          contains:
            enum:
              - cirrus,cs47l24
              - wlf,wm1831
              - wlf,wm8997
    then:
      properties:
        SPKVDD-supply:
          description:
            Mono speaker driver power supply.

      required:
        - SPKVDD-supply
    else:
      properties:
        SPKVDDL-supply:
          description:
            Left speaker driver power supply.

        SPKVDDR-supply:
          description:
            Right speaker driver power supply.

      required:
        - SPKVDDL-supply
        - SPKVDDR-supply

properties:
  compatible:
    enum:
      - cirrus,cs47l24
      - wlf,wm1814
      - wlf,wm1831
      - wlf,wm5102
      - wlf,wm5110
      - wlf,wm8280
      - wlf,wm8997
      - wlf,wm8998

  reg:
    maxItems: 1

  AVDD-supply:
    description:
      Analogue power supply.

  CPVDD-supply:
    description:
      Charge pump power supply.

  DBVDD1-supply:
    description:
      Databus power supply.

  DCVDD-supply:
    description:
      Digital power supply, normally supplied internally except on cs47l24,
      wm1831 where it is mandatory.

  MICVDD-supply:
    description:
      Microphone power supply, normally supplied internally except on
      cs47l24, wm1831 where it is mandatory.

  gpio-controller: true

  '#gpio-cells':
    description:
      The first cell is the pin number and the second cell is used to
      specify optional parameters.
    const: 2

  wlf,gpio-defaults:
    description:
      A list of GPIO configuration register values. Defines for the
      appropriate values can found in dt-bindings/mfd/arizona.h. If
      absent, no configuration of these registers is performed. If any
      entry has a value that is out of range for a 16 bit register then the
      chip default will be used. If present exactly five values must be
      specified.
    $ref: "/schemas/types.yaml#/definitions/uint32-array"
    minItems: 1
    maxItems: 5

  interrupt-controller: true

  '#interrupt-cells':
    description:
      The first cell is the IRQ number.  The second cell is the flags,
      encoded as trigger masks.
    const: 2

  interrupts:
    maxItems: 1

  clocks:
    description:
      Should reference the clocks supplied on MCLK1 and MCLK2.
    minItems: 1
    maxItems: 2

  clock-names:
    description:
      Should contains two strings mclk1 for the clock supplied on MCLK1,
      recommended to be a high quality audio reference clock mclk2 for the
      clock supplied on MCLK2, recommended to be an always on 32k clock.
    oneOf:
      - items:
          - const: mclk1
      - items:
          - const: mclk2
      - items:
          - const: mclk1
          - const: mclk2

  reset-gpios:
    maxItems: 1

  wlf,reset:
    description:
      GPIO specifier for the GPIO controlling RESET
    deprecated: true
    $ref: /schemas/types.yaml#/definitions/phandle-array
    maxItems: 1

required:
  - compatible
  - AVDD-supply
  - CPVDD-supply
  - DBVDD1-supply
  - gpio-controller
  - '#gpio-cells'
  - interrupt-controller
  - '#interrupt-cells'
  - interrupts

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/mfd/arizona.h>
    i2c@e0004000 {
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0xe0004000 0x1000>;

        wm5102: codec@1a {
            compatible = "wlf,wm5102";
            reg = <0x1a>;

            reset-gpios = <&gpio 0>;
            wlf,ldoena = <&gpio 1>;

            AVDD-supply = <&vdd1v8>;
            DBVDD1-supply = <&vdd1v8>;
            DBVDD2-supply = <&vdd1v8>;
            DBVDD3-supply = <&vdd1v8>;
            CPVDD-supply = <&vdd1v8>;
            LDOVDD-supply = <&vdd1v8>;
            SPKVDDL-supply = <&vdd5v>;
            SPKVDDR-supply = <&vdd5v>;

            interrupts = <347>;
            interrupt-controller;
            #interrupt-cells = <2>;
            interrupt-parent = <&gic>;

            gpio-controller;
            #gpio-cells = <2>;

            #sound-dai-cells = <1>;

            wlf,gpio-defaults = <
                ARIZONA_GP_FN_TXLRCLK
                ARIZONA_GP_DEFAULT
                ARIZONA_GP_DEFAULT
                ARIZONA_GP_DEFAULT
                ARIZONA_GP_DEFAULT
            >;

            clocks = <&clks 0>, <&clks 1>;
            clock-names = "mclk1", "mclk2";

            wlf,inmode = <ARIZONA_INMODE_DIFF ARIZONA_INMODE_DMIC>;
            wlf,dmic-ref = <ARIZONA_DMIC_MICBIAS1 ARIZONA_DMIC_MICBIAS3>;

            wlf,use-jd2;
            wlf,use-jd2-nopull;
            wlf,jd-invert;

            wlf,micd-software-compare;
            wlf,micd-detect-debounce = <0>;
            wlf,micd-pol-gpio = <&codec 2 0>;
            wlf,micd-rate = <ARIZONA_MICD_TIME_8MS>;
            wlf,micd-dbtime = <4>;
            wlf,micd-timeout-ms = <100>;
            wlf,micd-force-micbias;
            wlf,micd-configs = <0 ARIZONA_DMIC_MICBIAS1 0>,
                               <0x2000 ARIZONA_DMIC_MICBIAS2 1>;

            wlf,gpsw = <ARIZONA_GPSW_OPEN>;
        };
    };