All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"b.brezillon.dev@gmail.com" <b.brezillon.dev@gmail.com>,
	"nicolas.ferre@atmel.com" <nicolas.ferre@atmel.com>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH] ASoC: wm8904: add CCF support
Date: Tue, 25 Mar 2014 16:01:26 +0800	[thread overview]
Message-ID: <533137D6.9010006@atmel.com> (raw)
In-Reply-To: <20140324110616.GG2269@sirena.org.uk>

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>;
}

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



WARNING: multiple messages have this Message-ID (diff)
From: Bo Shen <voice.shen@atmel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"b.brezillon.dev@gmail.com" <b.brezillon.dev@gmail.com>,
	"nicolas.ferre@atmel.com" <nicolas.ferre@atmel.com>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH] ASoC: wm8904: add CCF support
Date: Tue, 25 Mar 2014 08:01:26 +0000	[thread overview]
Message-ID: <533137D6.9010006@atmel.com> (raw)
In-Reply-To: <20140324110616.GG2269@sirena.org.uk>

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>;
}

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



WARNING: multiple messages have this Message-ID (diff)
From: voice.shen@atmel.com (Bo Shen)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ASoC: wm8904: add CCF support
Date: Tue, 25 Mar 2014 16:01:26 +0800	[thread overview]
Message-ID: <533137D6.9010006@atmel.com> (raw)
In-Reply-To: <20140324110616.GG2269@sirena.org.uk>

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 at 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 at 1a {
	compatible = "wlf,wm8904";
	reg = <0x1a>;
	wlf,xtal-clk-freq = <12000000>;
}

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

  reply	other threads:[~2014-03-25  8:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21  2:51 [RFC PATCH] ASoC: wm8904: add CCF support Bo Shen
2014-03-21  2:51 ` Bo Shen
2014-03-21  2:51 ` Bo Shen
2014-03-21 10:37 ` Mark Rutland
2014-03-21 10:37   ` Mark Rutland
2014-03-21 11:55   ` Mark Brown
2014-03-21 11:55     ` Mark Brown
2014-03-24  2:15     ` Bo Shen
2014-03-24  2:15       ` Bo Shen
2014-03-24  2:15       ` Bo Shen
2014-03-24 11:06       ` Mark Brown
2014-03-24 11:06         ` Mark Brown
2014-03-25  8:01         ` Bo Shen [this message]
2014-03-25  8:01           ` Bo Shen
2014-03-25  8:01           ` Bo Shen
2014-03-25  8:19           ` Bo Shen
2014-03-25  8:19             ` Bo Shen
2014-03-25  8:19             ` Bo Shen
2014-03-24  9:44     ` Boris BREZILLON
2014-03-24  9:44       ` Boris BREZILLON
2014-03-24  9:44       ` Boris BREZILLON
2014-03-24 11:07       ` Mark Brown
2014-03-24 11:07         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533137D6.9010006@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b.brezillon.dev@gmail.com \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.