Re: [PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
Hi Sergei, Thank you for the review. Lemme fix it in v5 patchset. Regards, Vladimir On 02.09.2016 15:38, Sergei Shtylyov wrote: Hello. On 9/2/2016 3:05 PM, Vladimir Barinov wrote: This supports SSI sound for H3ULCB board. SSI DMA mode used. CS2000 used as AUDIO_CLK_B. Signed-off-by: Vladimir BarinovAcked-by: Kuninori Morimoto --- Changes in version 3: - initially added Changes in version 4: - added comment for audio_clkout arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 115 + 1 file changed, 115 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts index bbd7928..a254231 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts @@ -45,6 +45,12 @@ }; }; +x12_clk: x12_clk { If the crystal name is X12, name the node "x12" too, this way the output clock will be named just "x12". +compatible = "fixed-clock"; +#clock-cells = <0>; +clock-frequency = <24576000>; +}; + vcc_sdhi0: regulator-vcc-sdhi0 { compatible = "regulator-fixed"; [...] @@ -136,6 +176,73 @@ [...] + +cs2000: clk_multiplier@4f { Don't use underscores in the node names, use hyphens instead. +#clock-cells = <0>; +compatible = "cirrus,cs2000-cp"; +reg = <0x4f>; +clocks = <_clkout>, <_clk>; +clock-names = "clk_in", "ref_clk"; + +assigned-clocks = <>; +assigned-clock-rates = <24576000>; /* 1/1 divide */ +}; +}; [...] MBR, Sergei
Re: [PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
On 02.09.2016 15:05, Vladimir Barinov wrote: This supports SSI sound for H3ULCB board. SSI DMA mode used. CS2000 used as AUDIO_CLK_B. Signed-off-by: Vladimir BarinovAcked-by: Kuninori Morimoto --- Changes in version 3: - initially added Changes in version 4: - added comment for audio_clkout arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 115 + 1 file changed, 115 insertions(+) Sorry for the subject typo. The proper one is v4: [PATCH v4 4/4] arm64: dts: h3ulcb: Sound SSI support
[PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
This supports SSI sound for H3ULCB board. SSI DMA mode used. CS2000 used as AUDIO_CLK_B. Signed-off-by: Vladimir BarinovAcked-by: Kuninori Morimoto --- Changes in version 3: - initially added Changes in version 4: - added comment for audio_clkout arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 115 + 1 file changed, 115 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts index bbd7928..a254231 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts @@ -45,6 +45,12 @@ }; }; + x12_clk: x12_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; + vcc_sdhi0: regulator-vcc-sdhi0 { compatible = "regulator-fixed"; @@ -68,6 +74,32 @@ states = <330 1 180 0>; }; + + audio_clkout: audio_clkout { + /* +* This is same as <_sound 0> +* but needed to avoid cs2000/rcar_sound probe dead-lock +*/ + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + }; + + rsnd_ak4613: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <>; + simple-audio-card,frame-master = <>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <>; + }; + }; }; _clk { @@ -113,6 +141,17 @@ power-source = <1800>; }; + sound_pins: sound { + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; + function = "ssi"; + }; + + sound_clk_pins: sound_clk { + groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", +"audio_clkout_a", "audio_clkout3_a"; + function = "audio_clk"; + }; + usb1_pins: usb1 { groups = "usb1"; function = "usb1"; @@ -136,6 +176,73 @@ pinctrl-names = "default"; status = "okay"; + + clock-frequency = <10>; + + ak4613: codec@10 { + compatible = "asahi-kasei,ak4613"; + #sound-dai-cells = <0>; + reg = <0x10>; + clocks = <_sound 3>; + + 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; + }; + + cs2000: clk_multiplier@4f { + #clock-cells = <0>; + compatible = "cirrus,cs2000-cp"; + reg = <0x4f>; + clocks = <_clkout>, <_clk>; + clock-names = "clk_in", "ref_clk"; + + assigned-clocks = <>; + assigned-clock-rates = <24576000>; /* 1/1 divide */ + }; +}; + +_sound { + pinctrl-0 = <_pins _clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + /* audio_clkout0/1/2/3 */ + #clock-cells = <1>; + clock-frequency = <11289600>; + + status = "okay"; + + /* update to */ + clocks = < CPG_MOD 1005>, +< CPG_MOD 1006>, < CPG_MOD 1007>, +< CPG_MOD 1008>, < CPG_MOD 1009>, +< CPG_MOD 1010>, < CPG_MOD 1011>, +< CPG_MOD 1012>, < CPG_MOD 1013>, +< CPG_MOD 1014>, < CPG_MOD 1015>, +< CPG_MOD 1022>, < CPG_MOD 1023>, +< CPG_MOD 1024>, < CPG_MOD 1025>, +< CPG_MOD 1026>, < CPG_MOD 1027>, +< CPG_MOD 1028>, < CPG_MOD 1029>, +< CPG_MOD 1030>, < CPG_MOD 1031>, +< CPG_MOD 1019>, < CPG_MOD 1018>, +<_clk_a>, <>, +<_clk_c>, +< CPG_CORE R8A7795_CLK_S0D4>; + + rcar_sound,dai { + dai0 { + playback = < >; + capture = < >; + }; + }; }; { @@ -150,11 +257,19 @@ status = "okay"; }; + { + shared-pin; +}; + { timeout-sec = <60>; status = "okay"; }; +_clk_a { + clock-frequency = <22579200>; +}; + { pinctrl-0 = <_pins>; pinctrl-names = "default"; -- 1.9.1
Re: [PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
On Fri, Sep 02, 2016 at 01:19:49AM +, Kuninori Morimoto wrote: > > Hi Vladimir > > > This supports SSI sound for H3ULCB board. > > SSI DMA mode used. CS2000 used as AUDIO_CLK_B. > > > > Signed-off-by: Vladimir Barinov> > --- > > Acked-by: Kuninori Morimoto > > > + audio_clkout: audio_clkout { > > + compatible = "fixed-clock"; > > + #clock-cells = <0>; > > + clock-frequency = <11289600>; > > + }; > > I think having commont for AUDIO_CLKOUT is better for user, like Salvator-X. > This "audio_clkout" is dummy. Actually, we don't need this dummy clock, > and we should use "<_sound 0>" as AUDIO_CLKOUT, > like AUDIO_CLKOUT3 as "<_sound 3>" which is used on ak4613. > But Salvator-X and this ULCB board has very complex connection, > especially around CS2000. > This means cs2000 requests rcar_sound, and rcar_sound requests cs2000. > This audio_clkout exist to avoid probe dead-lock. > This is the reason why audio_clkout and rcar_sound::clock-frequency > has same value. Vladimir, please address the above and include it when you repost the patches that I haven't queued up.
Re: [PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
Hi Vladimir > This supports SSI sound for H3ULCB board. > SSI DMA mode used. CS2000 used as AUDIO_CLK_B. > > Signed-off-by: Vladimir Barinov> --- Acked-by: Kuninori Morimoto > + audio_clkout: audio_clkout { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <11289600>; > + }; I think having commont for AUDIO_CLKOUT is better for user, like Salvator-X. This "audio_clkout" is dummy. Actually, we don't need this dummy clock, and we should use "<_sound 0>" as AUDIO_CLKOUT, like AUDIO_CLKOUT3 as "<_sound 3>" which is used on ak4613. But Salvator-X and this ULCB board has very complex connection, especially around CS2000. This means cs2000 requests rcar_sound, and rcar_sound requests cs2000. This audio_clkout exist to avoid probe dead-lock. This is the reason why audio_clkout and rcar_sound::clock-frequency has same value.
[PATCH v3 12/12] arm64: dts: h3ulcb: Sound SSI support
This supports SSI sound for H3ULCB board. SSI DMA mode used. CS2000 used as AUDIO_CLK_B. Signed-off-by: Vladimir Barinov--- Changes in version 3: - initially added arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | 115 + 1 file changed, 115 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts index bbd7928..a254231 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts @@ -45,6 +45,12 @@ }; }; + x12_clk: x12_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; + vcc_sdhi0: regulator-vcc-sdhi0 { compatible = "regulator-fixed"; @@ -68,6 +74,28 @@ states = <330 1 180 0>; }; + + audio_clkout: audio_clkout { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <11289600>; + }; + + rsnd_ak4613: sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <>; + simple-audio-card,frame-master = <>; + + sndcpu: simple-audio-card,cpu { + sound-dai = <_sound>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <>; + }; + }; }; _clk { @@ -113,6 +141,18 @@ function = "sdhi0"; power-source = <1800>; }; + + sound_pins: sound { + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; + function = "ssi"; + }; + + sound_clk_pins: sound_clk { + groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", +"audio_clkout_a", "audio_clkout3_a"; + function = "audio_clk"; + }; + usb1_pins: usb1 { groups = "usb1"; function = "usb1"; @@ -136,6 +176,73 @@ pinctrl-names = "default"; status = "okay"; + + clock-frequency = <10>; + + ak4613: codec@10 { + compatible = "asahi-kasei,ak4613"; + #sound-dai-cells = <0>; + reg = <0x10>; + clocks = <_sound 3>; + + 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; + }; + + cs2000: clk_multiplier@4f { + #clock-cells = <0>; + compatible = "cirrus,cs2000-cp"; + reg = <0x4f>; + clocks = <_clkout>, <_clk>; + clock-names = "clk_in", "ref_clk"; + + assigned-clocks = <>; + assigned-clock-rates = <24576000>; /* 1/1 divide */ + }; +}; + +_sound { + pinctrl-0 = <_pins _clk_pins>; + pinctrl-names = "default"; + + /* Single DAI */ + #sound-dai-cells = <0>; + + /* audio_clkout0/1/2/3 */ + #clock-cells = <1>; + clock-frequency = <11289600>; + + status = "okay"; + + /* update to */ + clocks = < CPG_MOD 1005>, +< CPG_MOD 1006>, < CPG_MOD 1007>, +< CPG_MOD 1008>, < CPG_MOD 1009>, +< CPG_MOD 1010>, < CPG_MOD 1011>, +< CPG_MOD 1012>, < CPG_MOD 1013>, +< CPG_MOD 1014>, < CPG_MOD 1015>, +< CPG_MOD 1022>, < CPG_MOD 1023>, +< CPG_MOD 1024>, < CPG_MOD 1025>, +< CPG_MOD 1026>, < CPG_MOD 1027>, +< CPG_MOD 1028>, < CPG_MOD 1029>, +< CPG_MOD 1030>, < CPG_MOD 1031>, +< CPG_MOD 1019>, < CPG_MOD 1018>, +<_clk_a>, <>, +<_clk_c>, +< CPG_CORE R8A7795_CLK_S0D4>; + + rcar_sound,dai { + dai0 { + playback = < >; + capture = < >; + }; + }; }; { @@ -150,11 +257,19 @@ status = "okay"; }; + { + shared-pin; +}; + { timeout-sec = <60>; status = "okay"; }; +_clk_a { + clock-frequency = <22579200>; +}; + { pinctrl-0 = <_pins>; pinctrl-names = "default"; -- 1.9.1