1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree for ULCB + Audio Graph Card
4 *
5 * Copyright (C) 2022 Renesas Electronics Corp.
6 */
7
8/*
9 *	(A) CPU0 <-----> ak4613
10 *	(B) CPU1  -----> HDMI
11 *
12 *	(A) aplay   -D plughw:0,0 xxx.wav
13 *	(B) aplay   -D plughw:0,1 xxx.wav
14 *
15 *	(A) arecord -D plughw:0,0 xxx.wav
16 */
17
18/ {
19	sound_card: sound {
20		compatible = "audio-graph-card";
21		label = "rcar-sound";
22
23		dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
24			&rsnd_port1 /* (B) CPU1  -> HDMI   */
25		>;
26	};
27};
28
29&ak4613 {
30	#sound-dai-cells = <0>;
31
32	port {
33		/*
34		 * (A) CPU0 <-> ak4613
35		 */
36		ak4613_endpoint: endpoint {
37			remote-endpoint = <&rsnd_for_ak4613>;
38		};
39	};
40};
41
42&hdmi0 {
43	ports {
44		port@2 {
45			/*
46			 * (B) CPU1 -> HDMI
47			 */
48			dw_hdmi0_snd_in: endpoint {
49				remote-endpoint = <&rsnd_for_hdmi>;
50			};
51		};
52	};
53};
54
55&rcar_sound {
56	ports {
57		#address-cells = <1>;
58		#size-cells = <0>;
59		rsnd_port0: port@0 {
60			/*
61			 * (A) CPU0 <-> ak4613
62			 */
63			reg = <0>;
64			rsnd_for_ak4613: endpoint {
65				remote-endpoint = <&ak4613_endpoint>;
66				bitclock-master;
67				frame-master;
68				playback = <&ssi0>, <&src0>, <&dvc0>;
69				capture  = <&ssi1>, <&src1>, <&dvc1>;
70			};
71		};
72		rsnd_port1: port@1 {
73			/*
74			 * (B) CPU1 -> HDMI
75			 */
76			reg = <1>;
77			rsnd_for_hdmi: endpoint {
78				remote-endpoint = <&dw_hdmi0_snd_in>;
79				bitclock-master;
80				frame-master;
81				playback = <&ssi2>;
82			};
83		};
84	};
85};
86