All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support
@ 2021-05-27  4:36 Kuninori Morimoto
  2021-05-27  4:36 ` [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock Kuninori Morimoto
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2021-05-27  4:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus, linux-renesas-soc, kazuya.mizuguchi.ks,
	yoshihiro.shimoda.uh, hoai.luu.ub, takeshi.kihara.df,
	harunobu.kurokawa.dn, khiem.nguyen.xt, hien.dang.eb


Hi Geert

These are v3 of R-Car D3 Sound support patch-set.
It is based on latest ALSA SoC branch (= asoc/for-5.14).

asoc
	git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

v1 -> v2
	- ZA2 clock is based on PLL0D3 clock
	- move SW60 comment to related block
	- tidyup git-log typo
	- based on latest ALSA SoC
	 * don't have null_clock (= audio_clk_c)
	 * no more DT warning

v2 -> v3
	- alphabetical / numerical sort order
	  on both r8a77995.dts, r8a77995-draak.dts

Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (3):
  clk: renesas: r8a77995: Add ZA2 clock
  arm64: dts: renesas: r8a77995: add R-Car Sound support
  arm64: dts: renesas: r8a77995: draak: Add R-Car Sound support

 .../arm64/boot/dts/renesas/r8a77995-draak.dts | 111 ++++++++++++
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     | 166 ++++++++++++++++++
 drivers/clk/renesas/r8a77995-cpg-mssr.c       |   1 +
 3 files changed, 278 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock
  2021-05-27  4:36 [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support Kuninori Morimoto
@ 2021-05-27  4:36 ` Kuninori Morimoto
  2021-05-27  9:12   ` Geert Uytterhoeven
  2021-05-27  4:36 ` [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support Kuninori Morimoto
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2021-05-27  4:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus, linux-renesas-soc, kazuya.mizuguchi.ks,
	yoshihiro.shimoda.uh, hoai.luu.ub, takeshi.kihara.df,
	harunobu.kurokawa.dn, khiem.nguyen.xt, hien.dang.eb


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

R-Car D3 ZA2 clock is from PLL0D3 or S0,
and it can be controlled by ZA2CKCR.
It is needed for R-Car Sound, but is not used so far.
Using default settings is very enough at this point.
This patch adds it by DEF_FIXED().

Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/clk/renesas/r8a77995-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
index 9cfd00cf4e69..81c0bc1e78af 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -75,6 +75,7 @@ static const struct cpg_core_clk r8a77995_core_clks[] __initconst = {
 	DEF_RATE(".oco",       CLK_OCO,            8 * 1000 * 1000),
 
 	/* Core Clock Outputs */
+	DEF_FIXED("za2",       R8A77995_CLK_ZA2,   CLK_PLL0D3,     2, 1),
 	DEF_FIXED("z2",        R8A77995_CLK_Z2,    CLK_PLL0D3,     1, 1),
 	DEF_FIXED("ztr",       R8A77995_CLK_ZTR,   CLK_PLL1,       6, 1),
 	DEF_FIXED("zt",        R8A77995_CLK_ZT,    CLK_PLL1,       4, 1),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support
  2021-05-27  4:36 [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support Kuninori Morimoto
  2021-05-27  4:36 ` [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock Kuninori Morimoto
@ 2021-05-27  4:36 ` Kuninori Morimoto
  2021-05-27  9:19   ` Geert Uytterhoeven
  2021-05-27  4:36 ` [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add " Kuninori Morimoto
  2021-06-04  1:33 ` [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add " Kuninori Morimoto
  3 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2021-05-27  4:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus, linux-renesas-soc, kazuya.mizuguchi.ks,
	yoshihiro.shimoda.uh, hoai.luu.ub, takeshi.kihara.df,
	harunobu.kurokawa.dn, khiem.nguyen.xt, hien.dang.eb


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch adds R-Car Sound and Audio-DMAC support for D3.
One note is that D3's SSI0-2 and SRC0-4 are not connected.

Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 166 ++++++++++++++++++++++
 1 file changed, 166 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index 2319271c881b..8bf062303556 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -15,6 +15,23 @@ / {
 	#address-cells = <2>;
 	#size-cells = <2>;
 
+	/*
+	 * The external audio clocks are configured as 0 Hz fixed frequency
+	 * clocks by default.
+	 * Boards that provide audio clocks should override them.
+	 */
+	audio_clk_a: audio_clk_a {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <0>;
+	};
+
+	audio_clk_b: audio_clk_b {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <0>;
+	};
+
 	/* External CAN clock - to be overridden by boards that provide it */
 	can_clk: can {
 		compatible = "fixed-clock";
@@ -1015,6 +1032,155 @@ vin4: video@e6ef4000 {
 			status = "disabled";
 		};
 
+		rcar_sound: sound@ec500000 {
+			/*
+			 * #sound-dai-cells is required
+			 *
+			 * Single DAI : #sound-dai-cells = <0>;	<&rcar_sound>;
+			 * Multi  DAI : #sound-dai-cells = <1>;	<&rcar_sound N>;
+			 */
+			/*
+			 * #clock-cells is required for audio_clkout0/1/2/3
+			 *
+			 * clkout	: #clock-cells = <0>;	<&rcar_sound>;
+			 * clkout0/1/2/3: #clock-cells = <1>;	<&rcar_sound N>;
+			 */
+			compatible =  "renesas,rcar_sound-r8a77995", "renesas,rcar_sound-gen3";
+			reg =	<0 0xec500000 0 0x1000>, /* SCU */
+				<0 0xec5a0000 0 0x100>,  /* ADG */
+				<0 0xec540000 0 0x1000>, /* SSIU */
+				<0 0xec541000 0 0x280>,  /* SSI */
+				<0 0xec740000 0 0x200>;  /* Audio DMAC peri peri*/
+			reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+			clocks = <&cpg CPG_MOD 1005>,
+				 <&cpg CPG_MOD 1011>, <&cpg CPG_MOD 1012>,
+				 <&cpg CPG_MOD 1025>, <&cpg CPG_MOD 1026>,
+				 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+				 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+				 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
+				 <&audio_clk_a>, <&audio_clk_b>,
+				 <&cpg CPG_CORE R8A77995_CLK_ZA2>;
+			clock-names = "ssi-all",
+				      "ssi.4", "ssi.3",
+				      "src.6", "src.5",
+				      "mix.1", "mix.0",
+				      "ctu.1", "ctu.0",
+				      "dvc.0", "dvc.1",
+				      "clk_a", "clk_b", "clk_i";
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 1005>,
+				 <&cpg 1011>, <&cpg 1012>;
+			reset-names = "ssi-all",
+				      "ssi.4", "ssi.3";
+			status = "disabled";
+
+			rcar_sound,ctu {
+				ctu00: ctu-0 { };
+				ctu01: ctu-1 { };
+				ctu02: ctu-2 { };
+				ctu03: ctu-3 { };
+				ctu10: ctu-4 { };
+				ctu11: ctu-5 { };
+				ctu12: ctu-6 { };
+				ctu13: ctu-7 { };
+			};
+
+			rcar_sound,dvc {
+				dvc0: dvc-0 {
+					dmas = <&audma0 0xbc>;
+					dma-names = "tx";
+				};
+				dvc1: dvc-1 {
+					dmas = <&audma0 0xbe>;
+					dma-names = "tx";
+				};
+			};
+
+			rcar_sound,mix {
+				mix0: mix-0 { };
+				mix1: mix-1 { };
+			};
+
+			rcar_sound,src {
+				src0: src-0 { status = "disabled"; };
+				src1: src-1 { status = "disabled"; };
+				src2: src-2 { status = "disabled"; };
+				src3: src-3 { status = "disabled"; };
+				src4: src-4 { status = "disabled"; };
+				src5: src-5 {
+					interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x8f>, <&audma0 0xb2>;
+					dma-names = "rx", "tx";
+				};
+				src6: src-6 {
+					interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x91>, <&audma0 0xb4>;
+					dma-names = "rx", "tx";
+				};
+			};
+
+			rcar_sound,ssi {
+				ssi0: ssi-0 { status = "disabled"; };
+				ssi1: ssi-1 { status = "disabled"; };
+				ssi2: ssi-2 { status = "disabled"; };
+				ssi3: ssi-3 {
+					interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x07>, <&audma0 0x08>,
+					       <&audma0 0x6f>, <&audma0 0x70>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi4: ssi-4 {
+					interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x09>, <&audma0 0x0a>,
+					       <&audma0 0x71>, <&audma0 0x72>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+			};
+		};
+
+		audma0: dma-controller@ec700000 {
+			compatible = "renesas,dmac-r8a77995",
+				     "renesas,rcar-dmac";
+			reg = <0 0xec700000 0 0x10000>;
+			interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7",
+					"ch8", "ch9", "ch10", "ch11",
+					"ch12", "ch13", "ch14", "ch15";
+			clocks = <&cpg CPG_MOD 502>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 502>;
+			#dma-cells = <1>;
+			dma-channels = <16>;
+			iommus = <&ipmmu_mp 0>, <&ipmmu_mp 1>,
+				 <&ipmmu_mp 2>, <&ipmmu_mp 3>,
+				 <&ipmmu_mp 4>, <&ipmmu_mp 5>,
+				 <&ipmmu_mp 6>, <&ipmmu_mp 7>,
+				 <&ipmmu_mp 8>, <&ipmmu_mp 9>,
+				 <&ipmmu_mp 10>, <&ipmmu_mp 11>,
+				 <&ipmmu_mp 12>, <&ipmmu_mp 13>,
+				 <&ipmmu_mp 14>, <&ipmmu_mp 15>;
+		};
+
 		ohci0: usb@ee080000 {
 			compatible = "generic-ohci";
 			reg = <0 0xee080000 0 0x100>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add R-Car Sound support
  2021-05-27  4:36 [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support Kuninori Morimoto
  2021-05-27  4:36 ` [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock Kuninori Morimoto
  2021-05-27  4:36 ` [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support Kuninori Morimoto
@ 2021-05-27  4:36 ` Kuninori Morimoto
  2021-05-27  9:26   ` Geert Uytterhoeven
  2021-06-04  1:33 ` [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add " Kuninori Morimoto
  3 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2021-05-27  4:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus, linux-renesas-soc, kazuya.mizuguchi.ks,
	yoshihiro.shimoda.uh, hoai.luu.ub, takeshi.kihara.df,
	harunobu.kurokawa.dn, khiem.nguyen.xt, hien.dang.eb

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch adds R-Car Sound support for D3 draak.

One note is that it is using different clock definition style
from ulcb/salvator boards to avoid verbose clocks settings
on rcar_sound node (see ulcb.dtsi  rcar_sound::clocks).

cs2000 and ADG are cross connected, and need each other.
ulcb/salvator boards assume drivers are probed cs2000 -> rcar_sound.
This draak board assumes drivers are probed rcar_sound -> cs2000.

Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../arm64/boot/dts/renesas/r8a77995-draak.dts | 111 ++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
index 6783c3ad0856..b87459a83fbc 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
@@ -124,6 +124,14 @@ reg_12p0v: regulator-12p0v {
 		regulator-always-on;
 	};
 
+	sound_card: sound {
+		compatible = "audio-graph-card";
+
+		dais = <&rsnd_port0	/* ak4613 */
+			/* HDMI is not yet supported */
+		>;
+	};
+
 	vga {
 		compatible = "vga-connector";
 
@@ -161,6 +169,34 @@ x12_clk: x12 {
 		#clock-cells = <0>;
 		clock-frequency = <74250000>;
 	};
+
+	x19_clk: x19 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <24576000>;
+	};
+};
+
+&audio_clk_a {
+	/*
+	 * This is same as cs2000,
+	 * but needed to avoid cs2000/rcar_sound probe dead-lock
+	 */
+
+	clock-frequency = <24576000>;
+};
+
+&audio_clk_b {
+	/*
+	 * X11 is connected to VI4_FIELD/SCIF_CLK/AUDIO_CLKB,
+	 * and R-Car Sound uses AUDIO_CLKB.
+	 * Note is that schematic indicates VI4_FIELD conection only
+	 * not AUDIO_CLKB at SoC page.
+	 * And this VI4_FIELD/SCIF_CLK/AUDIO_CLKB is connected to SW60.
+	 * SW60 should be 1-2.
+	 */
+
+	clock-frequency = <22579200>;
 };
 
 &avb {
@@ -236,6 +272,28 @@ &i2c0 {
 	pinctrl-names = "default";
 	status = "okay";
 
+	ak4613: codec@10 {
+		compatible = "asahi-kasei,ak4613";
+		#sound-dai-cells = <0>;
+		reg = <0x10>;
+		clocks = <&rcar_sound 0>; /* audio_clkout */
+
+		asahi-kasei,in1-single-end;
+		asahi-kasei,in2-single-end;
+		asahi-kasei,out1-single-end;
+		asahi-kasei,out2-single-end;
+		asahi-kasei,out3-single-end;
+		asahi-kasei,out4-single-end;
+		asahi-kasei,out5-single-end;
+		asahi-kasei,out6-single-end;
+
+		port {
+			ak4613_endpoint: endpoint {
+				remote-endpoint = <&rsnd_for_ak4613>;
+			};
+		};
+	};
+
 	composite-in@20 {
 		compatible = "adi,adv7180cp";
 		reg = <0x20>;
@@ -342,6 +400,17 @@ adv7612_out: endpoint {
 		};
 	};
 
+	cs2000: clk-multiplier@4f {
+		#clock-cells = <0>;
+		compatible = "cirrus,cs2000-cp";
+		reg = <0x4f>;
+		clocks = <&rcar_sound 1>, <&x19_clk>; /* audio_clkout_1, x19 */
+		clock-names = "clk_in", "ref_clk";
+
+		assigned-clocks = <&cs2000>;
+		assigned-clock-rates = <24576000>; /* 1/1 divide */
+	};
+
 	eeprom@50 {
 		compatible = "rohm,br24t01", "atmel,24c01";
 		reg = <0x50>;
@@ -449,6 +518,17 @@ sdhi2_pins_uhs: sd2_uhs {
 		power-source = <1800>;
 	};
 
+	sound_pins: sound {
+		groups = "ssi34_ctrl", "ssi3_data", "ssi4_data_a";
+		function = "ssi";
+	};
+
+	sound_clk_pins: sound-clk {
+		groups = "audio_clk_a", "audio_clk_b",
+			 "audio_clkout", "audio_clkout1";
+		function = "audio_clk";
+	};
+
 	usb0_pins: usb0 {
 		groups = "usb0";
 		function = "usb0";
@@ -474,6 +554,33 @@ &pwm1 {
 	status = "okay";
 };
 
+&rcar_sound {
+	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
+	pinctrl-names = "default";
+
+	/* Single DAI */
+	#sound-dai-cells = <0>;
+
+	/* audio_clkout0/1 */
+	#clock-cells = <1>;
+	clock-frequency = <12288000 11289600>;
+
+	status = "okay";
+
+	ports {
+		rsnd_port0: port {
+			rsnd_for_ak4613: endpoint {
+				remote-endpoint = <&ak4613_endpoint>;
+				dai-format = "left_j";
+				bitclock-master = <&rsnd_for_ak4613>;
+				frame-master = <&rsnd_for_ak4613>;
+				playback = <&ssi3>, <&src5>, <&dvc0>;
+				capture  = <&ssi4>, <&src6>, <&dvc1>;
+			};
+		};
+	};
+};
+
 &rwdt {
 	timeout-sec = <60>;
 	status = "okay";
@@ -502,6 +609,10 @@ &sdhi2 {
 	status = "okay";
 };
 
+&ssi4 {
+	shared-pin;
+};
+
 &usb2_phy0 {
 	pinctrl-0 = <&usb0_pins>;
 	pinctrl-names = "default";
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock
  2021-05-27  4:36 ` [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock Kuninori Morimoto
@ 2021-05-27  9:12   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2021-05-27  9:12 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Magnus, Linux-Renesas, Kazuya Mizuguchi, Yoshihiro Shimoda,
	LUU HOAI, Takeshi Kihara, Harunobu Kurokawa, Khiem Nguyen,
	Hien Dang

On Thu, May 27, 2021 at 6:36 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> R-Car D3 ZA2 clock is from PLL0D3 or S0,
> and it can be controlled by ZA2CKCR.
> It is needed for R-Car Sound, but is not used so far.
> Using default settings is very enough at this point.
> This patch adds it by DEF_FIXED().
>
> Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
> Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-clk-for-v5.14.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support
  2021-05-27  4:36 ` [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support Kuninori Morimoto
@ 2021-05-27  9:19   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2021-05-27  9:19 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Magnus, Linux-Renesas, Kazuya Mizuguchi, Yoshihiro Shimoda,
	LUU HOAI, Takeshi Kihara, Harunobu Kurokawa, Khiem Nguyen,
	Hien Dang

Hi Morimoto-san,

On Thu, May 27, 2021 at 6:36 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> This patch adds R-Car Sound and Audio-DMAC support for D3.
> One note is that D3's SSI0-2 and SRC0-4 are not connected.
>
> Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
> Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> @@ -1015,6 +1032,155 @@ vin4: video@e6ef4000 {
>                         status = "disabled";
>                 };
>
> +               rcar_sound: sound@ec500000 {
> +                       /*
> +                        * #sound-dai-cells is required
> +                        *
> +                        * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
> +                        * Multi  DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
> +                        */
> +                       /*
> +                        * #clock-cells is required for audio_clkout0/1/2/3
> +                        *
> +                        * clkout       : #clock-cells = <0>;   <&rcar_sound>;
> +                        * clkout0/1/2/3: #clock-cells = <1>;   <&rcar_sound N>;
> +                        */
> +                       compatible =  "renesas,rcar_sound-r8a77995", "renesas,rcar_sound-gen3";
> +                       reg =   <0 0xec500000 0 0x1000>, /* SCU */
> +                               <0 0xec5a0000 0 0x100>,  /* ADG */
> +                               <0 0xec540000 0 0x1000>, /* SSIU */
> +                               <0 0xec541000 0 0x280>,  /* SSI */
> +                               <0 0xec740000 0 0x200>;  /* Audio DMAC peri peri*/
> +                       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
> +
> +                       clocks = <&cpg CPG_MOD 1005>,
> +                                <&cpg CPG_MOD 1011>, <&cpg CPG_MOD 1012>,
> +                                <&cpg CPG_MOD 1025>, <&cpg CPG_MOD 1026>,
> +                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
> +                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
> +                                <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
> +                                <&audio_clk_a>, <&audio_clk_b>,
> +                                <&cpg CPG_CORE R8A77995_CLK_ZA2>;
> +                       clock-names = "ssi-all",
> +                                     "ssi.4", "ssi.3",
> +                                     "src.6", "src.5",
> +                                     "mix.1", "mix.0",
> +                                     "ctu.1", "ctu.0",
> +                                     "dvc.0", "dvc.1",
> +                                     "clk_a", "clk_b", "clk_i";
> +                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
> +                       resets = <&cpg 1005>,
> +                                <&cpg 1011>, <&cpg 1012>;
> +                       reset-names = "ssi-all",
> +                                     "ssi.4", "ssi.3";
> +                       status = "disabled";
> +
> +                       rcar_sound,ctu {
> +                               ctu00: ctu-0 { };
> +                               ctu01: ctu-1 { };
> +                               ctu02: ctu-2 { };
> +                               ctu03: ctu-3 { };
> +                               ctu10: ctu-4 { };
> +                               ctu11: ctu-5 { };
> +                               ctu12: ctu-6 { };
> +                               ctu13: ctu-7 { };
> +                       };
> +
> +                       rcar_sound,dvc {
> +                               dvc0: dvc-0 {
> +                                       dmas = <&audma0 0xbc>;
> +                                       dma-names = "tx";
> +                               };
> +                               dvc1: dvc-1 {
> +                                       dmas = <&audma0 0xbe>;
> +                                       dma-names = "tx";
> +                               };
> +                       };
> +
> +                       rcar_sound,mix {
> +                               mix0: mix-0 { };
> +                               mix1: mix-1 { };
> +                       };
> +
> +                       rcar_sound,src {
> +                               src0: src-0 { status = "disabled"; };
> +                               src1: src-1 { status = "disabled"; };
> +                               src2: src-2 { status = "disabled"; };
> +                               src3: src-3 { status = "disabled"; };
> +                               src4: src-4 { status = "disabled"; };

Please drop nonexistent src channels.

> +                               src5: src-5 {
> +                                       interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
> +                                       dmas = <&audma0 0x8f>, <&audma0 0xb2>;
> +                                       dma-names = "rx", "tx";
> +                               };
> +                               src6: src-6 {
> +                                       interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
> +                                       dmas = <&audma0 0x91>, <&audma0 0xb4>;
> +                                       dma-names = "rx", "tx";
> +                               };
> +                       };
> +
> +                       rcar_sound,ssi {
> +                               ssi0: ssi-0 { status = "disabled"; };
> +                               ssi1: ssi-1 { status = "disabled"; };
> +                               ssi2: ssi-2 { status = "disabled"; };

Please drop nonexistent ssi channels.

> +                               ssi3: ssi-3 {
> +                                       interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
> +                                       dmas = <&audma0 0x07>, <&audma0 0x08>,
> +                                              <&audma0 0x6f>, <&audma0 0x70>;
> +                                       dma-names = "rx", "tx", "rxu", "txu";
> +                               };
> +                               ssi4: ssi-4 {
> +                                       interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
> +                                       dmas = <&audma0 0x09>, <&audma0 0x0a>,
> +                                              <&audma0 0x71>, <&audma0 0x72>;
> +                                       dma-names = "rx", "tx", "rxu", "txu";
> +                               };
> +                       };
> +               };

With the above fixed:
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add R-Car Sound support
  2021-05-27  4:36 ` [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add " Kuninori Morimoto
@ 2021-05-27  9:26   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2021-05-27  9:26 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Magnus, Linux-Renesas, Kazuya Mizuguchi, Yoshihiro Shimoda,
	LUU HOAI, Takeshi Kihara, Harunobu Kurokawa, Khiem Nguyen,
	Hien Dang

On Thu, May 27, 2021 at 6:36 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> This patch adds R-Car Sound support for D3 draak.
>
> One note is that it is using different clock definition style
> from ulcb/salvator boards to avoid verbose clocks settings
> on rcar_sound node (see ulcb.dtsi  rcar_sound::clocks).
>
> cs2000 and ADG are cross connected, and need each other.
> ulcb/salvator boards assume drivers are probed cs2000 -> rcar_sound.
> This draak board assumes drivers are probed rcar_sound -> cs2000.
>
> Link: https://lore.kernel.org/r/87k0nyci2t.wl-kuninori.morimoto.gx@renesas.com
> Link: https://lore.kernel.org/r/87sg2boi3h.wl-kuninori.morimoto.gx@renesas.com
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support
  2021-05-27  4:36 [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2021-05-27  4:36 ` [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add " Kuninori Morimoto
@ 2021-06-04  1:33 ` Kuninori Morimoto
  2021-06-04  8:03   ` Geert Uytterhoeven
  3 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2021-06-04  1:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus, linux-renesas-soc, kazuya.mizuguchi.ks,
	yoshihiro.shimoda.uh, hoai.luu.ub, takeshi.kihara.df,
	harunobu.kurokawa.dn, khiem.nguyen.xt, hien.dang.eb


Hi Geert

> These are v3 of R-Car D3 Sound support patch-set.
> It is based on latest ALSA SoC branch (= asoc/for-5.14).

I have ready to post v4 which needs latest ALSA SoC branch.
But should it be posted *after* next merge-window ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support
  2021-06-04  1:33 ` [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add " Kuninori Morimoto
@ 2021-06-04  8:03   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2021-06-04  8:03 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Magnus, Linux-Renesas, Kazuya Mizuguchi, Yoshihiro Shimoda,
	LUU HOAI, Takeshi Kihara, Harunobu Kurokawa, Khiem Nguyen,
	Hien Dang

Hi Morimoto-san,

On Fri, Jun 4, 2021 at 3:33 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> > These are v3 of R-Car D3 Sound support patch-set.
> > It is based on latest ALSA SoC branch (= asoc/for-5.14).
>
> I have ready to post v4 which needs latest ALSA SoC branch.
> But should it be posted *after* next merge-window ?

You can always post it earlier, with a comment clearly stating the
dependencies.

My actions will depend on the exact meaning of "needs", and if applying
it now can create a regression or not,
  1. With ALSA SoC from upstream, R-Car D3 Sound just doesn't work
     yet, as before, or works partially (no regression):
     => Can queue in renesas-devel for v5.14.
  2. With ALSA SoC from upstream, the sound driver will crash
     (regression):
     => Postpone queueing until after the release of v5.14-rc1.
     => Can still queue in a topic branch for renesas-drivers,
        as this includes the latest ALSA SoC branch.

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-04  8:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  4:36 [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add R-Car Sound support Kuninori Morimoto
2021-05-27  4:36 ` [PATCH v3 1/3] clk: renesas: r8a77995: Add ZA2 clock Kuninori Morimoto
2021-05-27  9:12   ` Geert Uytterhoeven
2021-05-27  4:36 ` [PATCH v3 2/3] arm64: dts: renesas: r8a77995: add R-Car Sound support Kuninori Morimoto
2021-05-27  9:19   ` Geert Uytterhoeven
2021-05-27  4:36 ` [PATCH v3 3/3] arm64: dts: renesas: r8a77995: draak: Add " Kuninori Morimoto
2021-05-27  9:26   ` Geert Uytterhoeven
2021-06-04  1:33 ` [PATCH v3 0/3] arm64: dts: renesas: r8a77995: draak: add " Kuninori Morimoto
2021-06-04  8:03   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.