File Index
Files and directories
Sign in
FILE

cirrus,lochnagar.yaml

File preview with syntax highlighting.

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