Merge tag 'printk-for-5.13-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / sound / amlogic,gx-sound-card.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/amlogic,gx-sound-card.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Amlogic GX sound card
8
9 maintainers:
10   - Jerome Brunet <jbrunet@baylibre.com>
11
12 properties:
13   compatible:
14     items:
15       - const: amlogic,gx-sound-card
16
17   audio-aux-devs:
18     $ref: /schemas/types.yaml#/definitions/phandle-array
19     description: list of auxiliary devices
20
21   audio-routing:
22     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
23     minItems: 2
24     description: |-
25       A list of the connections between audio components. Each entry is a
26       pair of strings, the first being the connection's sink, the second
27       being the connection's source.
28
29   audio-widgets:
30     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
31     minItems: 2
32     description: |-
33       A list off component DAPM widget. Each entry is a pair of strings,
34       the first being the widget type, the second being the widget name
35
36   model:
37     $ref: /schemas/types.yaml#/definitions/string
38     description: User specified audio sound card name
39
40 patternProperties:
41   "^dai-link-[0-9]+$":
42     type: object
43     description: |-
44       dai-link child nodes:
45         Container for dai-link level properties and the CODEC sub-nodes.
46         There should be at least one (and probably more) subnode of this type
47
48     properties:
49       dai-format:
50         $ref: /schemas/types.yaml#/definitions/string
51         enum: [ i2s, left-j, dsp_a ]
52
53       mclk-fs:
54         $ref: /schemas/types.yaml#/definitions/uint32
55         description: |-
56           Multiplication factor between the frame rate and master clock
57           rate
58
59       sound-dai:
60         $ref: /schemas/types.yaml#/definitions/phandle-array
61         description: phandle of the CPU DAI
62
63     patternProperties:
64       "^codec-[0-9]+$":
65         type: object
66         description: |-
67           Codecs:
68           dai-link representing backend links should have at least one subnode.
69           One subnode for each codec of the dai-link. dai-link representing
70           frontend links have no codec, therefore have no subnodes
71
72         properties:
73           sound-dai:
74             $ref: /schemas/types.yaml#/definitions/phandle-array
75             description: phandle of the codec DAI
76
77         required:
78           - sound-dai
79
80     required:
81       - sound-dai
82
83 required:
84   - model
85   - dai-link-0
86
87 additionalProperties: false
88
89 examples:
90   - |
91     sound {
92         compatible = "amlogic,gx-sound-card";
93         model = "GXL-ACME-S905X-FOO";
94         audio-aux-devs = <&amp>;
95         audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
96
97         dai-link-0 {
98                sound-dai = <&i2s_fifo>;
99         };
100
101         dai-link-1 {
102                 sound-dai = <&i2s_encoder>;
103                 dai-format = "i2s";
104                 mclk-fs = <256>;
105
106                 codec-0 {
107                         sound-dai = <&codec0>;
108                 };
109
110                 codec-1 {
111                         sound-dai = <&codec1>;
112                 };
113         };
114     };
115