xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card2-mix+split.dtsi (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
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 = "rcar-sound";
24
25		routing = "ak4613 Playback", "DAI0 Playback",
26			  "ak4613 Playback", "DAI1 Playback",
27			  "DAI0 Capture",    "ak4613 Capture";
28
29		/delete-property/ dais;
30		links = <&fe_a		/* (A) CPU0   */
31			 &fe_b		/* (B) CPU1   */
32			 &be_x		/* (X) ak4613 */
33		>;
34
35		dpcm {
36			#address-cells = <1>;
37			#size-cells = <0>;
38
39			ports@0 {
40				#address-cells = <1>;
41				#size-cells = <0>;
42				reg = <0>;
43				/*
44				 * FE
45				 * (A) CPU0 (MIX-0)
46				 * (B) CPU1 (MIX-1)
47				 */
48				fe_a: port@0 { reg = <0>; fe_a_ep: endpoint { remote-endpoint = <&rsnd_a_ep>; }; };
49				fe_b: port@1 { reg = <1>; fe_b_ep: endpoint { remote-endpoint = <&rsnd_b_ep>; }; };
50			};
51
52			ports@1 {
53				#address-cells = <1>;
54				#size-cells = <0>;
55				reg = <1>;
56				/*
57				 * BE
58				 * (X) ak4613
59				 */
60				be_x: port@0 { reg = <0>; be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
61			};
62		};
63	};
64};
65
66&ak4613 {
67	port {
68		/*
69		 * (X) ak4613
70		 */
71		prefix = "ak4613";
72		convert-rate = <48000>;
73
74		ak4613_x_ep: endpoint {
75			remote-endpoint = <&be_x_ep>;
76		};
77	};
78};
79
80&rcar_sound {
81	ports {
82		#address-cells = <1>;
83		#size-cells = <0>;
84
85		/*
86		 * (A) CPU0
87		 */
88		port@0 {
89			reg = <0>;
90			rsnd_a_ep: endpoint {
91				remote-endpoint = <&fe_a_ep>;
92				bitclock-master;
93				frame-master;
94				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
95				capture  = <&ssi1 &src0 &dvc1>;
96			};
97		};
98		/*
99		 * (B) CPU1
100		 */
101		port@1 {
102			reg = <1>;
103			rsnd_b_ep: endpoint {
104				remote-endpoint = <&fe_b_ep>;
105				bitclock-master;
106				frame-master;
107				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
108			};
109		};
110	};
111};
112