1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree for ULCB + Audio Graph Card (MIX)
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/ {
22	sound_card: sound {
23		compatible = "audio-graph-scu-card";
24		label = "rcar-sound";
25
26		routing = "ak4613 Playback", "DAI0 Playback",
27			  "ak4613 Playback", "DAI1 Playback",
28			  "DAI0 Capture",    "ak4613 Capture";
29
30		dais = <&rsnd_port0 /* (A) CPU0 */
31			&rsnd_port1 /* (B) CPU1 */
32		>;
33	};
34};
35
36&ak4613 {
37	port {
38		#address-cells = <1>;
39		#size-cells = <0>;
40
41		/*
42		 * (X) ak4613
43		 */
44		prefix = "ak4613";
45		convert-rate = <48000>;
46
47		/* (A) CPU0 <-> (X) ak4613 */
48		ak4613_ep1: endpoint@0 {
49			reg = <0>;
50			remote-endpoint = <&rsnd_for_ak4613_1>;
51		};
52		/* (B) CPU1 -> (X) ak4613 */
53		ak4613_ep2: endpoint@1 {
54			reg = <1>;
55			remote-endpoint = <&rsnd_for_ak4613_2>;
56		};
57	};
58};
59
60&rcar_sound {
61	ports {
62		#address-cells = <1>;
63		#size-cells = <0>;
64
65		/*
66		 * (A) CPU0
67		 */
68		rsnd_port0: port@0 {
69			reg = <0>;
70			rsnd_for_ak4613_1: endpoint {
71				remote-endpoint = <&ak4613_ep1>;
72				bitclock-master;
73				frame-master;
74				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
75				capture  = <&ssi1 &src0 &dvc1>;
76			};
77		};
78		/*
79		 * (B) CPU1
80		 */
81		rsnd_port1: port@1 {
82			reg = <1>;
83			rsnd_for_ak4613_2: endpoint {
84				remote-endpoint = <&ak4613_ep2>;
85				bitclock-master;
86				frame-master;
87				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
88			};
89		};
90	};
91};
92