1 // SPDX-License-Identifier: GPL-2.0 1 // SPDX-License-Identifier: GPL-2.0 2 /* 2 /* 3 * audio-graph-card2-custom-sample.dtsi 3 * audio-graph-card2-custom-sample.dtsi 4 * 4 * 5 * Copyright (C) 2020 Renesas Electronics Corp 5 * Copyright (C) 2020 Renesas Electronics Corp. 6 * Copyright (C) 2020 Kuninori Morimoto <kunino 6 * Copyright (C) 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 7 * 7 * 8 * This sample indicates how to use audio-grap 8 * This sample indicates how to use audio-graph-card2 and its 9 * custom driver. "audio-graph-card2-custom-sa 9 * custom driver. "audio-graph-card2-custom-sample" is the custome driver 10 * which is using audio-graph-card2. 10 * which is using audio-graph-card2. 11 * 11 * 12 * You can easily use this sample by adding be 12 * You can easily use this sample by adding below line on your DT file, 13 * and add new CONFIG to your .config. 13 * and add new CONFIG to your .config. 14 * 14 * 15 * #include "../../../../../sound/soc/gen 15 * #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample.dtsi" 16 * 16 * 17 * CONFIG_SND_AUDIO_GRAPH_CARD2 17 * CONFIG_SND_AUDIO_GRAPH_CARD2 18 * CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SA 18 * CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SAMPLE 19 * CONFIG_SND_TEST_COMPONENT 19 * CONFIG_SND_TEST_COMPONENT 20 * 20 * 21 * 21 * 22 * You can indicate more detail each device be 22 * You can indicate more detail each device behavior as debug if you modify 23 * "compatible" on each test-component. see be 23 * "compatible" on each test-component. see below 24 * 24 * 25 * test_cpu { 25 * test_cpu { 26 * - compatible = "test-cpu"; 26 * - compatible = "test-cpu"; 27 * + compatible = "test-cpu-verbose 27 * + compatible = "test-cpu-verbose"; 28 * ... 28 * ... 29 * }; 29 * }; 30 * 30 * 31 * test_codec { 31 * test_codec { 32 * - compatible = "test-codec"; 32 * - compatible = "test-codec"; 33 * + compatible = "test-codec-verbo 33 * + compatible = "test-codec-verbose"; 34 * ... 34 * ... 35 * }; 35 * }; 36 * 36 * 37 * 37 * 38 * Below sample doesn't use "format" property, 38 * Below sample doesn't use "format" property, 39 * because test-component driver (test-cpu/tes 39 * because test-component driver (test-cpu/test-codec) is supporting 40 * snd_soc_dai_ops :: .auto_selectable_formats 40 * snd_soc_dai_ops :: .auto_selectable_formats. 41 * see 41 * see 42 * snd_soc_runtime_get_dai_fmt() 42 * snd_soc_runtime_get_dai_fmt() 43 * linux/sound/soc/generic/test-component 43 * linux/sound/soc/generic/test-component.c :: test_dai_formats 44 */ 44 */ 45 / { 45 / { 46 /* 46 /* 47 * @ : used at links 47 * @ : used at links 48 * 48 * 49 * [Normal] 49 * [Normal] 50 * cpu0 <-@-----------------> code 50 * cpu0 <-@-----------------> codec0 51 * 51 * 52 * [Semi-Multi] 52 * [Semi-Multi] 53 * 53 * 54 * CPU:Codec = 1:N 54 * CPU:Codec = 1:N 55 * 55 * 56 * +-+ 56 * +-+ 57 * cpu7 <-@------->| |-> codec12 57 * cpu7 <-@------->| |-> codec12 58 * | |-> codec13 58 * | |-> codec13 59 * +-+ 59 * +-+ 60 * 60 * 61 * [Multi-CPU/Codec-0] 61 * [Multi-CPU/Codec-0] 62 * +-+ +-+ 62 * +-+ +-+ 63 * cpu1 <--| |<-@--------->| |-> c 63 * cpu1 <--| |<-@--------->| |-> codec1 64 * cpu2 <--| | | |-> 64 * cpu2 <--| | | |-> codec2 65 * +-+ +-+ 65 * +-+ +-+ 66 * 66 * 67 * [Multi-CPU/Codec-1] 67 * [Multi-CPU/Codec-1] 68 * 68 * 69 * +-+ +-+ 69 * +-+ +-+ 70 * | |<-@--------->| | 70 * | |<-@--------->| | 71 * | | | | 71 * | | | | 72 * cpu8 <--| |<----------->| |-> 72 * cpu8 <--| |<----------->| |-> codec14 73 * cpu9 <--| |<---+------->| |-> 73 * cpu9 <--| |<---+------->| |-> codec15 74 * +-+ \------>| |-> 74 * +-+ \------>| |-> codec16 75 * +-+ 75 * +-+ 76 * 76 * 77 * [Multi-CPU/Codec-2] 77 * [Multi-CPU/Codec-2] 78 * 78 * 79 * +-+ +-+ 79 * +-+ +-+ 80 * | |<-@--------->| | 80 * | |<-@--------->| | 81 * | | | | 81 * | | | | 82 * cpu10 <-| |<----------->| |-> 82 * cpu10 <-| |<----------->| |-> codec17 83 * cpu11 <-| |<-----+----->| |-> 83 * cpu11 <-| |<-----+----->| |-> codec18 84 * cpu12 <-| |<----/ +-+ 84 * cpu12 <-| |<----/ +-+ 85 * +-+ 85 * +-+ 86 * 86 * 87 * [DPCM] 87 * [DPCM] 88 * 88 * 89 * CPU3/CPU4 are converting rate 89 * CPU3/CPU4 are converting rate to 44100 90 * 90 * 91 * FE BE 91 * FE BE 92 * **** 92 * **** 93 * cpu3 <-@--* *--@-> codec3 93 * cpu3 <-@--* *--@-> codec3 94 * cpu4 <-@--* * (44.1kHz) 94 * cpu4 <-@--* * (44.1kHz) 95 * **** 95 * **** 96 * 96 * 97 * [DPCM-Multi] 97 * [DPCM-Multi] 98 * 98 * 99 * --NOTE-- 99 * --NOTE-- 100 * Multi-FE is not supported by ASoC. 100 * Multi-FE is not supported by ASoC. 101 * 101 * 102 * FE BE 102 * FE BE 103 * **** +-+ 103 * **** +-+ 104 * cpu5 <-@--* *--@-> | | -> code 104 * cpu5 <-@--* *--@-> | | -> codec4 105 * cpu6 <-@--* * | | -> code 105 * cpu6 <-@--* * | | -> codec5 106 * **** +-+ 106 * **** +-+ 107 * 107 * 108 * [Codec2Codec] 108 * [Codec2Codec] 109 * +-@-> codec 109 * +-@-> codec6 110 * | 110 * | 111 * +---> codec 111 * +---> codec7 112 * 112 * 113 * [Codec2Codec-Multi] 113 * [Codec2Codec-Multi] 114 * 114 * 115 * --NOTE-- 115 * --NOTE-- 116 * Multi connect N:M is not supported 116 * Multi connect N:M is not supported by ASoC. 117 * 117 * 118 * +-+ 118 * +-+ 119 * +-@->| |-> 119 * +-@->| |-> codec8 120 * | | |-> 120 * | | |-> codec9 121 * | +-+ 121 * | +-+ 122 * | +-+ 122 * | +-+ 123 * +--->| |-> 123 * +--->| |-> codec10 124 * | |-> 124 * | |-> codec11 125 * +-+ 125 * +-+ 126 */ 126 */ 127 audio-graph-card2-custom-sample { 127 audio-graph-card2-custom-sample { 128 /* 128 /* 129 * You can use audio-graph-car 129 * You can use audio-graph-card2 directly by using 130 * 130 * 131 * compatible = "audio-graph-c 131 * compatible = "audio-graph-card2"; 132 */ 132 */ 133 compatible = "audio-graph-card 133 compatible = "audio-graph-card2-custom-sample"; 134 134 135 /* for [DPCM] 135 /* for [DPCM] */ 136 /* BE 136 /* BE FE */ 137 routing = "TC DAI3 Playback", 137 routing = "TC DAI3 Playback", "DAI3 Playback", 138 "TC DAI3 Playback", 138 "TC DAI3 Playback", "DAI4 Playback", 139 "DAI3 Capture", 139 "DAI3 Capture", "TC DAI3 Capture", 140 "DAI4 Capture", 140 "DAI4 Capture", "TC DAI3 Capture", 141 /* for [DPCM-Multi] 141 /* for [DPCM-Multi] */ 142 /* BE 142 /* BE FE */ 143 "TC DAI4 Playback", 143 "TC DAI4 Playback", "DAI5 Playback", 144 "TC DAI5 Playback", 144 "TC DAI5 Playback", "DAI5 Playback", 145 "TC DAI4 Playback", 145 "TC DAI4 Playback", "DAI6 Playback", 146 "TC DAI5 Playback", 146 "TC DAI5 Playback", "DAI6 Playback", 147 "DAI5 Capture", 147 "DAI5 Capture", "TC DAI4 Capture", 148 "DAI5 Capture", 148 "DAI5 Capture", "TC DAI5 Capture", 149 "DAI6 Capture", 149 "DAI6 Capture", "TC DAI4 Capture", 150 "DAI6 Capture", 150 "DAI6 Capture", "TC DAI5 Capture", 151 /* for [Codec2Codec] * 151 /* for [Codec2Codec] */ 152 "TC OUT", 152 "TC OUT", "TC DAI7 Playback", 153 "TC DAI6 Capture", 153 "TC DAI6 Capture", "TC IN", 154 /* for [Codec2Codec-Mu 154 /* for [Codec2Codec-Multi] */ 155 "TC OUT", 155 "TC OUT", "TC DAI10 Playback", 156 "TC DAI8 Capture", 156 "TC DAI8 Capture", "TC IN", 157 "TC OUT", 157 "TC OUT", "TC DAI11 Playback", 158 "TC DAI9 Capture", 158 "TC DAI9 Capture", "TC IN"; 159 159 160 links = < 160 links = < 161 /* 161 /* 162 * [Normal]: cpu side 162 * [Normal]: cpu side only 163 * cpu0/codec0 163 * cpu0/codec0 164 */ 164 */ 165 &cpu0 165 &cpu0 166 166 167 /* 167 /* 168 * [Semi-Multi] 168 * [Semi-Multi] 169 * cpu7/codec12/codec1 169 * cpu7/codec12/codec13 170 */ 170 */ 171 &sm0 171 &sm0 172 172 173 /* 173 /* 174 * [Multi-CPU/Codec-0] 174 * [Multi-CPU/Codec-0]: cpu side only 175 * cpu1/cpu2/codec1/co 175 * cpu1/cpu2/codec1/codec2 176 */ 176 */ 177 &mcpu0 177 &mcpu0 178 178 179 /* 179 /* 180 * [Multi-CPU/Codec-1] 180 * [Multi-CPU/Codec-1]: cpu side only 181 * cpu8/cpu9/codec14/c 181 * cpu8/cpu9/codec14/codec15/codec16 182 * 182 * 183 * Because it will rea 183 * Because it will reach to the maximum of sound minor number, 184 * disable it so far. 184 * disable it so far. 185 * If you want to try 185 * If you want to try it, please disable some other one instead. 186 */ 186 */ 187 //&mcpu1 187 //&mcpu1 188 188 189 /* 189 /* 190 * [Multi-CPU/Codec-2] 190 * [Multi-CPU/Codec-2]: cpu side only 191 * cpu10/cpu11/cpu12/c 191 * cpu10/cpu11/cpu12/codec17/codec18 192 * 192 * 193 * Because it will rea 193 * Because it will reach to the maximum of sound minor number, 194 * disable it so far. 194 * disable it so far. 195 * If you want to try 195 * If you want to try it, please disable some other one instead. 196 */ 196 */ 197 //&mcpu2 197 //&mcpu2 198 198 199 /* 199 /* 200 * [DPCM]: both FE / B 200 * [DPCM]: both FE / BE 201 * cpu3/cpu4/codec3 201 * cpu3/cpu4/codec3 202 */ 202 */ 203 &fe00 &fe01 &be0 203 &fe00 &fe01 &be0 204 204 205 /* 205 /* 206 * [DPCM-Multi]: both 206 * [DPCM-Multi]: both FE / BE 207 * cpu5/cpu6/codec4/co 207 * cpu5/cpu6/codec4/codec5 208 */ 208 */ 209 &fe10 &fe11 &be1 209 &fe10 &fe11 &be1 210 210 211 /* 211 /* 212 * [Codec2Codec]: cpu 212 * [Codec2Codec]: cpu side only 213 * codec6/codec7 213 * codec6/codec7 214 */ 214 */ 215 &c2c 215 &c2c 216 216 217 /* 217 /* 218 * [Codec2Codec-Multi] 218 * [Codec2Codec-Multi]: cpu side only 219 * codec8/codec9/codec 219 * codec8/codec9/codec10/codec11 220 */ 220 */ 221 &c2c_m 221 &c2c_m 222 >; 222 >; 223 223 224 multi { 224 multi { 225 #address-cells = <1>; 225 #address-cells = <1>; 226 #size-cells = <0>; 226 #size-cells = <0>; 227 227 228 /* 228 /* 229 * [Multi-CPU-0] 229 * [Multi-CPU-0] 230 * 230 * 231 * +---+ 231 * +---+ +---+ 232 * cpu1 <--|A X|<- 232 * cpu1 <--|A X|<-@------->|x a|-> codec1 233 * cpu2 <--|B | 233 * cpu2 <--|B | | b|-> codec2 234 * +---+ 234 * +---+ +---+ 235 */ 235 */ 236 ports@0 { 236 ports@0 { 237 reg = <0>; 237 reg = <0>; 238 #address-cells 238 #address-cells = <1>; 239 #size-cells = 239 #size-cells = <0>; 240 mcpu0: port@0 { reg = 240 mcpu0: port@0 { reg = <0>; mcpu00_ep: endpoint { remote-endpoint = <&mcodec00_ep>; };};/* (X) to pair */ 241 port@1 { reg = 241 port@1 { reg = <1>; mcpu01_ep: endpoint { remote-endpoint = <&cpu1_ep>; };};/* (A) Multi Element */ 242 port@2 { reg = 242 port@2 { reg = <2>; mcpu02_ep: endpoint { remote-endpoint = <&cpu2_ep>; };};/* (B) Multi Element */ 243 }; 243 }; 244 244 245 /* 245 /* 246 * [Multi-Codec-0] 246 * [Multi-Codec-0] 247 * 247 * 248 * +---+ 248 * +---+ +---+ 249 * cpu1 <--|A X|<- 249 * cpu1 <--|A X|<-@------->|x a|-> codec1 250 * cpu2 <--|B | 250 * cpu2 <--|B | | b|-> codec2 251 * +---+ 251 * +---+ +---+ 252 */ 252 */ 253 ports@1 { 253 ports@1 { 254 reg = <1>; 254 reg = <1>; 255 #address-cells 255 #address-cells = <1>; 256 #size-cells = 256 #size-cells = <0>; 257 port@0 { reg = 257 port@0 { reg = <0>; mcodec00_ep: endpoint { remote-endpoint = <&mcpu00_ep>; };};/* (x) to pair */ 258 port@1 { reg = 258 port@1 { reg = <1>; mcodec01_ep: endpoint { remote-endpoint = <&codec1_ep>; };};/* (a) Multi Element */ 259 port@2 { reg = 259 port@2 { reg = <2>; mcodec02_ep: endpoint { remote-endpoint = <&codec2_ep>; };};/* (b) Multi Element */ 260 }; 260 }; 261 261 262 /* 262 /* 263 * [DPCM-Multi]::BE 263 * [DPCM-Multi]::BE 264 * 264 * 265 * FE 265 * FE BE 266 * **** 266 * **** +---+ 267 * cpu5 <-@--* *- 267 * cpu5 <-@--* *-----@--->|x a|-> codec4 268 * cpu6 <-@--* * 268 * cpu6 <-@--* * | b|-> codec5 269 * **** 269 * **** +---+ 270 */ 270 */ 271 ports@2 { 271 ports@2 { 272 reg = <2>; 272 reg = <2>; 273 #address-cells 273 #address-cells = <1>; 274 #size-cells = 274 #size-cells = <0>; 275 port@0 { reg = 275 port@0 { reg = <0>; mbe_ep: endpoint { remote-endpoint = <&be10_ep>; };};/* (x) to pair */ 276 port@1 { reg = 276 port@1 { reg = <1>; mbe1_ep: endpoint { remote-endpoint = <&codec4_ep>; };};/* (a) Multi Element */ 277 port@2 { reg = 277 port@2 { reg = <2>; mbe2_ep: endpoint { remote-endpoint = <&codec5_ep>; };};/* (b) Multi Element */ 278 }; 278 }; 279 279 280 /* 280 /* 281 * [Codec2Codec-Multi] 281 * [Codec2Codec-Multi]::CPU 282 * 282 * 283 * +---+ 283 * +---+ 284 * +-@->|X A|- 284 * +-@->|X A|-> codec8 285 * | | B|- 285 * | | B|-> codec9 286 * | +---+ 286 * | +---+ 287 * | +---+ 287 * | +---+ 288 * +--->|x a|- 288 * +--->|x a|-> codec10 289 * | b|- 289 * | b|-> codec11 290 * +---+ 290 * +---+ 291 */ 291 */ 292 ports@3 { 292 ports@3 { 293 reg = <3>; 293 reg = <3>; 294 #address-cells 294 #address-cells = <1>; 295 #size-cells = 295 #size-cells = <0>; 296 port@0 { reg = 296 port@0 { reg = <0>; mc2c0_ep: endpoint { remote-endpoint = <&c2cmf_ep>; };};/* (X) to pair */ 297 port@1 { reg = 297 port@1 { reg = <1>; mc2c00_ep: endpoint { remote-endpoint = <&codec8_ep>; };};/* (A) Multi Element */ 298 port@2 { reg = 298 port@2 { reg = <2>; mc2c01_ep: endpoint { remote-endpoint = <&codec9_ep>; };};/* (B) Multi Element */ 299 }; 299 }; 300 300 301 /* 301 /* 302 * [Codec2Codec-Multi] 302 * [Codec2Codec-Multi]::Codec 303 * 303 * 304 * +---+ 304 * +---+ 305 * +-@->|X A|- 305 * +-@->|X A|-> codec8 306 * | | B|- 306 * | | B|-> codec9 307 * | +---+ 307 * | +---+ 308 * | +---+ 308 * | +---+ 309 * +--->|x a|- 309 * +--->|x a|-> codec10 310 * | b|- 310 * | b|-> codec11 311 * +---+ 311 * +---+ 312 */ 312 */ 313 ports@4 { 313 ports@4 { 314 reg = <4>; 314 reg = <4>; 315 #address-cells 315 #address-cells = <1>; 316 #size-cells = 316 #size-cells = <0>; 317 port@0 { reg = 317 port@0 { reg = <0>; mc2c1_ep: endpoint { remote-endpoint = <&c2cmb_ep>; };};/* (x) to pair */ 318 port@1 { reg = 318 port@1 { reg = <1>; mc2c10_ep: endpoint { remote-endpoint = <&codec10_ep>; };};/* (a) Multi Element */ 319 port@2 { reg = 319 port@2 { reg = <2>; mc2c11_ep: endpoint { remote-endpoint = <&codec11_ep>; };};/* (b) Multi Element */ 320 }; 320 }; 321 321 322 /* 322 /* 323 * [Semi-Multi] 323 * [Semi-Multi] 324 * 324 * 325 * 325 * +---+ 326 * cpu7 <-@------- 326 * cpu7 <-@------->|X A|-> codec12 327 * 327 * | B|-> codec13 328 * 328 * +---+ 329 */ 329 */ 330 ports@5 { 330 ports@5 { 331 reg = <5>; 331 reg = <5>; 332 #address-cells 332 #address-cells = <1>; 333 #size-cells = 333 #size-cells = <0>; 334 port@0 { reg = 334 port@0 { reg = <0>; smcodec0_ep: endpoint { remote-endpoint = <&cpu7_ep>; };};/* (X) to pair */ 335 port@1 { reg = 335 port@1 { reg = <1>; smcodec1_ep: endpoint { remote-endpoint = <&codec12_ep>; };};/* (A) Multi Element */ 336 port@2 { reg = 336 port@2 { reg = <2>; smcodec2_ep: endpoint { remote-endpoint = <&codec13_ep>; };};/* (B) Multi Element */ 337 }; 337 }; 338 338 339 /* 339 /* 340 * [Multi-CPU-1] 340 * [Multi-CPU-1] 341 * 341 * 342 * +---+ 342 * +---+ +---+ 343 * | X|<- 343 * | X|<-@------->|x | 344 * | | 344 * | | | | 345 * cpu8 <--|A 1|< 345 * cpu8 <--|A 1|<--------->|3 a|-> codec14 346 * cpu9 <--|B 2|< 346 * cpu9 <--|B 2|<---+----->|4 b|-> codec15 347 * +---+ 347 * +---+ \---->|5 c|-> codec16 348 * 348 * +---+ 349 */ 349 */ 350 ports@6 { 350 ports@6 { 351 reg = <6>; 351 reg = <6>; 352 #address-cells 352 #address-cells = <1>; 353 #size-cells = 353 #size-cells = <0>; 354 mcpu1: port@0 { reg = 354 mcpu1: port@0 { reg = <0>; mcpu10_ep: endpoint { remote-endpoint = <&mcodec10_ep>; };}; /* (X) to pair */ 355 port@1 { 355 port@1 { 356 #addre 356 #address-cells = <1>; 357 #size- 357 #size-cells = <0>; 358 reg = 358 reg = <1>; 359 mcpu11 359 mcpu11_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu8_ep>; }; /* (A) Multi Element */ 360 mcpu11 360 mcpu11_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec11_ep_0>; }; /* (1) connected Codec */ 361 }; 361 }; 362 port@2 { 362 port@2 { 363 #addre 363 #address-cells = <1>; 364 #size- 364 #size-cells = <0>; 365 reg = 365 reg = <2>; 366 mcpu12 366 mcpu12_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu9_ep>; }; /* (B) Multi Element */ 367 mcpu12 367 mcpu12_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec12_ep_0>; }; /* (2) connected Codec */ 368 mcpu12 368 mcpu12_ep_1: endpoint@2 { reg = <2>; remote-endpoint = <&mcodec13_ep_0>; }; /* (2) connected Codec */ 369 }; 369 }; 370 }; 370 }; 371 371 372 /* 372 /* 373 * [Multi-Codec-1] 373 * [Multi-Codec-1] 374 * 374 * 375 * +---+ 375 * +---+ +---+ 376 * | X|<- 376 * | X|<-@------->|x | 377 * | | 377 * | | | | 378 * cpu8 <--|A 1|< 378 * cpu8 <--|A 1|<--------->|3 a|-> codec14 379 * cpu9 <--|B 2|< 379 * cpu9 <--|B 2|<---+----->|4 b|-> codec15 380 * +---+ 380 * +---+ \---->|5 c|-> codec16 381 * 381 * +---+ 382 */ 382 */ 383 ports@7 { 383 ports@7 { 384 reg = <7>; 384 reg = <7>; 385 #address-cells 385 #address-cells = <1>; 386 #size-cells = 386 #size-cells = <0>; 387 port@0 { reg = 387 port@0 { reg = <0>; mcodec10_ep: endpoint { remote-endpoint = <&mcpu10_ep>; };}; /* (x) to pair */ 388 port@1 { 388 port@1 { 389 #addre 389 #address-cells = <1>; 390 #size- 390 #size-cells = <0>; 391 reg = 391 reg = <1>; 392 mcodec 392 mcodec11_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec14_ep>; }; /* (a) Multi Element */ 393 mcodec 393 mcodec11_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu11_ep_0>; }; /* (3) connected CPU */ 394 }; 394 }; 395 port@2 { 395 port@2 { 396 #addre 396 #address-cells = <1>; 397 #size- 397 #size-cells = <0>; 398 reg = 398 reg = <2>; 399 mcodec 399 mcodec12_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec15_ep>; }; /* (b) Multi Element */ 400 mcodec 400 mcodec12_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu12_ep_0>; }; /* (4) connected CPU */ 401 }; 401 }; 402 port@3 { 402 port@3 { 403 #addre 403 #address-cells = <1>; 404 #size- 404 #size-cells = <0>; 405 reg = 405 reg = <3>; 406 mcodec 406 mcodec13_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec16_ep>; }; /* (c) Multi Element */ 407 mcodec 407 mcodec13_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu12_ep_1>; }; /* (5) connected CPU */ 408 }; 408 }; 409 }; 409 }; 410 410 411 /* 411 /* 412 * [Multi-CPU-2] 412 * [Multi-CPU-2] 413 * 413 * 414 * +---+ 414 * +---+ +---+ 415 * | X|<- 415 * | X|<-@------->|x | 416 * | | 416 * | | | | 417 * cpu10 <-|A 1|< 417 * cpu10 <-|A 1|<--------->|4 a|-> codec17 418 * cpu11 <-|B 2|< 418 * cpu11 <-|B 2|<-----+--->|5 b|-> codec18 419 * cpu12 <-|C 3|< 419 * cpu12 <-|C 3|<----/ +---+ 420 * +---+ 420 * +---+ 421 */ 421 */ 422 ports@8 { 422 ports@8 { 423 reg = <8>; 423 reg = <8>; 424 #address-cells 424 #address-cells = <1>; 425 #size-cells = 425 #size-cells = <0>; 426 mcpu2: port@0 { reg = 426 mcpu2: port@0 { reg = <0>; mcpu20_ep: endpoint { remote-endpoint = <&mcodec20_ep>; };}; /* (X) to pair */ 427 port@1 { 427 port@1 { 428 #addre 428 #address-cells = <1>; 429 #size- 429 #size-cells = <0>; 430 reg = 430 reg = <1>; 431 mcpu21 431 mcpu21_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu10_ep>; }; /* (A) Multi Element */ 432 mcpu21 432 mcpu21_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec21_ep_0>; }; /* (1) connected Codec */ 433 }; 433 }; 434 port@2 { 434 port@2 { 435 #addre 435 #address-cells = <1>; 436 #size- 436 #size-cells = <0>; 437 reg = 437 reg = <2>; 438 mcpu22 438 mcpu22_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu11_ep>; }; /* (B) Multi Element */ 439 mcpu22 439 mcpu22_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec22_ep_0>; }; /* (2) connected Codec */ 440 }; 440 }; 441 port@3 { 441 port@3 { 442 #addre 442 #address-cells = <1>; 443 #size- 443 #size-cells = <0>; 444 reg = 444 reg = <3>; 445 mcpu23 445 mcpu23_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu12_ep>; }; /* (C) Multi Element */ 446 mcpu23 446 mcpu23_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec22_ep_1>; }; /* (3) connected Codec */ 447 }; 447 }; 448 }; 448 }; 449 449 450 /* 450 /* 451 * [Multi-Codec-2] 451 * [Multi-Codec-2] 452 * 452 * 453 * +---+ 453 * +---+ +---+ 454 * | X|<- 454 * | X|<-@------->|x | 455 * | | 455 * | | | | 456 * cpu10 <-|A 1|< 456 * cpu10 <-|A 1|<--------->|4 a|-> codec17 457 * cpu11 <-|B 2|< 457 * cpu11 <-|B 2|<-----+--->|5 b|-> codec18 458 * cpu12 <-|C 3|< 458 * cpu12 <-|C 3|<----/ +---+ 459 * +---+ 459 * +---+ 460 */ 460 */ 461 ports@9 { 461 ports@9 { 462 reg = <9>; 462 reg = <9>; 463 #address-cells 463 #address-cells = <1>; 464 #size-cells = 464 #size-cells = <0>; 465 port@0 { reg = 465 port@0 { reg = <0>; mcodec20_ep: endpoint { remote-endpoint = <&mcpu20_ep>; };}; /* (x) to pair */ 466 port@1 { 466 port@1 { 467 #addre 467 #address-cells = <1>; 468 #size- 468 #size-cells = <0>; 469 reg = 469 reg = <1>; 470 mcodec 470 mcodec21_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec17_ep>; }; /* (a) Multi Element */ 471 mcodec 471 mcodec21_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu21_ep_0>; }; /* (4) connected CPU */ 472 }; 472 }; 473 port@2 { 473 port@2 { 474 #addre 474 #address-cells = <1>; 475 #size- 475 #size-cells = <0>; 476 reg = 476 reg = <2>; 477 mcodec 477 mcodec22_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec18_ep>; }; /* (b) Multi Element */ 478 mcodec 478 mcodec22_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu22_ep_0>; }; /* (5) connected CPU */ 479 mcodec 479 mcodec22_ep_1: endpoint@2 { reg = <2>; remote-endpoint = <&mcpu23_ep_0>; }; /* (5) connected CPU */ 480 }; 480 }; 481 }; 481 }; 482 }; 482 }; 483 483 484 dpcm { 484 dpcm { 485 #address-cells = <1>; 485 #address-cells = <1>; 486 #size-cells = <0>; 486 #size-cells = <0>; 487 487 488 ports@0 { 488 ports@0 { 489 reg = <0>; 489 reg = <0>; 490 490 491 #address-cells 491 #address-cells = <1>; 492 #size-cells = 492 #size-cells = <0>; 493 /* 493 /* 494 * [DPCM]::FE 494 * [DPCM]::FE 495 * 495 * 496 * FE 496 * FE BE 497 * 497 * **** 498 * cpu3 <- 498 * cpu3 <-@(fe00)--* *--(be0)@--> codec3 499 * cpu4 < 499 * cpu4 <-@(fe01)--* * (44.1kHz) 500 * 500 * **** 501 */ 501 */ 502 fe00: port@0 { reg = 502 fe00: port@0 { reg = <0>; fe00_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; }; 503 fe01: port@1 { reg = 503 fe01: port@1 { reg = <1>; fe01_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; }; 504 504 505 /* 505 /* 506 * [DPCM-Multi 506 * [DPCM-Multi]::FE 507 * 507 * 508 * 508 * FE BE 509 * 509 * **** +-+ 510 * cpu5 <- 510 * cpu5 <-@(fe10)--* *---(be1)@-->| |-> codec4 511 * cpu6 <- 511 * cpu6 <-@(fe11)--* * | |-> codec5 512 * 512 * **** +-+ 513 */ 513 */ 514 fe10: port@2 { reg = 514 fe10: port@2 { reg = <2>; fe10_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; }; 515 fe11: port@3 { reg = 515 fe11: port@3 { reg = <3>; fe11_ep: endpoint { remote-endpoint = <&cpu6_ep>; }; }; 516 }; 516 }; 517 517 518 ports@1 { 518 ports@1 { 519 reg = <1>; 519 reg = <1>; 520 520 521 #address-cells 521 #address-cells = <1>; 522 #size-cells = 522 #size-cells = <0>; 523 /* 523 /* 524 * [DPCM]::BE 524 * [DPCM]::BE 525 * 525 * 526 * FE 526 * FE BE 527 * 527 * **** 528 * cpu3 <- 528 * cpu3 <-@(fe00)--* *--(be0)@--> codec3 529 * cpu4 < 529 * cpu4 <-@(fe01)--* * (44.1kHz) 530 * 530 * **** 531 */ 531 */ 532 be0: port@0 { reg = 532 be0: port@0 { reg = <0>; be00_ep: endpoint { remote-endpoint = <&codec3_ep>; }; }; 533 533 534 /* 534 /* 535 * [DPCM-Multi 535 * [DPCM-Multi]::BE 536 * 536 * 537 * 537 * FE BE 538 * 538 * **** +-+ 539 * cpu5 <- 539 * cpu5 <-@(fe10)--* *---(be1)@-->| |-> codec4 540 * cpu6 <- 540 * cpu6 <-@(fe11)--* * | |-> codec5 541 * 541 * **** +-+ 542 */ 542 */ 543 be1: port@1 { reg = 543 be1: port@1 { reg = <1>; be10_ep: endpoint { remote-endpoint = <&mbe_ep>; }; }; 544 }; 544 }; 545 }; 545 }; 546 546 547 codec2codec { 547 codec2codec { 548 #address-cells = <1>; 548 #address-cells = <1>; 549 #size-cells = <0>; 549 #size-cells = <0>; 550 /* 550 /* 551 * [Codec2Codec] 551 * [Codec2Codec] 552 * 552 * 553 * +-@(c2c)-> cod 553 * +-@(c2c)-> codec6 554 * | 554 * | 555 * +--------> cod 555 * +--------> codec7 556 */ 556 */ 557 ports@0 { 557 ports@0 { 558 reg = <0>; 558 reg = <0>; 559 559 560 #address-cells 560 #address-cells = <1>; 561 #size-cells = 561 #size-cells = <0>; 562 562 563 /* use default 563 /* use default settings */ 564 c2c: port@0 { reg = 564 c2c: port@0 { reg = <0>; c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; }; 565 port@1 { reg = 565 port@1 { reg = <1>; c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; }; 566 }; 566 }; 567 567 568 /* 568 /* 569 * [Codec2Codec-Multi] 569 * [Codec2Codec-Multi] 570 * 570 * 571 * 571 * +-+ 572 * +-@(c2c_m)- 572 * +-@(c2c_m)-->| |-> codec8 573 * | 573 * | | |-> codec9 574 * | 574 * | +-+ 575 * | 575 * | +-+ 576 * +---------- 576 * +----------->| |-> codec10 577 * 577 * | |-> codec11 578 * 578 * +-+ 579 */ 579 */ 580 ports@1 { 580 ports@1 { 581 reg = <1>; 581 reg = <1>; 582 582 583 #address-cells 583 #address-cells = <1>; 584 #size-cells = 584 #size-cells = <0>; 585 585 586 /* use origina 586 /* use original settings */ 587 rate = <48000> 587 rate = <48000>; 588 c2c_m: port@0 { reg = 588 c2c_m: port@0 { reg = <0>; c2cmf_ep: endpoint { remote-endpoint = <&mc2c0_ep>; }; }; 589 port@1 { reg = 589 port@1 { reg = <1>; c2cmb_ep: endpoint { remote-endpoint = <&mc2c1_ep>; }; }; 590 }; 590 }; 591 }; 591 }; 592 }; 592 }; 593 593 594 test_cpu { 594 test_cpu { 595 /* 595 /* 596 * update compatible to indica 596 * update compatible to indicate more detail behaviour 597 * if you want. see test-compa 597 * if you want. see test-compatible for more detail. 598 * 598 * 599 * ex) 599 * ex) 600 * - compatible = "test-c 600 * - compatible = "test-cpu"; 601 * + compatible = "test-c 601 * + compatible = "test-cpu-verbose"; 602 */ 602 */ 603 compatible = "test-cpu"; 603 compatible = "test-cpu"; 604 ports { 604 ports { 605 #address-cells = <1>; 605 #address-cells = <1>; 606 #size-cells = <0>; 606 #size-cells = <0>; 607 607 608 bitclock-master; 608 bitclock-master; 609 frame-master; 609 frame-master; 610 /* [Normal] */ 610 /* [Normal] */ 611 cpu0: port@0 { reg = < 611 cpu0: port@0 { reg = <0>; cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; }; 612 612 613 /* [Multi-CPU-0] */ 613 /* [Multi-CPU-0] */ 614 port@1 { reg = < 614 port@1 { reg = <1>; cpu1_ep: endpoint { remote-endpoint = <&mcpu01_ep>; }; }; 615 port@2 { reg = < 615 port@2 { reg = <2>; cpu2_ep: endpoint { remote-endpoint = <&mcpu02_ep>; }; }; 616 616 617 /* [DPCM]::FE */ 617 /* [DPCM]::FE */ 618 port@3 { reg = < 618 port@3 { reg = <3>; cpu3_ep: endpoint { remote-endpoint = <&fe00_ep>; }; }; 619 port@4 { reg = < 619 port@4 { reg = <4>; cpu4_ep: endpoint { remote-endpoint = <&fe01_ep>; }; }; 620 620 621 /* [DPCM-Multi]::FE */ 621 /* [DPCM-Multi]::FE */ 622 port@5 { reg = < 622 port@5 { reg = <5>; cpu5_ep: endpoint { remote-endpoint = <&fe10_ep>; }; }; 623 port@6 { reg = < 623 port@6 { reg = <6>; cpu6_ep: endpoint { remote-endpoint = <&fe11_ep>; }; }; 624 624 625 /* [Semi-Multi] */ 625 /* [Semi-Multi] */ 626 sm0: port@7 { reg = < 626 sm0: port@7 { reg = <7>; cpu7_ep: endpoint { remote-endpoint = <&smcodec0_ep>; }; }; 627 627 628 /* [Multi-CPU-1] */ 628 /* [Multi-CPU-1] */ 629 port@8 { reg = < 629 port@8 { reg = <8>; cpu8_ep: endpoint { remote-endpoint = <&mcpu11_ep>; }; }; 630 port@9 { reg = < 630 port@9 { reg = <9>; cpu9_ep: endpoint { remote-endpoint = <&mcpu12_ep>; }; }; 631 /* [Multi-CPU-2] */ 631 /* [Multi-CPU-2] */ 632 port@a { reg = < 632 port@a { reg = <10>; cpu10_ep: endpoint { remote-endpoint = <&mcpu21_ep>; }; }; 633 port@b { reg = < 633 port@b { reg = <11>; cpu11_ep: endpoint { remote-endpoint = <&mcpu22_ep>; }; }; 634 port@c { reg = < 634 port@c { reg = <12>; cpu12_ep: endpoint { remote-endpoint = <&mcpu23_ep>; }; }; 635 }; 635 }; 636 }; 636 }; 637 637 638 test_codec { 638 test_codec { 639 /* 639 /* 640 * update compatible to indica 640 * update compatible to indicate more detail behaviour 641 * if you want. see test-compa 641 * if you want. see test-compatible for more detail. 642 * 642 * 643 * ex) 643 * ex) 644 * - compatible = "test-c 644 * - compatible = "test-codec"; 645 * + compatible = "test-c 645 * + compatible = "test-codec-verbose"; 646 */ 646 */ 647 compatible = "test-codec"; 647 compatible = "test-codec"; 648 ports { 648 ports { 649 #address-cells = <1>; 649 #address-cells = <1>; 650 #size-cells = <0>; 650 #size-cells = <0>; 651 651 652 /* 652 /* 653 * prefix can be added 653 * prefix can be added to *component*, 654 * see audio-graph-car 654 * see audio-graph-card2::routing 655 */ 655 */ 656 prefix = "TC"; 656 prefix = "TC"; 657 657 658 /* [Normal] */ 658 /* [Normal] */ 659 port@0 { reg = <0>; c 659 port@0 { reg = <0>; codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; }; 660 660 661 /* [Multi-Codec-0] */ 661 /* [Multi-Codec-0] */ 662 port@1 { reg = <1>; c 662 port@1 { reg = <1>; codec1_ep: endpoint { remote-endpoint = <&mcodec01_ep>; }; }; 663 port@2 { reg = <2>; c 663 port@2 { reg = <2>; codec2_ep: endpoint { remote-endpoint = <&mcodec02_ep>; }; }; 664 664 665 /* [DPCM]::BE */ 665 /* [DPCM]::BE */ 666 port@3 { 666 port@3 { 667 convert-rate = 667 convert-rate = <44100>; 668 reg = <3>; cod 668 reg = <3>; codec3_ep: endpoint { remote-endpoint = <&be00_ep>; }; 669 }; 669 }; 670 670 671 /* [DPCM-Multi]::BE */ 671 /* [DPCM-Multi]::BE */ 672 port@4 { reg = <4>; c 672 port@4 { reg = <4>; codec4_ep: endpoint { remote-endpoint = <&mbe1_ep>; }; }; 673 port@5 { reg = <5>; c 673 port@5 { reg = <5>; codec5_ep: endpoint { remote-endpoint = <&mbe2_ep>; }; }; 674 674 675 /* [Codec2Codec] */ 675 /* [Codec2Codec] */ 676 port@6 { bitclock-mas 676 port@6 { bitclock-master; 677 frame-master 677 frame-master; 678 reg = <6>; c 678 reg = <6>; codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; }; 679 port@7 { reg = <7>; c 679 port@7 { reg = <7>; codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; }; 680 680 681 /* [Codec2Codec-Multi] 681 /* [Codec2Codec-Multi] */ 682 port@8 { bitclock-mas 682 port@8 { bitclock-master; 683 frame-master 683 frame-master; 684 reg = <8>; 684 reg = <8>; codec8_ep: endpoint { remote-endpoint = <&mc2c00_ep>; }; }; 685 port@9 { reg = <9>; 685 port@9 { reg = <9>; codec9_ep: endpoint { remote-endpoint = <&mc2c01_ep>; }; }; 686 port@a { reg = <10>; 686 port@a { reg = <10>; codec10_ep: endpoint { remote-endpoint = <&mc2c10_ep>; }; }; 687 port@b { reg = <11>; 687 port@b { reg = <11>; codec11_ep: endpoint { remote-endpoint = <&mc2c11_ep>; }; }; 688 688 689 /* [Semi-Multi] */ 689 /* [Semi-Multi] */ 690 port@c { reg = <12>; c 690 port@c { reg = <12>; codec12_ep: endpoint { remote-endpoint = <&smcodec1_ep>; }; }; 691 port@d { reg = <13>; c 691 port@d { reg = <13>; codec13_ep: endpoint { remote-endpoint = <&smcodec2_ep>; }; }; 692 692 693 /* [Multi-Codec-1] */ 693 /* [Multi-Codec-1] */ 694 port@e { reg = <14>; 694 port@e { reg = <14>; codec14_ep: endpoint { remote-endpoint = <&mcodec11_ep>; }; }; 695 port@f { reg = <15>; 695 port@f { reg = <15>; codec15_ep: endpoint { remote-endpoint = <&mcodec12_ep>; }; }; 696 port@10 { reg = <16>; 696 port@10 { reg = <16>; codec16_ep: endpoint { remote-endpoint = <&mcodec13_ep>; }; }; 697 /* [Multi-Codec-2] */ 697 /* [Multi-Codec-2] */ 698 port@11 { reg = <17>; 698 port@11 { reg = <17>; codec17_ep: endpoint { remote-endpoint = <&mcodec21_ep>; }; }; 699 port@12 { reg = <18>; 699 port@12 { reg = <18>; codec18_ep: endpoint { remote-endpoint = <&mcodec22_ep>; }; }; 700 }; 700 }; 701 }; 701 }; 702 }; 702 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.