xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/ulcb-audio-graph-card.dtsi (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
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 = "snd-ulcb";
22
23		dais = <&snd_ulcb1 /* (A) CPU0 <-> ak4613 */
24			&snd_ulcb2 /* (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	#address-cells = <1>;
57	#size-cells = <0>;
58
59	ports@0 {
60		#address-cells = <1>;
61		#size-cells = <0>;
62		reg = <0>;
63
64		snd_ulcb1: port@0 {
65			/*
66			 * (A) CPU0 <-> ak4613
67			 */
68			reg = <0>;
69			rsnd_for_ak4613: endpoint {
70				remote-endpoint = <&ak4613_endpoint>;
71				bitclock-master;
72				frame-master;
73				playback = <&ssi0>, <&src0>, <&dvc0>;
74				capture  = <&ssi1>, <&src1>, <&dvc1>;
75			};
76		};
77		snd_ulcb2: port@1 {
78			/*
79			 * (B) CPU1 -> HDMI
80			 */
81			reg = <1>;
82			rsnd_for_hdmi: endpoint {
83				remote-endpoint = <&dw_hdmi0_snd_in>;
84				bitclock-master;
85				frame-master;
86				playback = <&ssi2>;
87			};
88		};
89	};
90};
91