summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
blob: 3f1df6ee17ea1e09740c158e5c351dadc24d78be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree for ULCB + Audio Graph Card
 *
 * Copyright (C) 2022 Renesas Electronics Corp.
 */

/*
 *	(A) CPU0 <-----> ak4613
 *	(B) CPU1  -----> HDMI
 *
 *	(A) aplay   -D plughw:0,0 xxx.wav
 *	(B) aplay   -D plughw:0,1 xxx.wav
 *
 *	(A) arecord -D plughw:0,0 xxx.wav
 */

/ {
	sound_card: sound {
		compatible = "audio-graph-card";
		label = "snd-ulcb";

		dais = <&snd_ulcb1 /* (A) CPU0 <-> ak4613 */
			&snd_ulcb2 /* (B) CPU1  -> HDMI   */
		>;
	};
};

&ak4613 {
	#sound-dai-cells = <0>;

	port {
		/*
		 * (A) CPU0 <-> ak4613
		 */
		ak4613_endpoint: endpoint {
			remote-endpoint = <&rsnd_for_ak4613>;
		};
	};
};

&hdmi0 {
	ports {
		port@2 {
			/*
			 * (B) CPU1 -> HDMI
			 */
			dw_hdmi0_snd_in: endpoint {
				remote-endpoint = <&rsnd_for_hdmi>;
			};
		};
	};
};

&rcar_sound {
	#address-cells = <1>;
	#size-cells = <0>;

	ports@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;

		snd_ulcb1: port@0 {
			/*
			 * (A) CPU0 <-> ak4613
			 */
			reg = <0>;
			rsnd_for_ak4613: endpoint {
				remote-endpoint = <&ak4613_endpoint>;
				bitclock-master;
				frame-master;
				playback = <&ssi0>, <&src0>, <&dvc0>;
				capture  = <&ssi1>, <&src1>, <&dvc1>;
			};
		};
		snd_ulcb2: port@1 {
			/*
			 * (B) CPU1 -> HDMI
			 */
			reg = <1>;
			rsnd_for_hdmi: endpoint {
				remote-endpoint = <&dw_hdmi0_snd_in>;
				bitclock-master;
				frame-master;
				playback = <&ssi2>;
			};
		};
	};
};