linux-loongson/arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
Kuninori Morimoto d70be079c3 arm64: dts: renesas: ulcb/kf: Use multi Component sound
+-- ULCB -------------------+
	|+--------+       +--------+|
	||    SSI0| <---> |ak4613  ||
	||    SSI1| <---> |        ||
	||        |       +--------+|
	||        |       +--------+|
	||    SSI2| <---> |HDMI    ||
	||        |       +--------+|
	||    SSI3| <--+            |
	||    SSI4| <-+|            |
	|+--------+   ||            |
	+-------------||------------+
	+-- Kingfisher -------------+
	|             ||  +--------+|
	|             |+->|pcm3168a||
	|             +-->|        ||
	|                 +--------+|
	+---------------------------+

On UCLB/KF, we intuitively think we want to handle these as "2 Sound
Cards":

	card0,0: 1st sound of ULCB (SSI0 - ak4613)
	card0,1: 2nd sound of ULCB (SSI2 - HDMI)
	card1,0: 1st sound of KF   (SSI3 - pcm3168a)
	    ^ ^

However, because of ASoC Component vs. Card framework limitations, we
needed to handle this as "1 big Sound Card":

	card0,0: 1st sound of ULCB/KF (SSI0 - ak4613)
	card0,1: 2nd sound of ULCB/KF (SSI2 - HDMI)
	card0,2: 3rd sound of ULCB/KF (SSI3 - pcm3168a)
	    ^ ^

Now ASoC supports multi Component, which allows us to handle "2 Sound
Cards" such as "ULCB Sound Card" and "Kingfisher Sound Card", all
ULCB/KF Audio dtsi can be updated.

Note that this changes the Sound Card specification method from
userland, especially for Kingfisher Sound.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/87fs382yhk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-09-25 09:25:04 +02:00

96 lines
1.7 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0
/*
* Device Tree for ULCB + Audio Graph Card (MIX)
*
* Copyright (C) 2022 Renesas Electronics Corp.
*/
/*
* Note:
* The HDMI output is ignored due to the limited number of subdevices
*
* (A) CPU0 (2ch) <-----> (2ch) (X) ak4613 (MIX-0)
* (B) CPU1 (2ch) --/ (MIX-1)
*
* (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-scu-card";
label = "snd-ulcb-mix";
routing = "ak4613 Playback", "DAI0 Playback",
"ak4613 Playback", "DAI1 Playback",
"DAI0 Capture", "ak4613 Capture";
dais = <&snd_ulcb1 /* (A) CPU0 */
&snd_ulcb2 /* (B) CPU1 */
>;
};
};
&ak4613 {
port {
#address-cells = <1>;
#size-cells = <0>;
/*
* (X) ak4613
*/
prefix = "ak4613";
convert-rate = <48000>;
/* (A) CPU0 <-> (X) ak4613 */
ak4613_ep1: endpoint@0 {
reg = <0>;
remote-endpoint = <&rsnd_for_ak4613_1>;
};
/* (B) CPU1 -> (X) ak4613 */
ak4613_ep2: endpoint@1 {
reg = <1>;
remote-endpoint = <&rsnd_for_ak4613_2>;
};
};
};
&rcar_sound {
#address-cells = <1>;
#size-cells = <0>;
ports@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
/*
* (A) CPU0
*/
snd_ulcb1: port@0 {
reg = <0>;
rsnd_for_ak4613_1: endpoint {
remote-endpoint = <&ak4613_ep1>;
bitclock-master;
frame-master;
playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
capture = <&ssi1 &src0 &dvc1>;
};
};
/*
* (B) CPU1
*/
snd_ulcb2: port@1 {
reg = <1>;
rsnd_for_ak4613_2: endpoint {
remote-endpoint = <&ak4613_ep2>;
bitclock-master;
frame-master;
playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
};
};
};
};