Skip to contentSkip to conversation

arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF

PATCH In review Kuninori Morimoto 2 participants 20 messages Jan 13, 2023 – Jan 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: renesas: Simple-Card / Audio-Graph-Card/Card2 dts for ULCB/KF

Hi Geert

ALSA SoC is now supporting generic Sound Card driver such as Simple-Card / Audio-Graph-Card/Card2, and it supports "normal connection" and "special connections".
I'm its maintainer, thus I need/want to test these.

I have been tested these by using my local patches to switching card, but maintenance it locally is not useful for me, and users who want to know the sample DT settings.

And I have noticed that some local patch had bug, but no one noticed about it (of course :)

ULCB/KF is very good board to test these.
So, I want to upstream these.

These are v2 patch-set for it.

One note here is that this patch *should not* have effect to existing normal users, but useful for test user.
So, this patch-set adds "3 card" x "2 use case" dtsi file, and ulcb/ulcb-kf "include" one of them which doesn't change anything. test user can switch to other card or other use case by changing "include" dtsi.

v1 -> v2
- tidyup tab alignment
- tidyup comments
- remove no longer needed comment from ulcb/ulcb-kf.dtsi

Kuninori Morimoto (8):
ARM: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: #sound-dai-cells is used when simple-card
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi
arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

 arch/arm/boot/dts/r8a7742.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7743.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7744.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7745.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7778.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7790.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7791.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7793.dtsi                |   2 +-
 arch/arm/boot/dts/r8a7794.dtsi                |   2 +-
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |   2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |   2 +-
 .../boot/dts/renesas/salvator-common.dtsi     |   3 -
 .../ulcb-audio-graph-card-mix+split.dtsi      |  91 +++++++++
 .../dts/renesas/ulcb-audio-graph-card.dtsi    |  85 +++++++++
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   |  26 +++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 170 +++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi |  88 +++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    |  30 +++
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 152 +++++++++++++++
 .../renesas/ulcb-kf-simple-audio-card.dtsi    |  85 +++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  72 ++-----
 .../ulcb-simple-audio-card-mix+split.dtsi     |  89 +++++++++
 .../dts/renesas/ulcb-simple-audio-card.dtsi   |  89 +++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  68 ++-----
 34 files changed, 1240 insertions(+), 134 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/8 ARM: dts: renesas: #sound-dai-cells is used when simple-card

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using simple-card. This patch tidyup the comment.

---
 arch/arm/boot/dts/r8a7742.dtsi | 2 +-
 arch/arm/boot/dts/r8a7743.dtsi | 2 +-
 arch/arm/boot/dts/r8a7744.dtsi | 2 +-
 arch/arm/boot/dts/r8a7745.dtsi | 2 +-
 arch/arm/boot/dts/r8a7778.dtsi | 2 +-
 arch/arm/boot/dts/r8a7790.dtsi | 2 +-
 arch/arm/boot/dts/r8a7791.dtsi | 2 +-
 arch/arm/boot/dts/r8a7793.dtsi | 2 +-
 arch/arm/boot/dts/r8a7794.dtsi | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/r8a7742.dtsi +1 -1
index 73be346001cb..16d146db824a 100644
@@ -1155,7 +1155,7 @@ vin3: video@e6ef3000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7743.dtsi +1 -1
index 20f1d98a048d..2245d19a23bb 100644
@@ -1190,7 +1190,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7744.dtsi +1 -1
index 96b2d5a4e8f6..aa13841f9781 100644
@@ -1190,7 +1190,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7745.dtsi +1 -1
index afc902e532d8..44688b8431c3 100644
@@ -1120,7 +1120,7 @@ vin1: video@e6ef1000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
arch/arm/boot/dts/r8a7778.dtsi +1 -1
index 95efbafb0b70..8d4530ed2fc6 100644
@@ -241,7 +241,7 @@ tmu2: timer@ffd82000 {
 
 	rcar_sound: sound@ffd90000 {
 		/*
-		 * #sound-dai-cells is required
+		 * #sound-dai-cells is required if simple-card
 		 *
 		 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 		 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7790.dtsi +1 -1
index 111a6d23159e..2f2e483a2c2a 100644
@@ -1109,7 +1109,7 @@ vin3: video@e6ef3000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7791.dtsi +1 -1
index 777b672b59cc..b9d34147628e 100644
@@ -1223,7 +1223,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7793.dtsi +1 -1
index 3e0be1b58931..f51bf687f4bd 100644
@@ -988,7 +988,7 @@ vin2: video@e6ef2000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
arch/arm/boot/dts/r8a7794.dtsi +1 -1
index 7aa781ff3bff..371dd4715dde 100644
@@ -955,7 +955,7 @@ vin1: video@e6ef1000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
Signature · 1 line
2.25.1
Reviewed-by on v2 1/8
#2 lore raw

Re: [PATCH v2 1/8] ARM: dts: renesas: #sound-dai-cells is used when simple-card

Quoted 8 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using simple-card. This patch tidyup the comment.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

PATCH v2 2/8 arm64: dts: renesas: #sound-dai-cells is used when simple-card

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using "simple-card". This patch tidyup the comment.
Because it is already using "audio-graph", this patch removes unneeded #sound-dai-cells from ulcb.dtsi / salvator-common.dtsi.

---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a774e1.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77951.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77960.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77961.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi        | 2 +-
 arch/arm64/boot/dts/renesas/salvator-common.dtsi | 3 ---
 arch/arm64/boot/dts/renesas/ulcb.dtsi            | 3 ---
 12 files changed, 10 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/renesas/r8a774a1.dtsi +1 -1
index 7e643243c3be..c21b78685123 100644
@@ -1678,7 +1678,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774b1.dtsi +1 -1
index d541b48c7e38..82216ce7a92a 100644
@@ -1562,7 +1562,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +1 -1
index 151e32ac0368..e21653d86228 100644
@@ -1317,7 +1317,7 @@ vin5csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a774e1.dtsi +1 -1
index c5a0e7866b2f..2828e05b40b3 100644
@@ -1774,7 +1774,7 @@ vin7csi20: endpoint@0 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -1
index 07c8763c1e77..f770d160e948 100644
@@ -1998,7 +1998,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77960.dtsi +1 -1
index 1424d4ad941f..09c61696f7fb 100644
@@ -1870,7 +1870,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77961.dtsi +1 -1
index 3c744b7d0dc4..59a18dfcb8cc 100644
@@ -1750,7 +1750,7 @@ vin7csi40: endpoint@2 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77965.dtsi +1 -1
index 997f29521f66..9b4f7ad95ca8 100644
@@ -1733,7 +1733,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77990.dtsi +1 -1
index 3053b4b21497..d4718f144e33 100644
@@ -1469,7 +1469,7 @@ drif31: rif@e6fb0000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/r8a77995.dtsi +1 -1
index f040d03e0a87..e25024a7b66c 100644
@@ -1037,7 +1037,7 @@ vin4: video@e6ef4000 {
 
 		rcar_sound: sound@ec500000 {
 			/*
-			 * #sound-dai-cells is required
+			 * #sound-dai-cells is required if simple-card
 			 *
 			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
 			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
arch/arm64/boot/dts/renesas/salvator-common.dtsi +0 -3
index d97473401819..4a3d5037821f 100644
@@ -799,9 +799,6 @@ &rcar_sound {
 	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
 	pinctrl-names = "default";
 
-	/* Single DAI */
-	#sound-dai-cells = <0>;
-
 	/* audio_clkout0/1/2/3 */
 	#clock-cells = <1>;
 	clock-frequency = <12288000 11289600>;
arch/arm64/boot/dts/renesas/ulcb.dtsi +0 -3
index 29cedf4dc1a9..4b6562fc1bdf 100644
@@ -381,9 +381,6 @@ &rcar_sound {
 	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
 	pinctrl-names = "default";
 
-	/* Single DAI */
-	#sound-dai-cells = <0>;
-
 	/* audio_clkout0/1/2/3 */
 	#clock-cells = <1>;
 	clock-frequency = <12288000 11289600>;
Signature · 1 line
2.25.1
Reviewed-by on v2 2/8
#4 lore raw

Re: [PATCH v2 2/8] arm64: dts: renesas: #sound-dai-cells is used when simple-card

Quoted 10 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

Current sound comment is indicating that #sound-dai-cells is required, but it is needed if board is using "simple-card". This patch tidyup the comment.
Because it is already using "audio-graph", this patch removes unneeded #sound-dai-cells from ulcb.dtsi / salvator-common.dtsi.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw

PATCH v2 3/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../dts/renesas/ulcb-audio-graph-card.dtsi    | 85 ++++++++++++++++++
 .../dts/renesas/ulcb-kf-audio-graph-card.dtsi | 88 +++++++++++++++++++
 2 files changed, 173 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card.dtsi new file +85 -0
new file mode 100644
index 000000000000..3be54df645e6
@@ -0,0 +1,85 @@
+// 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 = "rcar-sound";
+
+		dais = <&rsnd_port0 /* (A) CPU0 <-> ak4613 */
+			&rsnd_port1 /* (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 {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		rsnd_port0: 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>;
+			};
+		};
+		rsnd_port1: port@1 {
+			/*
+			 * (B) CPU1 -> HDMI
+			 */
+			reg = <1>;
+			rsnd_for_hdmi: endpoint {
+				remote-endpoint = <&dw_hdmi0_snd_in>;
+				bitclock-master;
+				frame-master;
+				playback = <&ssi2>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card.dtsi new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.25.1
Reviewed-by on v2 3/8
#6 lore raw

Re: [PATCH v2 3/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 8 lines

This patch adds "Audio Graph Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#7 lore raw

PATCH v2 4/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2" DT setting file for ULCB/KF, and switch to use it. We can switch to other Generic Audio Graph driver if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../dts/renesas/ulcb-audio-graph-card2.dtsi   | 26 +++++++
 .../renesas/ulcb-kf-audio-graph-card2.dtsi    | 30 ++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      | 68 +++----------------
 arch/arm64/boot/dts/renesas/ulcb.dtsi         | 60 +++-------------
 4 files changed, 75 insertions(+), 109 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2.dtsi new file +26 -0
new file mode 100644
index 000000000000..5ebec1235843
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2
+ *
+ * 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
+ */
+#include "ulcb-audio-graph-card.dtsi"
+
+&sound_card {
+	compatible = "audio-graph-card2";
+
+	/delete-property/ dais;
+	links = <&rsnd_port0	/* (A) CPU0 <-> ak4613 */
+		 &rsnd_port1	/* (B) CPU1  -> HDMI   */
+		>;
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2.dtsi new file +30 -0
new file mode 100644
index 000000000000..c30e056538e4
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Audio Graph Card2
+ *
+ * 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
+ */
+#include "ulcb-kf-audio-graph-card.dtsi"
+
+&sound_card {
+	/delete-property/ dais;
+	links = <&rsnd_port0	/* (A) CPU0 <-> ak4613 */
+		 &rsnd_port1	/* (B) CPU1  -> HDMI   */
+		 &rsnd_port2	/* (C) CPU2  -> PCM3168A-p */
+		 &rsnd_port3	/* (D) CPU3 <-  PCM3168A-c */
+		>;
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +10 -58

95 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +9 -51

99 lines not on this page · raw message

Signature · 1 line
2.25.1
Reviewed-by on v2 4/8
#8 lore raw

Re: [PATCH v2 4/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi

Quoted 29 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2" DT setting file for ULCB/KF, and switch to use it. We can switch to other Generic Audio Graph driver if ulcb.dtsi / ulcb-kf.dtsi were updated.

Quoted 5 lines

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#9 lore raw

PATCH v2 5/8 arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Simle Audio Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../renesas/ulcb-kf-simple-audio-card.dtsi    | 85 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |  1 +
 .../dts/renesas/ulcb-simple-audio-card.dtsi   | 89 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |  1 +
 4 files changed, 176 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card.dtsi new file +85 -0
new file mode 100644
index 000000000000..2010e8ac7fdc
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Simple Audio Card
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ *	(A) CPU0 <----> ak4613
+ *	(B) CPU1  ----> HDMI
+ *	(C) CPU2  ----> PCM3168A-p
+ *	(D) CPU3 <----  PCM3168A-c
+ *
+ *	(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 {
+	/* dai-link@0/1 are defined in ulcb.dtsi */
+
+	/*
+	 * (C) CPU2 -> PCM3168A-p
+	 */
+	simple-audio-card,dai-link@2 {
+		reg = <2>;
+		cpu {
+			bitclock-master;
+			frame-master;
+			dai-tdm-slot-num = <8>;
+			sound-dai = <&rcar_sound 2>;
+		};
+		codec {
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 0>;
+		};
+	};
+	/*
+	 * (D) CPU3 <- PCM3168A-c
+	 */
+	simple-audio-card,dai-link@3 {
+		reg = <3>;
+		cpu {
+			bitclock-master;
+			frame-master;
+			dai-tdm-slot-num = <6>;
+			sound-dai = <&rcar_sound 3>;
+		};
+		codec {
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 1>;
+		};
+	};
+};
+
+&pcm3168a {
+	/*
+	 * (C) CPU2 -> PCM3168A-p
+	 * (D) CPU3 <- PCM3168A-c
+	 */
+	#sound-dai-cells = <1>;
+};
+
+&rcar_sound {
+
+	rcar_sound,dai {
+		/* dai0-1 are defined in ulcb.dtsi */
+
+		/*
+		 * (C) CPU2 -> PCM3168A-p
+		 */
+		dai2 {
+			playback = <&ssi3>;
+		};
+		/*
+		 * (D) CPU3 <- PCM3168A-c
+		 */
+		dai3 {
+			capture = <&ssi4>;
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 3527d538a20e..afc63d28bf5c 100644
@@ -447,6 +447,7 @@ &xhci0 {
  * We can switch Audio Card for testing
  * see also ulcb.dtsi
  *
+ * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb-simple-audio-card.dtsi new file +89 -0

89 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index bc0ed53c89f4..95d9086b92fe 100644
@@ -493,6 +493,7 @@ &usb2_phy1 {
  *
  * We can switch Audio Card for testing
  *
+ * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
Reviewed-by on v2 5/8
#10 lore raw

Re: [PATCH v2 5/8] arm64: dts: renesas: add ulcb{-kf} Simple Audio Card dtsi

Quoted 25 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

Quoted 8 lines

This patch adds "Simle Audio Card" DT setting file for ULCB/KF. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#11 lore raw

PATCH v2 6/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2 + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-audio-graph-card2-mix+split.dtsi     | 111 +++++++++++
 .../ulcb-kf-audio-graph-card2-mix+split.dtsi  | 177 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   1 +
 4 files changed, 290 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card2-mix+split.dtsi new file +111 -0
new file mode 100644
index 000000000000..197e045afbca
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card2 (MIX + TDM Split)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *	(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-card2";
+		label = "rcar-sound";
+
+		routing = "ak4613 Playback", "DAI0 Playback",
+			  "ak4613 Playback", "DAI1 Playback",
+			  "DAI0 Capture",    "ak4613 Capture";
+
+		/delete-property/ dais;
+		links = <&fe_a		/* (A) CPU0   */
+			 &fe_b		/* (B) CPU1   */
+			 &be_x		/* (X) ak4613 */
+		>;
+
+		dpcm {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ports@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0>;
+				/*
+				 * FE
+				 * (A) CPU0 (MIX-0)
+				 * (B) CPU1 (MIX-1)
+				 */
+				fe_a: port@0 { reg = <0>; fe_a_ep: endpoint { remote-endpoint = <&rsnd_a_ep>; }; };
+				fe_b: port@1 { reg = <1>; fe_b_ep: endpoint { remote-endpoint = <&rsnd_b_ep>; }; };
+			};
+
+			ports@1 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <1>;
+				/*
+				 * BE
+				 * (X) ak4613
+				 */
+				be_x: port@0 { reg = <0>; be_x_ep: endpoint { remote-endpoint = <&ak4613_x_ep>; }; };
+			};
+		};
+	};
+};
+
+&ak4613 {
+	port {
+		/*
+		 * (X) ak4613
+		 */
+		prefix = "ak4613";
+		convert-rate = <48000>;
+
+		ak4613_x_ep: endpoint {
+			remote-endpoint = <&be_x_ep>;
+		};
+	};
+};
+
+&rcar_sound {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/*
+		 * (A) CPU0
+		 */
+		port@0 {
+			reg = <0>;
+			rsnd_a_ep: endpoint {
+				remote-endpoint = <&fe_a_ep>;
+				bitclock-master;
+				frame-master;
+				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
+				capture  = <&ssi1 &src0 &dvc1>;
+			};
+		};
+		/*
+		 * (B) CPU1
+		 */
+		port@1 {
+			reg = <1>;
+			rsnd_b_ep: endpoint {
+				remote-endpoint = <&fe_b_ep>;
+				bitclock-master;
+				frame-master;
+				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card2-mix+split.dtsi new file +177 -0

177 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index afc63d28bf5c..25098efd6b89 100644
@@ -449,5 +449,6 @@ &xhci0 {
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
+ * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index 95d9086b92fe..bb93ba4ff946 100644
@@ -495,5 +495,6 @@ &usb2_phy1 {
  *
  * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
+ * #include "ulcb-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
Reviewed-by on v2 6/8
#12 lore raw

Re: [PATCH v2 6/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card2 dtsi MIX + TDM Split dtsi

Quoted 29 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card2 + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Quoted 5 lines

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#13 lore raw

PATCH v2 7/8 arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-audio-graph-card-mix+split.dtsi      |  91 ++++++++++
 .../ulcb-kf-audio-graph-card-mix+split.dtsi   | 170 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   1 +
 4 files changed, 263 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi new file +91 -0
new file mode 100644
index 000000000000..88daded1975b
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card (MIX)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *	(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 = "rcar-sound";
+
+		routing = "ak4613 Playback", "DAI0 Playback",
+			  "ak4613 Playback", "DAI1 Playback",
+			  "DAI0 Capture",    "ak4613 Capture";
+
+		dais = <&rsnd_port0 /* (A) CPU0 */
+			&rsnd_port1 /* (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 {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/*
+		 * (A) CPU0
+		 */
+		rsnd_port0: 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
+		 */
+		rsnd_port1: port@1 {
+			reg = <1>;
+			rsnd_for_ak4613_2: endpoint {
+				remote-endpoint = <&ak4613_ep2>;
+				bitclock-master;
+				frame-master;
+				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
+			};
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi new file +170 -0

170 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 25098efd6b89..08242d3dee3f 100644
@@ -449,6 +449,7 @@ &xhci0 {
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
+ * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-kf-audio-graph-card2.dtsi"
arch/arm64/boot/dts/renesas/ulcb.dtsi +1 -0
index bb93ba4ff946..172d065d70bb 100644
@@ -495,6 +495,7 @@ &usb2_phy1 {
  *
  * #include "ulcb-simple-audio-card.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
+ * #include "ulcb-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card2-mix+split.dtsi"
  */
 #include "ulcb-audio-graph-card2.dtsi"
Signature · 1 line
2.25.1
Reviewed-by on v2 7/8
#14 lore raw

Re: [PATCH v2 7/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

Hi Morimoto-san,

Quoted 29 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Audio Graph Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Quoted 5 lines

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

Thanks for your patch!

Quoted 6 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi new file +3 -0
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Audio Graph Card (MIX)

arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi line 13

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi new file +10 -0
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ *     (A) CPU0 (2ch) <-----> (2ch) (X) ak4613 (MIX-0)
+ *     (B) CPU1 (2ch)  --/                     (MIX-1)

Shouldn't that be "<--/" (also in the other mix+split patches)? No worries, I can fix all of these while applying.

Quoted 10 lines
arch/arm64/boot/dts/renesas/ulcb-audio-graph-card-mix+split.dtsi new file +7 -0
+ *     (C) CPU3 (2ch)  ----> (8ch) (Y)
+ *
+ *     (A) aplay   -D plughw:0,0 xxx.wav
+ *     (B) aplay   -D plughw:0,1 xxx.wav
+ *
+ *     (A) arecord -D plughw:0,0 xxx.wav
+ */

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi line 95

Quoted 7 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi new file +6 -0
 
+               /*
+                * (Z) PCM3168A-c
+                */
+               port@1 {
+                       reg = <1>;
+                       /* (G) CPU6 <-> PCM3168A-c */

"<-".

arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi line 102

Quoted 7 lines
arch/arm64/boot/dts/renesas/ulcb-kf-audio-graph-card-mix+split.dtsi new file +7 -0
+                       pcm3168a_endpoint_c: endpoint {
+                               remote-endpoint = <&rsnd_for_pcm3168a_capture>;
+                               clocks = <&clksndsel>;
+                       };
+               };
+       };
+};

The rest LGTM, so

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#15 lore raw

Re: [PATCH v2 7/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

Hi Geert

Quoted 9 lines
Quoted 6 lines

+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ * (A) CPU0 (2ch) <-----> (2ch) (X) ak4613 (MIX-0)
+ * (B) CPU1 (2ch) --/ (MIX-1)

Shouldn't that be "<--/" (also in the other mix+split patches)? No worries, I can fix all of these while applying.

(A) can handle both playback/capture, but
(B) can handle only playback.
So, above allow is correct.

Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+                       reg = <1>;
+                       /* (G) CPU6 <-> PCM3168A-c */

"<-".

Oops, indeed.
Thank you for pointing it, and thank you for fixing

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#16 lore raw

Re: [PATCH v2 7/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

Hi Morimoto-san,

Quoted 7 lines · Kuninori Morimoto
Quoted 7 lines
Quoted 6 lines

+/*
+ * Note:
+ * Because there is subdevice maximum, it will ignore HDMI output
+ *
+ * (A) CPU0 (2ch) <-----> (2ch) (X) ak4613 (MIX-0)
+ * (B) CPU1 (2ch) --/ (MIX-1)

Quoted 6 lines
Quoted 2 lines

Shouldn't that be "<--/" (also in the other mix+split patches)? No worries, I can fix all of these while applying.

(A) can handle both playback/capture, but
(B) can handle only playback.
So, above allow is correct.

OK

Quoted 1 line
Quoted 1 line
Quoted 1 line

+ /* (B) CPU1 <-> (X) ak4613 */

So the above arrow should be "->", too?

Quoted 1 line
Quoted 1 line
Quoted 1 line

+ ak4613_ep2: endpoint@1 {

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#17 lore raw

Re: [PATCH v2 7/8] arm64: dts: renesas: add ulcb{-kf} Audio Graph Card dtsi MIX + TDM Split dtsi

Hi Geert

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+ /* (B) CPU1 <-> (X) ak4613 */

So the above arrow should be "->", too?

Oops, Yes.
Thank you for pointing it, and thank you for fixing it.

Thank you for your help !!

Best regards
---
Kuninori Morimoto

#18 lore raw

PATCH v2 8/8 arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Simle Audio Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

---
 .../ulcb-kf-simple-audio-card-mix+split.dtsi  | 152 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/ulcb-kf.dtsi      |   1 +
 .../ulcb-simple-audio-card-mix+split.dtsi     |  89 ++++++++++
 arch/arm64/boot/dts/renesas/ulcb.dtsi         |   2 +
 4 files changed, 244 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi
 create mode 100644 arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi
arch/arm64/boot/dts/renesas/ulcb-kf-simple-audio-card-mix+split.dtsi new file +152 -0
new file mode 100644
index 000000000000..a7a4e18c197a
@@ -0,0 +1,152 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree for ULCB + Kingfisher + Simple Audio Card (MIX + TDM Split)
+ *
+ * Copyright (C) 2022 Renesas Electronics Corp.
+ */
+
+/*
+ * Because it reach to subdevice maximum, it ignore HDMI
+ *
+ *	(A) CPU0 (2ch) <----> (2ch) (X)	ak4613	   (MIX-0)
+ *	(B) CPU1 (2ch)  --/			   (MIX-1)
+ *	(C) CPU3 (2ch)  ----> (8ch) (Y)	PCM3168A-p (TDM-0 : 0,1ch)
+ *	(D) CPU2 (2ch)  --/			   (TDM-1 : 2,3ch)
+ *	(E) CPU4 (2ch)  --/			   (TDM-2 : 4,5ch)
+ *	(F) CPU5 (2ch)  --/			   (TDM-3 : 6,7ch)
+ *	(G) CPU6 (6ch) <----  (6ch) (Z)	PCM3168A-c
+ *
+ *	(A) aplay   -D plughw:0,0 xxx.wav (MIX-0)
+ *	(B) aplay   -D plughw:0,1 xxx.wav (MIX-1)
+ *	(C) aplay   -D plughw:0,2 xxx.wav (TDM-0)
+ *	(D) aplay   -D plughw:0,3 xxx.wav (TDM-1)
+ *	(E) aplay   -D plughw:0,4 xxx.wav (TDM-2)
+ *	(F) aplay   -D plughw:0,5 xxx.wav (TDM-3)
+ *
+ *	(A) arecord -D plughw:0,0 xxx.wav
+ *	(G) arecord -D plughw:0,6 xxx.wav
+ */
+
+&sound_card {
+
+	simple-audio-card,routing = "ak4613 Playback",   "DAI0 Playback",
+				    "ak4613 Playback",   "DAI1 Playback",
+				    "DAI0 Capture",      "ak4613 Capture",
+				    "pcm3168a Playback", "DAI2 Playback",
+				    "pcm3168a Playback", "DAI3 Playback",
+				    "pcm3168a Playback", "DAI4 Playback",
+				    "pcm3168a Playback", "DAI5 Playback";
+
+	/* dai-link@0 is defined in ulcb.dtsi */
+
+	simple-audio-card,dai-link@1 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <1>;
+		convert-channels = <8>; /* to 8ch TDM */
+
+		/*
+		 * (C) CPU2
+		 */
+		cpu@0 {
+			reg = <0>;
+			bitclock-master;
+			frame-master;
+			sound-dai = <&rcar_sound 2>;
+		};
+		/*
+		 * (D) CPU3
+		 */
+		cpu@1 {
+			reg = <1>;
+			sound-dai = <&rcar_sound 3>;
+		};
+		/*
+		 * (E) CPU4
+		 */
+		cpu@2 {
+			reg = <2>;
+			sound-dai = <&rcar_sound 4>;
+		};
+		/*
+		 * (F) CPU5
+		 */
+		cpu@3 {
+			reg = <3>;
+			sound-dai = <&rcar_sound 5>;
+		};
+		/*
+		 * (Y) PCM3168A-p
+		 */
+		codec {
+			prefix = "pcm3168a";
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 0>;
+		};
+	};
+	simple-audio-card,dai-link@2 {
+		reg = <2>;
+		/*
+		 * (G) CPU6
+		 */
+		cpu {
+			bitclock-master;
+			frame-master;
+			sound-dai = <&rcar_sound 6>;
+		};
+		/*
+		 * (Z) PCM3168A-c
+		 */
+		codec {
+			prefix = "pcm3168a";
+			mclk-fs = <512>;
+			sound-dai = <&pcm3168a 1>;
+		};
+	};
+};
+
+&pcm3168a {
+	/*
+	 * (Y) PCM3168A-p
+	 * (Z) PCM3168A-c
+	 */
+	#sound-dai-cells = <1>;
+};
+
+&rcar_sound {
+	rcar_sound,dai {
+
+		/* dai0-1 are defined in ulcb.dtsi */
+
+		/*
+		 * (C) CPU2
+		 */
+		dai2 {
+			playback = <&ssiu30 &ssi3>;
+		};
+		/*
+		 * (D) CPU3
+		 */
+		dai3 {
+			playback = <&ssiu31 &ssi3>;
+		};
+		/*
+		 * (E) CPU4
+		 */
+		dai4 {
+			playback = <&ssiu32 &ssi3>;
+		};
+		/*
+		 * (F) CPU5
+		 */
+		dai5 {
+			playback = <&ssiu33 &ssi3>;
+		};
+		/*
+		 * (G) CPU6
+		 */
+		dai6 {
+			capture = <&ssi4>;
+		};
+	};
+};
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi +1 -0
index 08242d3dee3f..5b71c15c72f8 100644
@@ -448,6 +448,7 @@ &xhci0 {
  * see also ulcb.dtsi
  *
  * #include "ulcb-kf-simple-audio-card.dtsi"
+ * #include "ulcb-kf-simple-audio-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card.dtsi"
  * #include "ulcb-kf-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-kf-audio-graph-card2-mix+split.dtsi"
arch/arm64/boot/dts/renesas/ulcb-simple-audio-card-mix+split.dtsi new file +89 -0

89 lines not on this page · raw message

arch/arm64/boot/dts/renesas/ulcb.dtsi +2 -0
index 172d065d70bb..d693e879b330 100644
@@ -488,12 +488,14 @@ &usb2_phy1 {
 	status = "okay";
 };
 
+
 /*
  * For sound-test.
  *
  * We can switch Audio Card for testing
  *
  * #include "ulcb-simple-audio-card.dtsi"
+ * #include "ulcb-simple-audio-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card.dtsi"
  * #include "ulcb-audio-graph-card-mix+split.dtsi"
  * #include "ulcb-audio-graph-card2-mix+split.dtsi"
Signature · 1 line
2.25.1
Reviewed-by on v2 8/8
#19 lore raw

Re: [PATCH v2 8/8] arm64: dts: renesas: add ulcb{-kf} Simple Audio Card MIX + TDM Split dtsi

Quoted 29 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

ALSA SoC has many type of Generic Audio Card driver (Simple Audio Card, Audio Graph Card, Audio Graph Card2), and Renesas/Kuninori Morimoto want to test these.

Generic Audio Card driver had been requested on ALSA SoC. It has many type of device connection method, and historically, requested connection support range of generic driver have been upgraded.

Upgrading connection support range itself was possible on generic driver, but could not implemented, because we need to keep compatibility on Device-Tree. This is one of the reason why we have many type of Generic Audio Card driver.

ULCB/KF is good board to test these.
Kuninori has been testing these Generic Audio Card driver by using his local patch to switching drivers. But it is good idea to upstream these from information sharing point of view, because DT setting is complex. It can be good sample for user. This patch is one of them.

From normal user point of view who don't need to test the driver, it should keep as-is, nothing changed.

This patch adds "Simle Audio Card + MIXer + TDM Split" DT setting file for ULCB/KF. Because it reach to subdevice maximum, it ignore HDMI. We can switch to use it if ulcb.dtsi / ulcb-kf.dtsi were updated.

Quoted 5 lines

Because it needs "switching driver", not "add extra feature", it doesn't use Device-Tree overlay.

i.e. will queue in renesas-devel for v6.3.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds