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
7title: NXP i.MX audio sound card.
8
9maintainers:
10  - Shengjiu Wang <shengjiu.wang@nxp.com>
11
12properties:
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
29patternProperties:
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        additionalProperties: false
62        properties:
63          sound-dai:
64            maxItems: 1
65
66      codec:
67        description: Holds subnode which indicates codec dai.
68        type: object
69        additionalProperties: false
70        properties:
71          sound-dai:
72            minItems: 1
73            maxItems: 2
74
75      fsl,mclk-equal-bclk:
76        description: Indicates mclk can be equal to bclk, especially for sai interface
77        $ref: /schemas/types.yaml#/definitions/flag
78
79    required:
80      - link-name
81      - cpu
82
83    additionalProperties: false
84
85required:
86  - compatible
87  - model
88
89additionalProperties: false
90
91examples:
92  - |
93    sound-ak4458 {
94        compatible = "fsl,imx-audio-card";
95        model = "ak4458-audio";
96        pri-dai-link {
97            link-name = "akcodec";
98            format = "i2s";
99            fsl,mclk-equal-bclk;
100            cpu {
101                 sound-dai = <&sai1>;
102            };
103            codec {
104                 sound-dai = <&ak4458_1>, <&ak4458_2>;
105            };
106        };
107        fe-dai-link {
108            link-name = "HiFi-ASRC-FE";
109            format = "i2s";
110            cpu {
111                sound-dai = <&easrc>;
112            };
113        };
114        be-dai-link {
115            link-name = "HiFi-ASRC-BE";
116            format = "dsp_b";
117            dai-tdm-slot-num = <8>;
118            dai-tdm-slot-width = <32>;
119            fsl,mclk-equal-bclk;
120            cpu {
121                sound-dai = <&sai1>;
122            };
123            codec {
124                sound-dai = <&ak4458_1>, <&ak4458_2>;
125            };
126        };
127    };
128