diff mbox series

[06/11] ARM: dts: r8a77470: Add Audio support

Message ID 1554799912-24764-7-git-send-email-cv-dong@jinso.co.jp (mailing list archive)
State Changes Requested
Delegated to: Simon Horman
Headers show
Series Add more support to the RZ/G1C (r8a77470) SoC | expand

Commit Message

Cao Van Dong April 9, 2019, 8:51 a.m. UTC
Add rcar_sound node to dtsi for Audio support on the RZ/G1C (r8a77470) SoC.

Signed-off-by: Cao Van Dong <cv-dong@jinso.co.jp>
---
 arch/arm/boot/dts/r8a77470.dtsi | 180 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 180 insertions(+)

Comments

Kuninori Morimoto April 10, 2019, 12:37 a.m. UTC | #1
Hi Dong-san

Thank you for your patch

> +		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>;
> +			 */
> +			compatible = "renesas,rcar_sound-r8a77470",
> +				     "renesas,rcar_sound-gen2";
> +			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";

I don't have r8a77470 datasheet, but does it have *extended* Audio DMAC peri peri
address (= 0xec760000) ? If it has, please use it instead of normal address (= 0xec740000).

> +			rcar_sound,ssi {
> +				ssi0: ssi-0 {
> +					interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
> +					dmas = <&audma0 0x01>, <&audma0 0x02>,
> +					       <&audma0 0x15>, <&audma0 0x16>;
> +					dma-names = "rx", "tx", "rxu", "txu";
> +				};

Please add ssiu.
And then, ssi doesn't need "rxu" and "txu" anymore.
These can be good help for you.

	0ec8e0a879b8d7eacbfbed9a7face8f97f9493a8
	("arm64: dts: renesas: r8a7795: remove BUSIF0 settings from rcar_sound,ssi")

	da90dd849dc22e920388d18a0f877366bd4d2b7f
	("arm64: dts: renesas: r8a7795: add SSIU support for sound")


BTW, this patch-set is including SoC only.
Do you have plan to post board support patch after this ?
In other words, did you test these ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Cao Van Dong April 10, 2019, 12:51 a.m. UTC | #2
Dear Morimoto-san,

On 2019/04/10 9:37, Kuninori Morimoto wrote:
> Hi Dong-san
>
> Thank you for your patch
>
>> +		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>;
>> +			 */
>> +			compatible = "renesas,rcar_sound-r8a77470",
>> +				     "renesas,rcar_sound-gen2";
>> +			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";
> I don't have r8a77470 datasheet, but does it have *extended* Audio DMAC peri peri
> address (= 0xec760000) ? If it has, please use it instead of normal address (= 0xec740000).
>
>> +			rcar_sound,ssi {
>> +				ssi0: ssi-0 {
>> +					interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
>> +					dmas = <&audma0 0x01>, <&audma0 0x02>,
>> +					       <&audma0 0x15>, <&audma0 0x16>;
>> +					dma-names = "rx", "tx", "rxu", "txu";
>> +				};
> Please add ssiu.
> And then, ssi doesn't need "rxu" and "txu" anymore.
> These can be good help for you.
>
> 	0ec8e0a879b8d7eacbfbed9a7face8f97f9493a8
> 	("arm64: dts: renesas: r8a7795: remove BUSIF0 settings from rcar_sound,ssi")
>
> 	da90dd849dc22e920388d18a0f877366bd4d2b7f
> 	("arm64: dts: renesas: r8a7795: add SSIU support for sound")
>
>
> BTW, this patch-set is including SoC only.
> Do you have plan to post board support patch after this ?
> In other words, did you test these ?
Thanks for your feedback and help!
I will create a separate patch (add 
rcar_sound-r8a77470toDocumentation/../sound/renesas,rsnd.txt)
and update this patch in version 2.

Thank you,
Dong
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto
Kuninori Morimoto April 10, 2019, 1:16 a.m. UTC | #3
Hi Cao-san

> > BTW, this patch-set is including SoC only.
> > Do you have plan to post board support patch after this ?
> > In other words, did you test these ?
> Thanks for your feedback and help!
> I will create a separate patch (add
> rcar_sound-r8a77470toDocumentation/../sound/renesas,rsnd.txt)
> and update this patch in version 2.

Again, are these tested code ?
If not, please indicate such information at git-log.
Otherwise, people will think that these are well tested upsteam code.

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Cao Van Dong April 10, 2019, 1:33 a.m. UTC | #4
Dear Morimoto-san,

On 2019/04/10 10:16, Kuninori Morimoto wrote:
> Hi Cao-san
>
>>> BTW, this patch-set is including SoC only.
>>> Do you have plan to post board support patch after this ?
>>> In other words, did you test these ?
>> Thanks for your feedback and help!
>> I will create a separate patch (add
>> rcar_sound-r8a77470toDocumentation/../sound/renesas,rsnd.txt)
>> and update this patch in version 2.
> Again, are these tested code ?
> If not, please indicate such information at git-log.
> Otherwise, people will think that these are well tested upsteam code.
Sorry for missing the question!
I will add information to the patch in version 2.

Thank you,
Dong


> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto
Simon Horman April 10, 2019, 9:39 a.m. UTC | #5
On Wed, Apr 10, 2019 at 10:33:57AM +0900, Cao Van Dong wrote:
> Dear Morimoto-san,
> 
> On 2019/04/10 10:16, Kuninori Morimoto wrote:
> > Hi Cao-san
> > 
> > > > BTW, this patch-set is including SoC only.
> > > > Do you have plan to post board support patch after this ?
> > > > In other words, did you test these ?
> > > Thanks for your feedback and help!
> > > I will create a separate patch (add
> > > rcar_sound-r8a77470toDocumentation/../sound/renesas,rsnd.txt)
> > > and update this patch in version 2.
> > Again, are these tested code ?
> > If not, please indicate such information at git-log.
> > Otherwise, people will think that these are well tested upsteam code.
> Sorry for missing the question!
> I will add information to the patch in version 2.

In general I would prefer that patches that can be tested,
f.e. using accompanying board dts, are tested before including them
upstream.
Cao Van Dong April 11, 2019, 8:26 a.m. UTC | #6
Dear Morimoto-san,

On 2019/04/10 9:37, Kuninori Morimoto wrote:
> Hi Dong-san
>
> Thank you for your patch
>
>> +		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>;
>> +			 */
>> +			compatible = "renesas,rcar_sound-r8a77470",
>> +				     "renesas,rcar_sound-gen2";
>> +			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";
> I don't have r8a77470 datasheet, but does it have *extended* Audio DMAC peri peri
> address (= 0xec760000) ? If it has, please use it instead of normal address (= 0xec740000).

Alway thanks for your comment!

I consulted the datasheet document of RZ/G1C soc from at the link: 
"https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz/rzg/rzg1c.html#documents". 
I saw the Audio-DMAC-Peripheral-Peripheral address  support to 
"0xec740000". So I didn't update it in version 2.

Thank you,
Dong
>> +			rcar_sound,ssi {
>> +				ssi0: ssi-0 {
>> +					interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
>> +					dmas = <&audma0 0x01>, <&audma0 0x02>,
>> +					       <&audma0 0x15>, <&audma0 0x16>;
>> +					dma-names = "rx", "tx", "rxu", "txu";
>> +				};
> Please add ssiu.
> And then, ssi doesn't need "rxu" and "txu" anymore.
> These can be good help for you.
>
> 	0ec8e0a879b8d7eacbfbed9a7face8f97f9493a8
> 	("arm64: dts: renesas: r8a7795: remove BUSIF0 settings from rcar_sound,ssi")
>
> 	da90dd849dc22e920388d18a0f877366bd4d2b7f
> 	("arm64: dts: renesas: r8a7795: add SSIU support for sound")
>
>
> BTW, this patch-set is including SoC only.
> Do you have plan to post board support patch after this ?
> In other words, did you test these ?
>
> Thank you for your help !!
>
> Best regards
> ---
> Kuninori Morimoto
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
index e89c72f..2cea3e8 100644
--- a/arch/arm/boot/dts/r8a77470.dtsi
+++ b/arch/arm/boot/dts/r8a77470.dtsi
@@ -802,6 +802,186 @@ 
 			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>;
+			 */
+			compatible = "renesas,rcar_sound-r8a77470",
+				     "renesas,rcar_sound-gen2";
+			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 1006>, <&cpg CPG_MOD 1007>,
+				 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
+				 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
+				 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
+				 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
+				 <&cpg CPG_MOD 1025>, <&cpg CPG_MOD 1026>,
+				 <&cpg CPG_MOD 1027>, <&cpg CPG_MOD 1028>,
+				 <&cpg CPG_MOD 1029>, <&cpg CPG_MOD 1030>,
+				 <&cpg CPG_MOD 1021>, <&cpg CPG_MOD 1020>,
+				 <&cpg CPG_MOD 1021>, <&cpg CPG_MOD 1020>,
+				 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
+				 <&audio_clka>, <&audio_clkb>, <&audio_clkc>,
+				 <&cpg CPG_CORE r8a77470_CLK_M2>;
+			clock-names = "ssi-all",
+				      "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+				      "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+				      "ssi.1", "ssi.0",
+				      "src.6", "src.5", "src.4", "src.3",
+				      "src.2", "src.1",
+				      "ctu.0", "ctu.1",
+				      "mix.0", "mix.1",
+				      "dvc.0", "dvc.1",
+				      "clk_a", "clk_b", "clk_c", "clk_i";
+			power-domains = <&sysc r8a77470_PD_ALWAYS_ON>;
+			resets = <&cpg 1005>,
+				 <&cpg 1006>, <&cpg 1007>, <&cpg 1008>,
+				 <&cpg 1009>, <&cpg 1010>, <&cpg 1011>,
+				 <&cpg 1012>, <&cpg 1013>, <&cpg 1014>,
+				 <&cpg 1015>;
+			reset-names = "ssi-all",
+				      "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+				      "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+				      "ssi.1", "ssi.0";
+
+			status = "disabled";
+
+			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,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,src {
+				src-0 {
+					status = "disabled";
+				};
+				src1: src-1 {
+					interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x87>, <&audma0 0x9c>;
+					dma-names = "rx", "tx";
+				};
+				src2: src-2 {
+					interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x89>, <&audma0 0x9e>;
+					dma-names = "rx", "tx";
+				};
+				src3: src-3 {
+					interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x8b>, <&audma0 0xa0>;
+					dma-names = "rx", "tx";
+				};
+				src4: src-4 {
+					interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x8d>, <&audma0 0xb0>;
+					dma-names = "rx", "tx";
+				};
+				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 {
+					interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x01>, <&audma0 0x02>,
+					       <&audma0 0x15>, <&audma0 0x16>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi1: ssi-1 {
+					interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x03>, <&audma0 0x04>,
+					       <&audma0 0x49>, <&audma0 0x4a>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi2: ssi-2 {
+					interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x05>, <&audma0 0x06>,
+					       <&audma0 0x63>, <&audma0 0x64>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				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";
+				};
+				ssi5: ssi-5 {
+					interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0b>, <&audma0 0x0c>,
+					       <&audma0 0x73>, <&audma0 0x74>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi6: ssi-6 {
+					interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0d>, <&audma0 0x0e>,
+					       <&audma0 0x75>, <&audma0 0x76>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi7: ssi-7 {
+					interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0f>, <&audma0 0x10>,
+					       <&audma0 0x79>, <&audma0 0x7a>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi8: ssi-8 {
+					interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x11>, <&audma0 0x12>,
+					       <&audma0 0x7b>, <&audma0 0x7c>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+				ssi9: ssi-9 {
+					interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x13>, <&audma0 0x14>,
+					       <&audma0 0x7d>, <&audma0 0x7e>;
+					dma-names = "rx", "tx", "rxu", "txu";
+				};
+			};
+		};
+
 		sdhi0: sd@ee100000 {
 			compatible = "renesas,sdhi-r8a77470",
 				     "renesas,rcar-gen2-sdhi";