From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Tue, 25 Mar 2014 08:19:40 +0000 Subject: Re: [RFC PATCH] ASoC: wm8904: add CCF support Message-Id: <53313C1C.7000408@atmel.com> List-Id: References: <1395370262-23305-1-git-send-email-voice.shen@atmel.com> <20140321103747.GK23372@e106331-lin.cambridge.arm.com> <20140321115511.GM11706@sirena.org.uk> <532F9557.2000402@atmel.com> <20140324110616.GG2269@sirena.org.uk> <533137D6.9010006@atmel.com> In-Reply-To: <533137D6.9010006@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mark Brown Cc: Mark Rutland , "alsa-devel@alsa-project.org" , "b.brezillon.dev@gmail.com" , "nicolas.ferre@atmel.com" , "linux-sound@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Hi Mark, On 03/25/2014 04:01 PM, Bo Shen wrote: > Hi Mark, > > On 03/24/2014 07:06 PM, Mark Brown wrote: >> On Mon, Mar 24, 2014 at 10:15:51AM +0800, Bo Shen wrote: >>> On 03/21/2014 07:55 PM, Mark Brown wrote: >>>> On Fri, Mar 21, 2014 at 10:37:47AM +0000, Mark Rutland wrote: >>>>> On Fri, Mar 21, 2014 at 02:51:02AM +0000, Bo Shen wrote: >> >>>>>> + - wlf,sysclk-from-mclk: set the sys clock is driven from mclk, >> >>>>> Why can the kernel not decide this? >> >>>> It can. >> >>> I really don't know how it decided by kernel (hardcode in machine >>> driver ?), >>> can you point me directly? Thanks. >> >> It can just look to see if there is a suitable system clock present, >> this shouldn't be hard. If there's a clock connected at a suitable >> rate it should use that, otherwise if there's a clock at an unsuitable >> rate it should either change the rate of the clock or use the FLL. > > I try to implement this, I think we can write the wm8904 dt as simple as > following, can it be acceptable? > > Case 1: using SoC provided clock > wm8904:wm8904@1a { > compatible = "wlf,wm8904"; > reg = <0x1a>; > clocks = <&pck0>; > clock-name = "mclk"; > } > > Case 2: using external crystal (For this case, I have no idea to put to > CCF, so need "wlf,xtal-clk-freq" property). > wm8904:wm8904@1a { > compatible = "wlf,wm8904"; > reg = <0x1a>; > wlf,xtal-clk-freq = <12000000>; > } Please forget this, with Boris's help, we can use clk-fixed-rate.c driver. So, I will try to implement another RFC patch. > Then we use these clocks to configure FLL. > > Btw, I see the "wm2000.c" retrieve the clock, however not see the usage > cases for it. > > Best Regards, > Bo Shen > > Best Regards, Bo Shen