GNU Linux-libre 5.19-rc6-gnu
[releases.git] / Documentation / devicetree / bindings / sound / imx-audio-card.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/imx-audio-card.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: NXP i.MX audio sound card.
8
9 maintainers:
10   - Shengjiu Wang <shengjiu.wang@nxp.com>
11
12 properties:
13   compatible:
14     enum:
15       - fsl,imx-audio-card
16
17   model:
18     $ref: /schemas/types.yaml#/definitions/string
19     description: User specified audio sound card name
20
21   audio-routing:
22     $ref: /schemas/types.yaml#/definitions/non-unique-string-array
23     description:
24       A list of the connections between audio components. Each entry is a
25       pair of strings, the first being the connection's sink, the second
26       being the connection's source. Valid names could be power supplies,
27       MicBias of codec and the jacks on the board.
28
29 patternProperties:
30   ".*-dai-link$":
31     description:
32       Each subnode represents a dai link. Subnodes of each dai links would be
33       cpu/codec dais.
34
35     type: object
36
37     properties:
38       link-name:
39         description: Indicates dai-link name and PCM stream name.
40         $ref: /schemas/types.yaml#/definitions/string
41         maxItems: 1
42
43       format:
44         description: audio format.
45         items:
46           enum:
47             - i2s
48             - dsp_b
49
50       dai-tdm-slot-num:
51         description: see tdm-slot.txt.
52         $ref: /schemas/types.yaml#/definitions/uint32
53
54       dai-tdm-slot-width:
55         description: see tdm-slot.txt.
56         $ref: /schemas/types.yaml#/definitions/uint32
57
58       cpu:
59         description: Holds subnode which indicates cpu dai.
60         type: object
61         properties:
62           sound-dai:
63             maxItems: 1
64
65       codec:
66         description: Holds subnode which indicates codec dai.
67         type: object
68         properties:
69           sound-dai:
70             minItems: 1
71             maxItems: 2
72
73       fsl,mclk-equal-bclk:
74         description: Indicates mclk can be equal to bclk, especially for sai interface
75         $ref: /schemas/types.yaml#/definitions/flag
76
77     required:
78       - link-name
79       - cpu
80
81     additionalProperties: false
82
83 required:
84   - compatible
85   - model
86
87 additionalProperties: false
88
89 examples:
90   - |
91     sound-ak4458 {
92         compatible = "fsl,imx-audio-card";
93         model = "ak4458-audio";
94         pri-dai-link {
95             link-name = "akcodec";
96             format = "i2s";
97             fsl,mclk-equal-bclk;
98             cpu {
99                  sound-dai = <&sai1>;
100             };
101             codec {
102                  sound-dai = <&ak4458_1>, <&ak4458_2>;
103             };
104         };
105         fe-dai-link {
106             link-name = "HiFi-ASRC-FE";
107             format = "i2s";
108             cpu {
109                 sound-dai = <&easrc>;
110             };
111         };
112         be-dai-link {
113             link-name = "HiFi-ASRC-BE";
114             format = "dsp_b";
115             dai-tdm-slot-num = <8>;
116             dai-tdm-slot-width = <32>;
117             fsl,mclk-equal-bclk;
118             cpu {
119                 sound-dai = <&sai1>;
120             };
121             codec {
122                 sound-dai = <&ak4458_1>, <&ak4458_2>;
123             };
124         };
125     };