xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/cirrus,lochnagar.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/mfd/cirrus,lochnagar.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Cirrus Logic Lochnagar Audio Development Board
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - patches@opensource.cirrus.com
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |
13*4882a593Smuzhiyun  Lochnagar is an evaluation and development board for Cirrus Logic
14*4882a593Smuzhiyun  Smart CODEC and Amp devices. It allows the connection of most Cirrus
15*4882a593Smuzhiyun  Logic devices on mini-cards, as well as allowing connection of
16*4882a593Smuzhiyun  various application processor systems to provide a full evaluation
17*4882a593Smuzhiyun  platform.  Audio system topology, clocking and power can all be
18*4882a593Smuzhiyun  controlled through the Lochnagar, allowing the device under test
19*4882a593Smuzhiyun  to be used in a variety of possible use cases.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun  Also see these documents for generic binding information:
22*4882a593Smuzhiyun    [1] GPIO : ../gpio/gpio.txt
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun  And these for relevant defines:
25*4882a593Smuzhiyun    [2] include/dt-bindings/pinctrl/lochnagar.h
26*4882a593Smuzhiyun    [3] include/dt-bindings/clock/lochnagar.h
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  And these documents for the required sub-node binding details:
29*4882a593Smuzhiyun    [4] Clock: ../clock/cirrus,lochnagar.yaml
30*4882a593Smuzhiyun    [5] Pinctrl: ../pinctrl/cirrus,lochnagar.yaml
31*4882a593Smuzhiyun    [6] Sound: ../sound/cirrus,lochnagar.yaml
32*4882a593Smuzhiyun    [7] Hardware Monitor: ../hwmon/cirrus,lochnagar.yaml
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunallOf:
35*4882a593Smuzhiyun  - if:
36*4882a593Smuzhiyun      properties:
37*4882a593Smuzhiyun        compatible:
38*4882a593Smuzhiyun          enum:
39*4882a593Smuzhiyun            - cirrus,lochnagar2
40*4882a593Smuzhiyun    then:
41*4882a593Smuzhiyun      properties:
42*4882a593Smuzhiyun        lochnagar-hwmon:
43*4882a593Smuzhiyun          type: object
44*4882a593Smuzhiyun          $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun        lochnagar-sc:
47*4882a593Smuzhiyun          type: object
48*4882a593Smuzhiyun          $ref: /schemas/sound/cirrus,lochnagar.yaml#
49*4882a593Smuzhiyun
50*4882a593Smuzhiyunproperties:
51*4882a593Smuzhiyun  compatible:
52*4882a593Smuzhiyun    enum:
53*4882a593Smuzhiyun      - cirrus,lochnagar1
54*4882a593Smuzhiyun      - cirrus,lochnagar2
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun  reg:
57*4882a593Smuzhiyun    const: 0x22
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun  reset-gpios:
60*4882a593Smuzhiyun    maxItems: 1
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun  present-gpios:
63*4882a593Smuzhiyun    description: |
64*4882a593Smuzhiyun      Host present line, indicating the presence of a
65*4882a593Smuzhiyun      host system, see [1]. This can be omitted if the present line is
66*4882a593Smuzhiyun      tied in hardware.
67*4882a593Smuzhiyun    maxItems: 1
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun  lochnagar-clk:
70*4882a593Smuzhiyun    type: object
71*4882a593Smuzhiyun    $ref: /schemas/clock/cirrus,lochnagar.yaml#
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun  lochnagar-pmic32k:
74*4882a593Smuzhiyun    type: object
75*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
76*4882a593Smuzhiyun    properties:
77*4882a593Smuzhiyun      clock-frequency:
78*4882a593Smuzhiyun        const: 32768
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun  lochnagar-clk12m:
81*4882a593Smuzhiyun    type: object
82*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
83*4882a593Smuzhiyun    properties:
84*4882a593Smuzhiyun      clock-frequency:
85*4882a593Smuzhiyun        const: 12288000
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun  lochnagar-clk11m:
88*4882a593Smuzhiyun    type: object
89*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
90*4882a593Smuzhiyun    properties:
91*4882a593Smuzhiyun      clock-frequency:
92*4882a593Smuzhiyun        const: 11298600
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun  lochnagar-clk24m:
95*4882a593Smuzhiyun    type: object
96*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
97*4882a593Smuzhiyun    properties:
98*4882a593Smuzhiyun      clock-frequency:
99*4882a593Smuzhiyun        const: 24576000
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun  lochnagar-clk22m:
102*4882a593Smuzhiyun    type: object
103*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
104*4882a593Smuzhiyun    properties:
105*4882a593Smuzhiyun      clock-frequency:
106*4882a593Smuzhiyun        const: 22579200
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun  lochnagar-clk8m:
109*4882a593Smuzhiyun    type: object
110*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
111*4882a593Smuzhiyun    properties:
112*4882a593Smuzhiyun      clock-frequency:
113*4882a593Smuzhiyun        const: 8192000
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun  lochnagar-usb24m:
116*4882a593Smuzhiyun    type: object
117*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
118*4882a593Smuzhiyun    properties:
119*4882a593Smuzhiyun      clock-frequency:
120*4882a593Smuzhiyun        const: 24576000
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun  lochnagar-usb12m:
123*4882a593Smuzhiyun    type: object
124*4882a593Smuzhiyun    $ref: /schemas/clock/fixed-clock.yaml#
125*4882a593Smuzhiyun    properties:
126*4882a593Smuzhiyun      clock-frequency:
127*4882a593Smuzhiyun        const: 12288000
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun  lochnagar-pinctrl:
130*4882a593Smuzhiyun    type: object
131*4882a593Smuzhiyun    $ref: /schemas/pinctrl/cirrus,lochnagar.yaml#
132*4882a593Smuzhiyun
133*4882a593Smuzhiyun  lochnagar-hwmon:
134*4882a593Smuzhiyun    type: object
135*4882a593Smuzhiyun    $ref: /schemas/hwmon/cirrus,lochnagar.yaml#
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun  lochnagar-sc:
138*4882a593Smuzhiyun    type: object
139*4882a593Smuzhiyun    $ref: /schemas/sound/cirrus,lochnagar.yaml#
140*4882a593Smuzhiyun
141*4882a593Smuzhiyun  VDDCORE:
142*4882a593Smuzhiyun    description:
143*4882a593Smuzhiyun      Initialisation data for the VDDCORE regulator, which supplies the
144*4882a593Smuzhiyun      CODECs digital core if not being provided by an internal regulator.
145*4882a593Smuzhiyun    type: object
146*4882a593Smuzhiyun    $ref: /schemas/regulator/regulator.yaml#
147*4882a593Smuzhiyun    properties:
148*4882a593Smuzhiyun      compatible:
149*4882a593Smuzhiyun        enum:
150*4882a593Smuzhiyun          - cirrus,lochnagar2-vddcore
151*4882a593Smuzhiyun
152*4882a593Smuzhiyun      SYSVDD-supply:
153*4882a593Smuzhiyun        description:
154*4882a593Smuzhiyun          Primary power supply for the Lochnagar.
155*4882a593Smuzhiyun    required:
156*4882a593Smuzhiyun      - compatible
157*4882a593Smuzhiyun
158*4882a593Smuzhiyun  MICVDD:
159*4882a593Smuzhiyun    description:
160*4882a593Smuzhiyun      Initialisation data for the MICVDD regulator, which supplies the
161*4882a593Smuzhiyun      CODECs MICVDD.
162*4882a593Smuzhiyun    type: object
163*4882a593Smuzhiyun    $ref: /schemas/regulator/regulator.yaml#
164*4882a593Smuzhiyun    properties:
165*4882a593Smuzhiyun      compatible:
166*4882a593Smuzhiyun        enum:
167*4882a593Smuzhiyun          - cirrus,lochnagar2-micvdd
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun      SYSVDD-supply:
170*4882a593Smuzhiyun        description:
171*4882a593Smuzhiyun          Primary power supply for the Lochnagar.
172*4882a593Smuzhiyun    required:
173*4882a593Smuzhiyun      - compatible
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun  MIC1VDD:
176*4882a593Smuzhiyun    description:
177*4882a593Smuzhiyun      Initialisation data for the MIC1VDD supplies.
178*4882a593Smuzhiyun    type: object
179*4882a593Smuzhiyun    $ref: /schemas/regulator/regulator.yaml#
180*4882a593Smuzhiyun    properties:
181*4882a593Smuzhiyun      compatible:
182*4882a593Smuzhiyun        enum:
183*4882a593Smuzhiyun          - cirrus,lochnagar2-mic1vdd
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun      cirrus,micbias-input:
186*4882a593Smuzhiyun        description:
187*4882a593Smuzhiyun          A property selecting which of the CODEC minicard micbias outputs
188*4882a593Smuzhiyun          should be used.
189*4882a593Smuzhiyun        $ref: /schemas/types.yaml#/definitions/uint32
190*4882a593Smuzhiyun        minimum: 1
191*4882a593Smuzhiyun        maximum: 4
192*4882a593Smuzhiyun
193*4882a593Smuzhiyun      MICBIAS1-supply:
194*4882a593Smuzhiyun        description:
195*4882a593Smuzhiyun          Regulator supplies for the MIC1VDD outputs, supplying the digital
196*4882a593Smuzhiyun          microphones, normally supplied from the attached CODEC.
197*4882a593Smuzhiyun    required:
198*4882a593Smuzhiyun      - compatible
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun  MIC2VDD:
201*4882a593Smuzhiyun    description:
202*4882a593Smuzhiyun      Initialisation data for the MIC2VDD supplies.
203*4882a593Smuzhiyun    type: object
204*4882a593Smuzhiyun    $ref: /schemas/regulator/regulator.yaml#
205*4882a593Smuzhiyun    properties:
206*4882a593Smuzhiyun      compatible:
207*4882a593Smuzhiyun        enum:
208*4882a593Smuzhiyun          - cirrus,lochnagar2-mic2vdd
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun      cirrus,micbias-input:
211*4882a593Smuzhiyun        description:
212*4882a593Smuzhiyun          A property selecting which of the CODEC minicard micbias outputs
213*4882a593Smuzhiyun          should be used.
214*4882a593Smuzhiyun        $ref: /schemas/types.yaml#/definitions/uint32
215*4882a593Smuzhiyun        minimum: 1
216*4882a593Smuzhiyun        maximum: 4
217*4882a593Smuzhiyun
218*4882a593Smuzhiyun      MICBIAS2-supply:
219*4882a593Smuzhiyun        description:
220*4882a593Smuzhiyun          Regulator supplies for the MIC2VDD outputs, supplying the digital
221*4882a593Smuzhiyun          microphones, normally supplied from the attached CODEC.
222*4882a593Smuzhiyun    required:
223*4882a593Smuzhiyun      - compatible
224*4882a593Smuzhiyun
225*4882a593Smuzhiyun  VDD1V8:
226*4882a593Smuzhiyun    description:
227*4882a593Smuzhiyun      Recommended fixed regulator for the VDD1V8 regulator, which supplies
228*4882a593Smuzhiyun      the CODECs analog and 1.8V digital supplies.
229*4882a593Smuzhiyun    type: object
230*4882a593Smuzhiyun    $ref: /schemas/regulator/regulator.yaml#
231*4882a593Smuzhiyun    properties:
232*4882a593Smuzhiyun      compatible:
233*4882a593Smuzhiyun        enum:
234*4882a593Smuzhiyun          - regulator-fixed
235*4882a593Smuzhiyun
236*4882a593Smuzhiyun      regulator-min-microvolt:
237*4882a593Smuzhiyun        const: 1800000
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun      regulator-max-microvolt:
240*4882a593Smuzhiyun        const: 1800000
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun      vin-supply:
243*4882a593Smuzhiyun        description:
244*4882a593Smuzhiyun          Should be set to same supply as SYSVDD
245*4882a593Smuzhiyun    required:
246*4882a593Smuzhiyun      - compatible
247*4882a593Smuzhiyun      - regulator-min-microvolt
248*4882a593Smuzhiyun      - regulator-max-microvolt
249*4882a593Smuzhiyun      - regulator-boot-on
250*4882a593Smuzhiyun      - regulator-always-on
251*4882a593Smuzhiyun      - vin-supply
252*4882a593Smuzhiyun
253*4882a593Smuzhiyunrequired:
254*4882a593Smuzhiyun  - compatible
255*4882a593Smuzhiyun  - reg
256*4882a593Smuzhiyun  - reset-gpios
257*4882a593Smuzhiyun  - lochnagar-clk
258*4882a593Smuzhiyun  - lochnagar-pinctrl
259*4882a593Smuzhiyun
260*4882a593SmuzhiyunadditionalProperties: false
261*4882a593Smuzhiyun
262*4882a593Smuzhiyunexamples:
263*4882a593Smuzhiyun  - |
264*4882a593Smuzhiyun    #include <dt-bindings/clk/lochnagar.h>
265*4882a593Smuzhiyun    #include <dt-bindings/pinctrl/lochnagar.h>
266*4882a593Smuzhiyun    i2c@e0004000 {
267*4882a593Smuzhiyun        #address-cells = <1>;
268*4882a593Smuzhiyun        #size-cells = <0>;
269*4882a593Smuzhiyun        reg = <0xe0004000 0x1000>;
270*4882a593Smuzhiyun
271*4882a593Smuzhiyun        lochnagar: lochnagar@22 {
272*4882a593Smuzhiyun            compatible = "cirrus,lochnagar2";
273*4882a593Smuzhiyun            reg = <0x22>;
274*4882a593Smuzhiyun
275*4882a593Smuzhiyun            reset-gpios = <&gpio0 55 0>;
276*4882a593Smuzhiyun            present-gpios = <&gpio0 60 0>;
277*4882a593Smuzhiyun
278*4882a593Smuzhiyun            lochnagarclk: lochnagar-clk {
279*4882a593Smuzhiyun                compatible = "cirrus,lochnagar2-clk";
280*4882a593Smuzhiyun
281*4882a593Smuzhiyun                #clock-cells = <1>;
282*4882a593Smuzhiyun                clocks = <&clkaudio>, <&clkpmic>;
283*4882a593Smuzhiyun                clock-names = "ln-gf-mclk2", "ln-pmic-32k";
284*4882a593Smuzhiyun
285*4882a593Smuzhiyun                assigned-clocks = <&lochnagarclk LOCHNAGAR_CDC_MCLK1>,
286*4882a593Smuzhiyun                                  <&lochnagarclk LOCHNAGAR_CDC_MCLK2>;
287*4882a593Smuzhiyun                assigned-clock-parents = <&clkaudio>, <&clkpmic>;
288*4882a593Smuzhiyun            };
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun            clkpmic: lochnagar-pmic32k {
291*4882a593Smuzhiyun                compatible = "fixed-clock";
292*4882a593Smuzhiyun                #clock-cells = <0>;
293*4882a593Smuzhiyun                clock-frequency = <32768>;
294*4882a593Smuzhiyun            };
295*4882a593Smuzhiyun
296*4882a593Smuzhiyun            lochnagar-pinctrl {
297*4882a593Smuzhiyun                compatible = "cirrus,lochnagar-pinctrl";
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun                gpio-controller;
300*4882a593Smuzhiyun                #gpio-cells = <2>;
301*4882a593Smuzhiyun                gpio-ranges = <&lochnagar 0 0 LOCHNAGAR2_PIN_NUM_GPIOS>;
302*4882a593Smuzhiyun
303*4882a593Smuzhiyun                pinctrl-names = "default";
304*4882a593Smuzhiyun                pinctrl-0 = <&pinsettings>;
305*4882a593Smuzhiyun
306*4882a593Smuzhiyun                pinsettings: pin-settings {
307*4882a593Smuzhiyun                    ap2aif-pins {
308*4882a593Smuzhiyun                        input-enable;
309*4882a593Smuzhiyun                        groups = "gf-aif1";
310*4882a593Smuzhiyun                        function = "codec-aif3";
311*4882a593Smuzhiyun                    };
312*4882a593Smuzhiyun                    codec2aif-pins {
313*4882a593Smuzhiyun                        output-enable;
314*4882a593Smuzhiyun                        groups = "codec-aif3";
315*4882a593Smuzhiyun                        function = "gf-aif1";
316*4882a593Smuzhiyun                    };
317*4882a593Smuzhiyun                };
318*4882a593Smuzhiyun            };
319*4882a593Smuzhiyun
320*4882a593Smuzhiyun            lochnagar-sc {
321*4882a593Smuzhiyun                compatible = "cirrus,lochnagar2-soundcard";
322*4882a593Smuzhiyun
323*4882a593Smuzhiyun                #sound-dai-cells = <1>;
324*4882a593Smuzhiyun
325*4882a593Smuzhiyun                clocks = <&lochnagarclk LOCHNAGAR_SOUNDCARD_MCLK>;
326*4882a593Smuzhiyun                clock-names = "mclk";
327*4882a593Smuzhiyun            };
328*4882a593Smuzhiyun
329*4882a593Smuzhiyun            lochnagar-hwmon {
330*4882a593Smuzhiyun                compatible = "cirrus,lochnagar2-hwmon";
331*4882a593Smuzhiyun            };
332*4882a593Smuzhiyun
333*4882a593Smuzhiyun            MIC1VDD {
334*4882a593Smuzhiyun                compatible = "cirrus,lochnagar2-mic1vdd";
335*4882a593Smuzhiyun
336*4882a593Smuzhiyun                cirrus,micbias-input = <3>;
337*4882a593Smuzhiyun            };
338*4882a593Smuzhiyun
339*4882a593Smuzhiyun            MICVDD {
340*4882a593Smuzhiyun                compatible = "cirrus,lochnagar2-micvdd";
341*4882a593Smuzhiyun
342*4882a593Smuzhiyun                SYSVDD-supply = <&wallvdd>;
343*4882a593Smuzhiyun
344*4882a593Smuzhiyun                regulator-min-microvolt = <3300000>;
345*4882a593Smuzhiyun                regulator-max-microvolt = <3300000>;
346*4882a593Smuzhiyun            };
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun            VDD1V8 {
349*4882a593Smuzhiyun                compatible = "regulator-fixed";
350*4882a593Smuzhiyun
351*4882a593Smuzhiyun                regulator-name = "VDD1V8";
352*4882a593Smuzhiyun                regulator-min-microvolt = <1800000>;
353*4882a593Smuzhiyun                regulator-max-microvolt = <1800000>;
354*4882a593Smuzhiyun                regulator-boot-on;
355*4882a593Smuzhiyun                regulator-always-on;
356*4882a593Smuzhiyun
357*4882a593Smuzhiyun                vin-supply = <&wallvdd>;
358*4882a593Smuzhiyun            };
359*4882a593Smuzhiyun        };
360*4882a593Smuzhiyun    };
361