1 // SPDX-License-Identifier: GPL-2.0
3 * audio-graph-card2-custom-sample.dtsi
5 * Copyright (C) 2020 Renesas Electronics Corp.
6 * Copyright (C) 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
8 * This sample indicates how to use audio-graph-card2 and its
9 * custom driver. "audio-graph-card2-custom-sample" is the custome driver
10 * which is using audio-graph-card2.
12 * You can easily use this sample by adding below line on your DT file,
13 * and add new CONFIG to your .config.
15 * #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample.dtsi"
17 * CONFIG_SND_AUDIO_GRAPH_CARD2
18 * CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SAMPLE
19 * CONFIG_SND_TEST_COMPONENT
26 * cpu0 <-@-----------------> codec0
30 * cpu1 <--| |<-@--------->| |-> codec1
31 * cpu2 <--| | | |-> codec2
37 * cpu3 <-@--* *--@-> codec3
44 * Multi-FE is not supported by ASoC.
48 * cpu5 <-@--* *--@-> | | -> codec4
49 * cpu6 <-@--* * | | -> codec5
60 * Multi connect N:M is not supported by ASoC.
71 audio-graph-card2-custom-sample {
73 * You can use audio-graph-card2 directly by using
75 * compatible = "audio-graph-card2";
77 compatible = "audio-graph-card2-custom-sample";
81 routing = "TC DAI3 Playback", "DAI3 Playback",
82 "TC DAI3 Playback", "DAI4 Playback",
83 "DAI3 Capture", "TC DAI3 Capture",
84 "DAI4 Capture", "TC DAI3 Capture",
85 /* for [DPCM-Multi] */
87 "TC DAI4 Playback", "DAI5 Playback",
88 "TC DAI5 Playback", "DAI5 Playback",
89 "TC DAI4 Playback", "DAI6 Playback",
90 "TC DAI5 Playback", "DAI6 Playback",
91 "DAI5 Capture", "TC DAI4 Capture",
92 "DAI5 Capture", "TC DAI5 Capture",
93 "DAI6 Capture", "TC DAI4 Capture",
94 "DAI6 Capture", "TC DAI5 Capture",
95 /* for [Codec2Codec] */
96 "TC OUT", "TC DAI7 Playback",
97 "TC DAI6 Capture", "TC IN",
98 /* for [Codec2Codec-Multi] */
99 "TC OUT", "TC DAI10 Playback",
100 "TC DAI8 Capture", "TC IN",
101 "TC OUT", "TC DAI11 Playback",
102 "TC DAI9 Capture", "TC IN";
104 links = <&cpu0 /* normal: cpu side only */
105 &mcpu0 /* multi: cpu side only */
106 &fe00 &fe01 &be0 /* dpcm: both FE / BE */
107 &fe10 &fe11 &be1 /* dpcm-m: both FE / BE */
108 &c2c /* c2c: cpu side only */
109 &c2c_m /* c2c: cpu side only */
114 mcpu0: port@0 { mcpu0_ep: endpoint { remote-endpoint = <&mcodec0_ep>; }; };
115 port@1 { mcpu1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
116 port@2 { mcpu2_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
119 port@0 { mcodec0_ep: endpoint { remote-endpoint = <&mcpu0_ep>; }; };
120 port@1 { mcodec1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
121 port@2 { mcodec2_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
124 port@0 { mbe_ep: endpoint { remote-endpoint = <&be10_ep>; }; };
125 port@1 { mbe1_ep: endpoint { remote-endpoint = <&codec4_ep>; }; };
126 port@2 { mbe2_ep: endpoint { remote-endpoint = <&codec5_ep>; }; };
129 port@0 { mc2c0_ep: endpoint { remote-endpoint = <&c2cmf_ep>; }; };
130 port@1 { mc2c00_ep: endpoint { remote-endpoint = <&codec8_ep>; }; };
131 port@2 { mc2c01_ep: endpoint { remote-endpoint = <&codec9_ep>; }; };
134 port@0 { mc2c1_ep: endpoint { remote-endpoint = <&c2cmb_ep>; }; };
135 port@1 { mc2c10_ep: endpoint { remote-endpoint = <&codec10_ep>; }; };
136 port@2 { mc2c11_ep: endpoint { remote-endpoint = <&codec11_ep>; }; };
143 fe00: port@0 { fe00_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
144 fe01: port@1 { fe01_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; };
145 fe10: port@2 { fe10_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; };
146 fe11: port@3 { fe11_ep: endpoint { remote-endpoint = <&cpu6_ep>; }; };
150 be0: port@0 { be00_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
151 be1: port@1 { be10_ep: endpoint { remote-endpoint = <&mbe_ep>; }; };
158 c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; };
159 port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; };
163 c2c_m: port@0 { c2cmf_ep: endpoint { remote-endpoint = <&mc2c0_ep>; }; };
164 port@1 { c2cmb_ep: endpoint { remote-endpoint = <&mc2c1_ep>; }; };
171 * update compatible to indicate more detail behaviour
172 * if you want. see test-compatible for more detail.
175 * - compatible = "test-cpu";
176 * + compatible = "test-cpu-verbose";
178 compatible = "test-cpu";
182 cpu0: port@0 { cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
183 port@1 { cpu1_ep: endpoint { remote-endpoint = <&mcpu1_ep>; }; };
184 port@2 { cpu2_ep: endpoint { remote-endpoint = <&mcpu2_ep>; }; };
185 port@3 { cpu3_ep: endpoint { remote-endpoint = <&fe00_ep>; }; };
186 port@4 { cpu4_ep: endpoint { remote-endpoint = <&fe01_ep>; }; };
187 port@5 { cpu5_ep: endpoint { remote-endpoint = <&fe10_ep>; }; };
188 port@6 { cpu6_ep: endpoint { remote-endpoint = <&fe11_ep>; }; };
194 * update compatible to indicate more detail behaviour
195 * if you want. see test-compatible for more detail.
198 * - compatible = "test-codec";
199 * + compatible = "test-codec-verbose";
201 compatible = "test-codec";
204 * prefix can be added to *component*,
205 * see audio-graph-card2::routing
209 port@0 { codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
210 port@1 { codec1_ep: endpoint { remote-endpoint = <&mcodec1_ep>; }; };
211 port@2 { codec2_ep: endpoint { remote-endpoint = <&mcodec2_ep>; }; };
212 port@3 { codec3_ep: endpoint { remote-endpoint = <&be00_ep>; }; };
213 port@4 { codec4_ep: endpoint { remote-endpoint = <&mbe1_ep>; }; };
214 port@5 { codec5_ep: endpoint { remote-endpoint = <&mbe2_ep>; }; };
215 port@6 { bitclock-master;
217 codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; };
218 port@7 { codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; };
219 port@8 { bitclock-master;
221 codec8_ep: endpoint { remote-endpoint = <&mc2c00_ep>; }; };
222 port@9 { codec9_ep: endpoint { remote-endpoint = <&mc2c01_ep>; }; };
223 port@10 { codec10_ep: endpoint { remote-endpoint = <&mc2c10_ep>; }; };
224 port@11 { codec11_ep: endpoint { remote-endpoint = <&mc2c11_ep>; }; };