xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi (revision a0ca4af9455b844c5e094fc1b09b1390ffa979fc)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree for ULCB + Audio Graph Card2 (MIX + TDM Split)
4 *
5 * Copyright (C) 2022 Renesas Electronics Corp.
6 */
7
8/*
9 * Note:
10 * The HDMI output is ignored due to the limited number of subdevices
11 *
12 *	(A) CPU0 (2ch) <----> (2ch) (X) ak4613	(MIX-0)
13 *	(B) CPU1 (2ch)  --/			(MIX-1)
14 *
15 *	(A) aplay   -D plughw:0,0 xxx.wav
16 *	(B) aplay   -D plughw:0,1 xxx.wav
17 *
18 *	(A) arecord -D plughw:0,0 xxx.wav
19 */
20/ {
21	sound_card: sound {
22		compatible = "audio-graph-card2";
23		label = "snd-ulcb-mix";
24
25		routing = "ak4613 Playback", "DAI0 Playback",
26			  "ak4613 Playback", "DAI1 Playback",
27			  "DAI0 Capture",    "ak4613 Capture";
28
29		links = <&fe_a		/* (A) CPU0   */
30			 &fe_b		/* (B) CPU1   */
31			 &be_x		/* (X) ak4613 */
32		>;
33
34		dpcm {
35			#address-cells = <1>;
36			#size-cells = <0>;
37
38			ports@0 {
39				#address-cells = <1>;
40				#size-cells = <0>;
41				reg = <0>;
42				/*
43				 * FE
44				 * (A) CPU0 (MIX-0)
45				 * (B) CPU1 (MIX-1)
46				 */
47				fe_a: port@0 { reg = <0>; fe_a_ep: endpoint { remote-endpoint = <&rsnd_a_ep>; }; };
48				fe_b: port@1 { reg = <1>; fe_b_ep: endpoint { remote-endpoint = <&rsnd_b_ep>; }; };
49			};
50
51			ports@1 {
52				reg = <1>;
53				/*
54				 * BE
55				 * (X) ak4613
56				 */
57				be_x: port { be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
58			};
59		};
60	};
61};
62
63&ak4613 {
64	port {
65		/*
66		 * (X) ak4613
67		 */
68		prefix = "ak4613";
69		convert-rate = <48000>;
70
71		ak4613_x_ep: endpoint {
72			remote-endpoint = <&be_x_ep>;
73		};
74	};
75};
76
77&rcar_sound {
78	#address-cells = <1>;
79	#size-cells = <0>;
80
81	ports@0 {
82		#address-cells = <1>;
83		#size-cells = <0>;
84		reg = <0>;
85
86		/*
87		 * (A) CPU0
88		 */
89		port@0 {
90			reg = <0>;
91			rsnd_a_ep: endpoint {
92				remote-endpoint = <&fe_a_ep>;
93				bitclock-master;
94				frame-master;
95				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
96				capture  = <&ssi1 &src0 &dvc1>;
97			};
98		};
99		/*
100		 * (B) CPU1
101		 */
102		port@1 {
103			reg = <1>;
104			rsnd_b_ep: endpoint {
105				remote-endpoint = <&fe_b_ep>;
106				bitclock-master;
107				frame-master;
108				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
109			};
110		};
111	};
112};
113