xref: /freebsd/sys/contrib/device-tree/Bindings/sound/fsl,qmc-audio.yaml (revision 6580f5c38dd5b01aeeaed16b370f1a12423437f0)
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    additionalProperties: false
37
38    properties:
39      reg:
40        minimum: 0
41        maximum: 63
42        description:
43          The DAI number
44
45      fsl,qmc-chan:
46        $ref: /schemas/types.yaml#/definitions/phandle-array
47        items:
48          - items:
49              - description: phandle to QMC node
50              - description: Channel number
51        description:
52          Should be a phandle/number pair. The phandle to QMC node and the QMC
53          channel to use for this DAI.
54
55    required:
56      - reg
57      - fsl,qmc-chan
58
59required:
60  - compatible
61  - '#address-cells'
62  - '#size-cells'
63  - '#sound-dai-cells'
64
65additionalProperties: false
66
67examples:
68  - |
69    audio_controller: audio-controller {
70        compatible = "fsl,qmc-audio";
71        #address-cells = <1>;
72        #size-cells = <0>;
73        #sound-dai-cells = <1>;
74        dai@16 {
75            reg = <16>;
76            fsl,qmc-chan = <&qmc 16>;
77        };
78        dai@17 {
79            reg = <17>;
80            fsl,qmc-chan = <&qmc 17>;
81        };
82    };
83
84    sound {
85        compatible = "simple-audio-card";
86        #address-cells = <1>;
87        #size-cells = <0>;
88        simple-audio-card,dai-link@0 {
89            reg = <0>;
90            format = "dsp_b";
91            cpu {
92                sound-dai = <&audio_controller 16>;
93            };
94            codec {
95                sound-dai = <&codec1>;
96                dai-tdm-slot-num = <4>;
97                dai-tdm-slot-width = <8>;
98                /* TS 3, 5, 7, 9 */
99                dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>;
100                dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>;
101            };
102        };
103        simple-audio-card,dai-link@1 {
104            reg = <1>;
105            format = "dsp_b";
106            cpu {
107                sound-dai = <&audio_controller 17>;
108            };
109            codec {
110                sound-dai = <&codec2>;
111                dai-tdm-slot-num = <4>;
112                dai-tdm-slot-width = <8>;
113                /* TS 2, 4, 6, 8 */
114                dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>;
115                dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
116            };
117        };
118    };
119