xref: /freebsd-src/sys/contrib/device-tree/src/arm64/renesas/ulcb-simple-audio-card.dtsi (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1cb7aa33aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2cb7aa33aSEmmanuel Vadot/*
3cb7aa33aSEmmanuel Vadot * Device Tree for ULCB + Simple Audio Card
4cb7aa33aSEmmanuel Vadot *
5cb7aa33aSEmmanuel Vadot * Copyright (C) 2022 Renesas Electronics Corp.
6cb7aa33aSEmmanuel Vadot */
7cb7aa33aSEmmanuel Vadot
8cb7aa33aSEmmanuel Vadot/*
9cb7aa33aSEmmanuel Vadot *	(A) CPU0 <----> ak4613
10cb7aa33aSEmmanuel Vadot *	(B) CPU1  ----> HDMI
11cb7aa33aSEmmanuel Vadot *
12cb7aa33aSEmmanuel Vadot *	(A) aplay   -D plughw:0,0 xxx.wav
13cb7aa33aSEmmanuel Vadot *	(B) aplay   -D plughw:0,1 xxx.wav
14cb7aa33aSEmmanuel Vadot *
15cb7aa33aSEmmanuel Vadot *	(A) arecord -D plughw:0,0 xxx.wav
16cb7aa33aSEmmanuel Vadot */
17cb7aa33aSEmmanuel Vadot
18cb7aa33aSEmmanuel Vadot/ {
19cb7aa33aSEmmanuel Vadot	sound_card: sound {
20cb7aa33aSEmmanuel Vadot		compatible = "simple-audio-card";
21*84943d6fSEmmanuel Vadot		label = "snd-ulcb";
22cb7aa33aSEmmanuel Vadot
23cb7aa33aSEmmanuel Vadot		#address-cells = <1>;
24cb7aa33aSEmmanuel Vadot		#size-cells = <0>;
25cb7aa33aSEmmanuel Vadot
26cb7aa33aSEmmanuel Vadot		/*
27cb7aa33aSEmmanuel Vadot		 * (A) CPU0 <-> ak4613
28cb7aa33aSEmmanuel Vadot		 */
29cb7aa33aSEmmanuel Vadot		simple-audio-card,dai-link@0 {
30cb7aa33aSEmmanuel Vadot			reg = <0>;
31cb7aa33aSEmmanuel Vadot			cpu {
32cb7aa33aSEmmanuel Vadot				bitclock-master;
33cb7aa33aSEmmanuel Vadot				frame-master;
34cb7aa33aSEmmanuel Vadot				sound-dai = <&rcar_sound 0>;
35cb7aa33aSEmmanuel Vadot			};
36cb7aa33aSEmmanuel Vadot			codec {
37cb7aa33aSEmmanuel Vadot				sound-dai = <&ak4613>;
38cb7aa33aSEmmanuel Vadot			};
39cb7aa33aSEmmanuel Vadot		};
40cb7aa33aSEmmanuel Vadot		/*
41cb7aa33aSEmmanuel Vadot		 * (B) CPU1 -> HDMI
42cb7aa33aSEmmanuel Vadot		 */
43cb7aa33aSEmmanuel Vadot		simple-audio-card,dai-link@1 {
44cb7aa33aSEmmanuel Vadot			reg = <1>;
45cb7aa33aSEmmanuel Vadot			cpu {
46cb7aa33aSEmmanuel Vadot				bitclock-master;
47cb7aa33aSEmmanuel Vadot				frame-master;
48cb7aa33aSEmmanuel Vadot				sound-dai = <&rcar_sound 1>;
49cb7aa33aSEmmanuel Vadot			};
50cb7aa33aSEmmanuel Vadot			codec {
51cb7aa33aSEmmanuel Vadot				sound-dai = <&hdmi0>;
52cb7aa33aSEmmanuel Vadot			};
53cb7aa33aSEmmanuel Vadot		};
54cb7aa33aSEmmanuel Vadot	};
55cb7aa33aSEmmanuel Vadot};
56cb7aa33aSEmmanuel Vadot
57cb7aa33aSEmmanuel Vadot&ak4613 {
58cb7aa33aSEmmanuel Vadot	/*
59cb7aa33aSEmmanuel Vadot	 * (A) CPU0 <-> ak4613
60cb7aa33aSEmmanuel Vadot	 */
61cb7aa33aSEmmanuel Vadot	#sound-dai-cells = <0>;
62cb7aa33aSEmmanuel Vadot};
63cb7aa33aSEmmanuel Vadot
64cb7aa33aSEmmanuel Vadot&hdmi0 {
65cb7aa33aSEmmanuel Vadot	/*
66cb7aa33aSEmmanuel Vadot	 * (B) CPU1 -> HDMI
67cb7aa33aSEmmanuel Vadot	 */
68cb7aa33aSEmmanuel Vadot	#sound-dai-cells = <0>;
69cb7aa33aSEmmanuel Vadot};
70cb7aa33aSEmmanuel Vadot
71cb7aa33aSEmmanuel Vadot&rcar_sound {
72*84943d6fSEmmanuel Vadot	#address-cells = <1>;
73*84943d6fSEmmanuel Vadot	#size-cells = <0>;
74cb7aa33aSEmmanuel Vadot	#sound-dai-cells = <1>;
75cb7aa33aSEmmanuel Vadot
76*84943d6fSEmmanuel Vadot	rcar_sound,dai@0 {
77*84943d6fSEmmanuel Vadot		reg = <0>;
78*84943d6fSEmmanuel Vadot
79cb7aa33aSEmmanuel Vadot		/*
80cb7aa33aSEmmanuel Vadot		 * (A) CPU0 <-> ak4613
81cb7aa33aSEmmanuel Vadot		 */
82cb7aa33aSEmmanuel Vadot		dai0 {
83cb7aa33aSEmmanuel Vadot			playback = <&ssi0 &src0 &dvc0>;
84cb7aa33aSEmmanuel Vadot			capture  = <&ssi1 &src1 &dvc1>;
85cb7aa33aSEmmanuel Vadot		};
86cb7aa33aSEmmanuel Vadot		/*
87cb7aa33aSEmmanuel Vadot		 * (B) CPU1 -> HDMI
88cb7aa33aSEmmanuel Vadot		 */
89cb7aa33aSEmmanuel Vadot		dai1 {
90cb7aa33aSEmmanuel Vadot			playback = <&ssi2>;
91cb7aa33aSEmmanuel Vadot		};
92cb7aa33aSEmmanuel Vadot	};
93cb7aa33aSEmmanuel Vadot};
94