1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/sound/fsl,qmc-audio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: QMC audio
8
9maintainers:
10  - Herve Codina <herve.codina@bootlin.com>
11
12description: |
13  The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
14  Controller) channels to transfer the audio data.
15  It provides as many DAI as the number of QMC channel used.
16
17allOf:
18  - $ref: dai-common.yaml#
19
20properties:
21  compatible:
22    const: fsl,qmc-audio
23
24  '#address-cells':
25    const: 1
26  '#size-cells':
27    const: 0
28  '#sound-dai-cells':
29    const: 1
30
31patternProperties:
32  '^dai@([0-9]|[1-5][0-9]|6[0-3])$':
33    description:
34      A DAI managed by this controller
35    type: object
36
37    properties:
38      reg:
39        minimum: 0
40        maximum: 63
41        description:
42          The DAI number
43
44      fsl,qmc-chan:
45        $ref: /schemas/types.yaml#/definitions/phandle-array
46        items:
47          - items:
48              - description: phandle to QMC node
49              - description: Channel number
50        description:
51          Should be a phandle/number pair. The phandle to QMC node and the QMC
52          channel to use for this DAI.
53
54    required:
55      - reg
56      - fsl,qmc-chan
57
58required:
59  - compatible
60  - '#address-cells'
61  - '#size-cells'
62  - '#sound-dai-cells'
63
64additionalProperties: false
65
66examples:
67  - |
68    audio_controller: audio-controller {
69        compatible = "fsl,qmc-audio";
70        #address-cells = <1>;
71        #size-cells = <0>;
72        #sound-dai-cells = <1>;
73        dai@16 {
74            reg = <16>;
75            fsl,qmc-chan = <&qmc 16>;
76        };
77        dai@17 {
78            reg = <17>;
79            fsl,qmc-chan = <&qmc 17>;
80        };
81    };
82
83    sound {
84        compatible = "simple-audio-card";
85        #address-cells = <1>;
86        #size-cells = <0>;
87        simple-audio-card,dai-link@0 {
88            reg = <0>;
89            format = "dsp_b";
90            cpu {
91                sound-dai = <&audio_controller 16>;
92            };
93            codec {
94                sound-dai = <&codec1>;
95                dai-tdm-slot-num = <4>;
96                dai-tdm-slot-width = <8>;
97                /* TS 3, 5, 7, 9 */
98                dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>;
99                dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>;
100            };
101        };
102        simple-audio-card,dai-link@1 {
103            reg = <1>;
104            format = "dsp_b";
105            cpu {
106                sound-dai = <&audio_controller 17>;
107            };
108            codec {
109                sound-dai = <&codec2>;
110                dai-tdm-slot-num = <4>;
111                dai-tdm-slot-width = <8>;
112                /* TS 2, 4, 6, 8 */
113                dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>;
114                dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
115            };
116        };
117    };
118