Merge tag 'block-6.13-20242901' of git://git.kernel.dk/linux
[drm/drm-misc.git] / Documentation / devicetree / bindings / sound / amlogic,axg-sound-card.yaml
blob4f13e8ab50b2a4564c06963221e233a18eb6af81
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Amlogic AXG sound card
9 maintainers:
10   - Jerome Brunet <jbrunet@baylibre.com>
12 allOf:
13   - $ref: sound-card-common.yaml#
15 properties:
16   compatible:
17     const: amlogic,axg-sound-card
19   audio-aux-devs:
20     $ref: /schemas/types.yaml#/definitions/phandle-array
21     description: list of auxiliary devices
23   audio-widgets:
24     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
25     description:
26       A list off component DAPM widget. Each entry is a pair of strings,
27       the first being the widget type, the second being the widget name
29   clocks:
30     minItems: 1
31     maxItems: 3
32     description:
33       Base PLL clocks of audio susbsytem, used to configure base clock
34       frequencies for different audio use-cases.
36 patternProperties:
37   "^dai-link-[0-9]+$":
38     type: object
39     additionalProperties: false
40     description:
41       Container for dai-link level properties and the CODEC sub-nodes.
42       There should be at least one (and probably more) subnode of this type
44     properties:
45       dai-format:
46         $ref: /schemas/types.yaml#/definitions/string
47         enum: [ i2s, left-j, dsp_a ]
49       dai-tdm-slot-num:
50         $ref: /schemas/types.yaml#/definitions/uint32
51         description:
52           Number of slots in use. If omitted, slot number is set to
53           accommodate the largest mask provided.
54         maximum: 32
56       dai-tdm-slot-width:
57         $ref: /schemas/types.yaml#/definitions/uint32
58         description: Width in bits for each slot
59         enum: [ 8, 16, 20, 24, 32 ]
60         default: 32
62       mclk-fs:
63         $ref: /schemas/types.yaml#/definitions/uint32
64         description:
65           Multiplication factor between the frame rate and master clock
66           rate
68       sound-dai:
69         maxItems: 1
70         description: phandle of the CPU DAI
72     patternProperties:
73       "^dai-tdm-slot-(t|r)x-mask-[0-3]$":
74         $ref: /schemas/types.yaml#/definitions/uint32-array
75         minItems: 1
76         maxItems: 32
77         description:
78           Transmit and receive cpu slot masks of each TDM lane
79           When omitted, mask is assumed to have to no slots. A valid
80           interface must have at least one slot, so at least one these
81           mask should be provided with an enabled slot.
83       "^codec(-[0-9]+)?$":
84         type: object
85         additionalProperties: false
86         description:
87           dai-link representing backend links should have at least one subnode.
88           One subnode for each codec of the dai-link. dai-link representing
89           frontend links have no codec, therefore have no subnodes
91         properties:
92           sound-dai:
93             maxItems: 1
94             description: phandle of the codec DAI
96         patternProperties:
97           "^dai-tdm-slot-(t|r)x-mask$":
98             $ref: /schemas/types.yaml#/definitions/uint32-array
99             minItems: 1
100             maxItems: 32
101             description: Transmit and receive codec slot masks
103         required:
104           - sound-dai
106     required:
107       - sound-dai
109 required:
110   - dai-link-0
112 unevaluatedProperties: false
114 examples:
115   - |
116     sound {
117         compatible = "amlogic,axg-sound-card";
118         model = "AXG-S420";
119         audio-aux-devs = <&tdmin_a>, <&tdmout_c>;
120         audio-widgets = "Line", "Lineout",
121                         "Line", "Linein",
122                         "Speaker", "Speaker1 Left",
123                         "Speaker", "Speaker1 Right",
124                         "Speaker", "Speaker2 Left",
125                         "Speaker", "Speaker2 Right";
126         audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
127                         "SPDIFOUT IN 0", "FRDDR_A OUT 3",
128                         "TDM_C Playback", "TDMOUT_C OUT",
129                         "TDMIN_A IN 2", "TDM_C Capture",
130                         "TDMIN_A IN 5", "TDM_C Loopback",
131                         "TODDR_A IN 0", "TDMIN_A OUT",
132                         "Lineout", "Lineout AOUTL",
133                         "Lineout", "Lineout AOUTR",
134                         "Speaker1 Left", "SPK1 OUT_A",
135                         "Speaker2 Left", "SPK2 OUT_A",
136                         "Speaker1 Right", "SPK1 OUT_B",
137                         "Speaker2 Right", "SPK2 OUT_B",
138                         "Linein AINL", "Linein",
139                         "Linein AINR", "Linein";
141         dai-link-0 {
142             sound-dai = <&frddr_a>;
143         };
145         dai-link-1 {
146             sound-dai = <&toddr_a>;
147         };
149         dai-link-2 {
150             sound-dai = <&tdmif_c>;
151             dai-format = "i2s";
152             dai-tdm-slot-tx-mask-2 = <1 1>;
153             dai-tdm-slot-tx-mask-3 = <1 1>;
154             dai-tdm-slot-rx-mask-1 = <1 1>;
155             mclk-fs = <256>;
157             codec-0 {
158                 sound-dai = <&lineout>;
159             };
161             codec-1 {
162                 sound-dai = <&speaker_amp1>;
163             };
165             codec-2 {
166                 sound-dai = <&speaker_amp2>;
167             };
169             codec-3 {
170                 sound-dai = <&linein>;
171             };
172         };
174         dai-link-3 {
175             sound-dai = <&spdifout>;
177             codec {
178                 sound-dai = <&spdif_dit>;
179             };
180         };
181     };