summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2023-01-13 05:04:08 +0300
committerGeert Uytterhoeven <geert+renesas@glider.be>2023-01-26 18:03:04 +0300
commitbaa19ec4c6311ce2573d5eb198d7a24788636cb9 (patch)
tree553f99872b8eeb0d7abae45cecd8333fb13e3637 /arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
parent9e72606cd2db5a19cdd52834818d2d72eaac08a6 (diff)
downloadlinux-baa19ec4c6311ce2573d5eb198d7a24788636cb9.tar.xz
arm64: dts: renesas: Add ulcb{-kf} Audio Graph Card dtsi
ALSA SoC has many types of Generic Audio Card drivers (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto wants to test these. The Generic Audio Card driver had been requested on ALSA SoC. It supports many types of device connection methods, and historically, the requested connection support range of the generic driver has been upgraded. Upgrading the connection support range itself could not be implemented in the generic driver, because we need to keep compatibility with old DTBs. This is one of the reasons why we have many types of Generic Audio Card driver. The ULCB/KF combo is a good board stack to test these. Kuninori has been testing these Generic Audio Card drivers by using his local patches to switching drivers. But from an information sharing point of view, it is a good idea to upstream these, because the DT configuration is complex. Hence this can be a good sample for the user. Hence add an "Audio Graph Card" DT setting file for ULCB/KF. This can be enabled by updating ulcb.dtsi / ulcb-kf.dtsi. From a normal user point of view who doesn't need to test the driver, everything should stay as-is, and nothing changes. Note that because this needs "switching driver", and not "adding extra feature", this does not use a Device Tree overlay. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/87bkn3i414.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi')
-rw-r--r--arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi88
1 files changed, 88 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
new file mode 100644
index 000000000000..1db99b7608f0
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Audio Graph Card
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * (A) CPU0 <----> ak4613
+ * (B) CPU1 ----> HDMI
+ * (C) CPU2 ----> PCM3168A-p (8ch)
+ * (D) CPU3 <---- PCM3168A-c (6ch)
+ *
+ * (A) aplay -D plughw:0,0 xxx.wav
+ * (B) aplay -D plughw:0,1 xxx.wav
+ * (C) aplay -D plughw:0,2 xxx.wav
+ *
+ * (A) arecord -D plughw:0,0 xxx.wav
+ * (D) arecord -D plughw:0,3 xxx.wav
+ */
+
+&sound_card {
+ dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
+ &rsnd_port1 /* (B) CPU1 -> HDMI */
+ &rsnd_port2 /* (C) CPU2 -> PCM3168A-p */
+ &rsnd_port3 /* (D) CPU3 <- PCM3168A-c */
+ >;
+};
+
+&pcm3168a {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ mclk-fs = <512>;
+ /*
+ * (C) CPU2 -> PCM3168A-p
+ */
+ port@0 {
+ reg = <0>;
+ pcm3168a_endpoint_p: endpoint {
+ remote-endpoint = <&rsnd_for_pcm3168a_play>;
+ clocks = <&clksndsel>;
+ };
+ };
+ /*
+ * (D) CPU3 <- PCM3168A-c
+ */
+ port@1 {
+ reg = <1>;
+ pcm3168a_endpoint_c: endpoint {
+ remote-endpoint = <&rsnd_for_pcm3168a_capture>;
+ clocks = <&clksndsel>;
+ };
+ };
+ };
+};
+
+&rcar_sound {
+ ports {
+ /* rsnd_port0/1 are defined in ulcb.dtsi */
+ /*
+ * (C) CPU2 -> PCM3168A-p
+ */
+ rsnd_port2: port@2 {
+ reg = <2>;
+ rsnd_for_pcm3168a_play: endpoint {
+ remote-endpoint = <&pcm3168a_endpoint_p>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <8>;
+ playback = <&ssi3>;
+ };
+ };
+ /*
+ * (D) CPU3 <- PCM3168A-c
+ */
+ rsnd_port3: port@3 {
+ reg = <3>;
+ rsnd_for_pcm3168a_capture: endpoint {
+ remote-endpoint = <&pcm3168a_endpoint_c>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <6>;
+ capture = <&ssi4>;
+ };
+ };
+ };
+};