Message ID | 1536308743-29573-3-git-send-email-na-hoan@jinso.co.jp (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Enable Audio support for the Draak D3 board on r8a77995. | expand |
Hi Nguyen Thank you for your patch > From: Hoan Nguyen An <na-hoan@jinso.co.jp> > > This patch adds Audio device nodes for the R8A77995 > > Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> > --- (snip) > + clock-names = "ssi-all", > + "ssi.9", "ssi.8", "ssi.7", "ssi.6", > + "ssi.5", "ssi.4", "ssi.3", "ssi.2", > + "ssi.1", "ssi.0", (snip) > + reset-names = "ssi-all", > + "ssi.9", "ssi.8", "ssi.7", "ssi.6", > + "ssi.5", "ssi.4", "ssi.3", "ssi.2", > + "ssi.1", "ssi.0"; These are strange. 77995 has SSI3/4 only,right ?
Dear Morimoto-san Sorry for delay in this: On 2018/09/07 17:59, Kuninori Morimoto wrote: > Hi Nguyen > > Thank you for your patch > >> From: Hoan Nguyen An <na-hoan@jinso.co.jp> >> >> This patch adds Audio device nodes for the R8A77995 >> >> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> >> --- > (snip) >> + clock-names = "ssi-all", >> + "ssi.9", "ssi.8", "ssi.7", "ssi.6", >> + "ssi.5", "ssi.4", "ssi.3", "ssi.2", >> + "ssi.1", "ssi.0", I understand D3 only has SSI3, SSI4, SRC5, SRC6. But if I omitted the attributes that D3 does not support (as SSI0,1,2,5,6,7,8,9), although the sound-driver can probe but cannot play audio file, + 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"; And if I stay the same, ssi9,8,7,6,5,2,1,0 D3 does not support so CPG will be 1005 (BIT5) corresponding to SSI (all), similar to SCU (src9, 8,7,4,3,2,1,0) corresponds to 1017 (BIT17) SCU (all). I tested and Sound operates in normally as follows + clocks = <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1011>, + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1025>, + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&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.9", "ssi.8", "ssi.7", "ssi.6", + "ssi.5", "ssi.4", "ssi.3", "ssi.2", + "ssi.1", "ssi.0", + "src.9", "src.8", "src.7", "src.6", + "src.5", "src.4", "src.3", "src.2", + "src.1", "src.0", + "mix.1", "mix.0", + "ctu.1", "ctu.0", + "dvc.0", "dvc.1", + "clk_a", "clk_b", "clk_i"; > (snip) >> + reset-names = "ssi-all", >> + "ssi.9", "ssi.8", "ssi.7", "ssi.6", >> + "ssi.5", "ssi.4", "ssi.3", "ssi.2", >> + "ssi.1", "ssi.0"; > These are strange. > 77995 has SSI3/4 only,right ? > I intend to update as follows + resets = <&cpg 1005>, + <&cpg 1011>, <&cpg 1012>; + reset-names = "ssi-all", + "ssi.4", "ssi.3"; + status = "disabled"; And finally to declare new node method with ssi, ssiu: I updated as follows. + 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"; + }; + src7: src-7 { + status = "disabled"; + }; + src8: src-8 { + status = "disabled"; + }; + src9: src-9 { + status = "disabled"; + }; + }; + + rcar_sound,ssiu { + ssiu00: ssiu-0 { + status = "disabled"; + }; + ssiu01: ssiu-1 { + status = "disabled"; + }; + ssiu02: ssiu-2 { + status = "disabled"; + }; + ssiu03: ssiu-3 { + status = "disabled"; + }; + ssiu04: ssiu-4 { + status = "disabled"; + }; + ssiu05: ssiu-5 { + status = "disabled"; + }; + ssiu06: ssiu-6 { + status = "disabled"; + }; + ssiu07: ssiu-7 { + status = "disabled"; + }; + ssiu10: ssiu-8 { + status = "disabled"; + }; + ssiu11: ssiu-9 { + status = "disabled"; + }; + ssiu12: ssiu-10 { + status = "disabled"; + }; + ssiu13: ssiu-11 { + status = "disabled"; + }; + ssiu14: ssiu-12 { + status = "disabled"; + }; + ssiu15: ssiu-13 { + status = "disabled"; + }; + ssiu16: ssiu-14 { + status = "disabled"; + }; + ssiu17: ssiu-15 { + status = "disabled"; + }; + ssiu20: ssiu-16 { + status = "disabled"; + }; + ssiu21: ssiu-17 { + status = "disabled"; + }; + ssiu22: ssiu-18 { + status = "disabled"; + }; + ssiu23: ssiu-19 { + status = "disabled"; + }; + ssiu24: ssiu-20 { + status = "disabled"; + }; + ssiu25: ssiu-21 { + status = "disabled"; + }; + ssiu26: ssiu-22 { + status = "disabled"; + }; + ssiu27: ssiu-23 { + status = "disabled"; + }; + ssiu30: ssiu-24 { + dmas = <&audma0 0x6f>, <&audma0 0x70>; + dma-names = "rx", "tx"; + }; + ssiu31: ssiu-25 { + status = "disabled"; + }; + ssiu32: ssiu-26 { + status = "disabled"; + }; + ssiu33: ssiu-27 { + status = "disabled"; + }; + ssiu34: ssiu-28 { + status = "disabled"; + }; + ssiu35: ssiu-29 { + status = "disabled"; + }; + ssiu36: ssiu-30 { + status = "disabled"; + }; + ssiu37: ssiu-31 { + status = "disabled"; + }; + ssiu40: ssiu-32 { + dmas = <&audma0 0x71>, <&audma0 0x72>; + dma-names = "rx", "tx"; + }; + ssiu41: ssiu-33 { + status = "disabled"; + }; + ssiu42: ssiu-34 { + status = "disabled"; + }; + ssiu43: ssiu-35 { + status = "disabled"; + }; + ssiu44: ssiu-36 { + status = "disabled"; + }; + ssiu45: ssiu-37 { + status = "disabled"; + }; + ssiu46: ssiu-38 { + status = "disabled"; + }; + ssiu47: ssiu-39 { + status = "disabled"; + }; + ssiu50: ssiu-40 { + status = "disabled"; + }; + ssiu60: ssiu-41 { + status = "disabled"; + }; + ssiu70: ssiu-42 { + status = "disabled"; + }; + ssiu80: ssiu-43 { + status = "disabled"; + }; + ssiu90: ssiu-44 { + status = "disabled"; + }; + ssiu91: ssiu-45 { + status = "disabled"; + }; + ssiu92: ssiu-46 { + status = "disabled"; + }; + ssiu93: ssiu-47 { + status = "disabled"; + }; + ssiu94: ssiu-48 { + status = "disabled"; + }; + ssiu95: ssiu-49 { + status = "disabled"; + }; + ssiu96: ssiu-50 { + status = "disabled"; + }; + ssiu97: ssiu-51 { + status = "disabled"; + }; + }; + + 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>; + dma-names = "rx", "tx"; + }; + ssi4: ssi-4 { + interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&audma0 0x09>, <&audma0 0x0a>; + dma-names = "rx", "tx"; + }; + ssi5: ssi-5 { + status = "disabled"; + }; + ssi6: ssi-6 { + status = "disabled"; + }; + ssi7: ssi-7 { + status = "disabled"; + }; + ssi8: ssi-8 { + status = "disabled"; + }; Although I checked with the testing Sound-driver. What do you think and can you give me new suggestions. I'm sorry for bothering a lot of this place. Thanks You Hoan.
Hi xxx Hi Hoan > + 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"; > + }; > + src7: src-7 { > + status = "disabled"; > + }; > + src8: src-8 { > + status = "disabled"; > + }; > + src9: src-9 { > + status = "disabled"; > + }; > + }; I think src6 - src9 are not needed here. > + rcar_sound,ssiu { > + ssiu00: ssiu-0 { > + status = "disabled"; > + }; (snip) > + ssiu30: ssiu-24 { > + dmas = <&audma0 0x6f>, <&audma0 0x70>; > + dma-names = "rx", "tx"; > + }; (snip) > + ssiu40: ssiu-32 { > + dmas = <&audma0 0x71>, <&audma0 0x72>; > + dma-names = "rx", "tx"; > + }; > + ssiu41: ssiu-33 { > + status = "disabled"; > + }; (snip) > + ssiu97: ssiu-51 { > + status = "disabled"; > + }; > + }; We need to update ssiu.c to avoid disabled SSIU, then we can avoid ssiu-33 - ssiu-51. > + 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>; > + dma-names = "rx", "tx"; > + }; > + ssi4: ssi-4 { > + interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>; > + dmas = <&audma0 0x09>, <&audma0 0x0a>; > + dma-names = "rx", "tx"; > + }; > + ssi5: ssi-5 { > + status = "disabled"; > + }; > + ssi6: ssi-6 { > + status = "disabled"; > + }; > + ssi7: ssi-7 { > + status = "disabled"; > + }; > + ssi8: ssi-8 { > + status = "disabled"; > + }; I think ssi-5 - ssi-8 are not needed Thank you for your help !! Best regards --- Kuninori Morimoto
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi index 42d8dff..b96fc30 100644 --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi @@ -50,6 +50,23 @@ clock-frequency = <0>; }; + /* + * 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>; + }; + pmu_a53 { compatible = "arm,cortex-a53-pmu"; interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; @@ -487,6 +504,172 @@ dma-channels = <16>; }; + 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 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1011>, + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1005>, <&cpg CPG_MOD 1005>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1025>, + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&cpg CPG_MOD 1017>, <&cpg CPG_MOD 1017>, + <&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.9", "ssi.8", "ssi.7", "ssi.6", + "ssi.5", "ssi.4", "ssi.3", "ssi.2", + "ssi.1", "ssi.0", + "src.9", "src.8", "src.7", "src.6", + "src.5", "src.4", "src.3", "src.2", + "src.1", "src.0", + "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 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 { + 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"; + }; + src7: src-7 { + status = "disabled"; + }; + src8: src-8 { + status = "disabled"; + }; + src9: src-9 { + status = "disabled"; + }; + }; + + 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"; + }; + ssi5: ssi-5 { + status = "disabled"; + }; + ssi6: ssi-6 { + status = "disabled"; + }; + ssi7: ssi-7 { + status = "disabled"; + }; + ssi8: ssi-8 { + status = "disabled"; + }; + ssi9: ssi-9 { + status = "disabled"; + }; + }; + }; + ipmmu_ds0: mmu@e6740000 { compatible = "renesas,ipmmu-r8a77995"; reg = <0 0xe6740000 0 0x1000>;