Linux 6.10-rc4
[sfrench/cifs-2.6.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 allOf:
13   - $ref: sound-card-common.yaml#
14
15 properties:
16   compatible:
17     items:
18       - const: amlogic,gx-sound-card
19
20   audio-aux-devs:
21     $ref: /schemas/types.yaml#/definitions/phandle-array
22     description: list of auxiliary devices
23
24   audio-widgets:
25     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
26     minItems: 2
27     description: |-
28       A list off component DAPM widget. Each entry is a pair of strings,
29       the first being the widget type, the second being the widget name
30
31 patternProperties:
32   "^dai-link-[0-9]+$":
33     type: object
34     additionalProperties: false
35     description: |-
36       dai-link child nodes:
37         Container for dai-link level properties and the CODEC sub-nodes.
38         There should be at least one (and probably more) subnode of this type
39
40     properties:
41       dai-format:
42         $ref: /schemas/types.yaml#/definitions/string
43         enum: [ i2s, left-j, dsp_a ]
44
45       mclk-fs:
46         $ref: /schemas/types.yaml#/definitions/uint32
47         description: |-
48           Multiplication factor between the frame rate and master clock
49           rate
50
51       sound-dai:
52         maxItems: 1
53         description: phandle of the CPU DAI
54
55     patternProperties:
56       "^codec(-[0-9]+)?$":
57         type: object
58         additionalProperties: false
59         description: |-
60           Codecs:
61           dai-link representing backend links should have at least one subnode.
62           One subnode for each codec of the dai-link. dai-link representing
63           frontend links have no codec, therefore have no subnodes
64
65         properties:
66           sound-dai:
67             maxItems: 1
68             description: phandle of the codec DAI
69
70         required:
71           - sound-dai
72
73     required:
74       - sound-dai
75
76 required:
77   - model
78   - dai-link-0
79
80 unevaluatedProperties: false
81
82 examples:
83   - |
84     sound {
85         compatible = "amlogic,gx-sound-card";
86         model = "GXL-ACME-S905X-FOO";
87         audio-aux-devs = <&amp>;
88         audio-routing = "I2S ENCODER I2S IN", "I2S FIFO Playback";
89
90         dai-link-0 {
91                sound-dai = <&i2s_fifo>;
92         };
93
94         dai-link-1 {
95                 sound-dai = <&i2s_encoder>;
96                 dai-format = "i2s";
97                 mclk-fs = <256>;
98
99                 codec-0 {
100                         sound-dai = <&codec0>;
101                 };
102
103                 codec-1 {
104                         sound-dai = <&codec1>;
105                 };
106         };
107     };