linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
       [not found]   ` <20160215152635.GN18988@sirena.org.uk>
@ 2016-02-16  9:46     ` Peter Ujfalusi
  2016-02-16 13:42       ` Mark Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Ujfalusi @ 2016-02-16  9:46 UTC (permalink / raw)
  To: Mark Brown, Michael Turquette, Stephen Boyd
  Cc: Liam Girdwood, alsa-devel, Jyri Sarha, linux-clk, linux-kernel,
	Kristo, Tero

On 02/15/2016 05:26 PM, Mark Brown wrote:
> On Mon, Feb 15, 2016 at 04:11:35PM +0200, Peter Ujfalusi wrote:
> 
>> Most CPU and codec drivers can select their system clock from different
>> sources. They rely on snd_soc_dai_set_sysclk(x, sysclk_id, x, x) to do so.
>> Add support for selecting which clock need to be selected along with the
>> rate.
> 
> Rather than adding new bindings for the ASoC specific clocking APIs it
> seems better to use the standard clock API bindings and transition
> drivers to use that.  In the past the clock API didn't have DT bindings
> so wehad to do our own thing but I think now that's no longer the case?

McASP is relatively simple regarding to clocking and it is only problematic in
case when it is master. When it is slave it is going to use the BCLK and FS
coming from outside for clocking the data.

The driver currently only supports symmetric clocking, meaning we only use the
TX clock path (RX is using the TX clocks).
To generate the bit clock we have something like this:

[mcaspA_auxclkx_div]->
		    [mcaspA_hclkx_mux] -> [mcaspA_hclkx_div] -> [mcaspA_bclkx]
[mcaspA_ahclkx_in]  ->

If [mcaspA_auxclkx_div] is selected in [mcaspA_hclkx_mux], then:
[mcaspA_hclkx_mux] -> [mcaspA_ahclkx_out]
the HCLKX clock can be sent to mcaspA_ahclkx_out, as output from the SoC.

mcaspA is mcasp0...number of MCASP in the SoC.

We would need three (or two if we decide to not represent the mcaspA_bclkx)
simple clock node, two dividers and one mux.

We could have binding for this regarding to clocks:

/* McASP clk IDs */
#define MCASP_AUXCLKX_DIV	0
#define MCASP_AHCLKX_IN		1
#define MCASP_HCLKX_MUX		2
#define MCASP_HCLKX_DIV		3
#define MCASP_AHCLKX_OUT	4
#define MCASP_BCLK		5

/* dtsi file */
mcasp3: mcasp@48468000 {
	compatible = "ti,dra7-mcasp-audio";
	#clock-cells = <1>;
	clocks = <&mcasp3_aux_gfclk_mux>, <&mcasp3_ahclkx_mux>;
	clock-names = "fck", "ahclkx";
	assigned-clocks = <&mcasp3 MCASP_AHCLKX_IN>,
			  <&mcasp3 MCASP_AUXCLKX_DIV>;
	assigned-clock-parents = <&mcasp3_ahclkx_mux>,
				 <&mcasp3_aux_gfclk_mux>;
};

/* board dts */
&mcasp3 {
	assigned-clocks = <&mcasp3 MCASP_AHCLKX_IN>,
			  <&mcasp3 MCASP_AUXCLKX_DIV>,
			  <&mcasp3_ahclkx_mux>,
			  <&mcasp3 MCASP_HCLKX_MUX>;
	assigned-clock-parents = <&mcasp3_ahclkx_mux>,
				 <&mcasp3_aux_gfclk_mux>,
				 <&atl_clkin2_ck>,
				 <&mcasp3 MCASP_AHCLKX_IN>;
};

With this one we can set up the clock tree via clk bindings. Not sure how this
will work if audio including McASP is built as module?

There are couple of important questions regarding to this: if the
MCASP_HCLKX_DIV is not explicitly set the McASP driver will configure it based
on the need for the starting stream (rate, bits, etc), but in some case we
need to have different calculation since we want to have more bclk then it is
needed for the audio data (bclk-fck ratio).

The clock tree within the McASP need to be built up inside of the code, can
not be done via DT.

As for codecs, tlv320aic3106 is also pretty simple device from the outside, it
can receive it's reference clock via:
MCLK pin, GPIO2 pin or it can use the BCLK from the bus. Based on the incoming
frequency it can use it directly or it needs to use the internal PLL to
generate the cocks.
It can output generated clock via GPIO1

I don't think it will bring any clarity or features we miss right now if we
try to move CPU and codec drivers to clk API. IMHO.

-- 
Péter

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-16  9:46     ` [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID Peter Ujfalusi
@ 2016-02-16 13:42       ` Mark Brown
  2016-02-16 19:13         ` Michael Turquette
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2016-02-16 13:42 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Michael Turquette, Stephen Boyd, Liam Girdwood, alsa-devel,
	Jyri Sarha, linux-clk, linux-kernel, Kristo, Tero

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

On Tue, Feb 16, 2016 at 11:46:52AM +0200, Peter Ujfalusi wrote:

> As for codecs, tlv320aic3106 is also pretty simple device from the outside, it
> can receive it's reference clock via:
> MCLK pin, GPIO2 pin or it can use the BCLK from the bus. Based on the incoming
> frequency it can use it directly or it needs to use the internal PLL to
> generate the cocks.
> It can output generated clock via GPIO1

That already sounds like there is room for configuration and hooking
into a wider clock tree - we've got three different source options and
an output plus a PLL that can presumably take in non-audio rates.

> I don't think it will bring any clarity or features we miss right now if we
> try to move CPU and codec drivers to clk API. IMHO.

You happen to be looking at a particularly simple system but things do
scale up and there's not a clear cutoff point which would allow us to
make a clear distinction between things that might get used in a simple
system and things that might need something more complex.  This seems
particularly important when we're adding things to simple-card, we want
it to be usable with as many different devices as possible.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-16 13:42       ` Mark Brown
@ 2016-02-16 19:13         ` Michael Turquette
  2016-02-17  8:13           ` Peter Ujfalusi
                             ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Michael Turquette @ 2016-02-16 19:13 UTC (permalink / raw)
  To: Mark Brown, Peter Ujfalusi
  Cc: Stephen Boyd, Liam Girdwood, alsa-devel, Jyri Sarha, linux-clk,
	linux-kernel, Kristo, Tero

Quoting Mark Brown (2016-02-16 05:42:33)
> On Tue, Feb 16, 2016 at 11:46:52AM +0200, Peter Ujfalusi wrote:
> 
> > As for codecs, tlv320aic3106 is also pretty simple device from the outside, it
> > can receive it's reference clock via:
> > MCLK pin, GPIO2 pin or it can use the BCLK from the bus. Based on the incoming
> > frequency it can use it directly or it needs to use the internal PLL to
> > generate the cocks.
> > It can output generated clock via GPIO1
> 
> That already sounds like there is room for configuration and hooking
> into a wider clock tree - we've got three different source options and
> an output plus a PLL that can presumably take in non-audio rates.

+1

It is quite easy for existing drivers to become clock providers. Please
see struct isp_xclk in:

drivers/media/platform/omap3isp/isp.h
drivers/media/platform/omap3isp/isp.c

CCF is intentionally designed as a library, meaning that you don't need
to create a new struct device to register clocks. Feel free to BYOD
(bring your own device).

Then your IP block clocks (McASP in this case) can hook into the
system-wide clock tree (e.g. where some of the parent clocks come from).

> 
> > I don't think it will bring any clarity or features we miss right now if we
> > try to move CPU and codec drivers to clk API. IMHO.

CPU drivers? Peter, you wrote the CCF clock provider driver for DRA7
ATL, so I'm not sure what you mean here.

> 
> You happen to be looking at a particularly simple system but things do
> scale up and there's not a clear cutoff point which would allow us to
> make a clear distinction between things that might get used in a simple
> system and things that might need something more complex.  This seems
> particularly important when we're adding things to simple-card, we want
> it to be usable with as many different devices as possible.

The original patches didn't hit my inbox, only the last two replies. Can
someone fill me in on the DT side of this discussion? Why are DT
bindings needed here? Are other devices besides McASP consuming the
clocks provided by McASP?

DT can also be a good candidate for doing per-board (or per-use case)
clock configuration via the assigned-clocks, assigned-clock-rates, and
assigned-clock-parents properties.

Regards,
Mike

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-16 19:13         ` Michael Turquette
@ 2016-02-17  8:13           ` Peter Ujfalusi
  2016-02-17 12:07             ` Mark Brown
  2016-02-17 11:31           ` Mark Brown
  2016-02-17 14:18           ` [alsa-devel] " Ricard Wanderlof
  2 siblings, 1 reply; 14+ messages in thread
From: Peter Ujfalusi @ 2016-02-17  8:13 UTC (permalink / raw)
  To: Michael Turquette, Mark Brown
  Cc: Stephen Boyd, Liam Girdwood, alsa-devel, Jyri Sarha, linux-clk,
	linux-kernel, Kristo, Tero

Mike,

On 02/16/2016 09:13 PM, Michael Turquette wrote:
> Quoting Mark Brown (2016-02-16 05:42:33)
>> On Tue, Feb 16, 2016 at 11:46:52AM +0200, Peter Ujfalusi wrote:
>>
>>> As for codecs, tlv320aic3106 is also pretty simple device from the outside, it
>>> can receive it's reference clock via:
>>> MCLK pin, GPIO2 pin or it can use the BCLK from the bus. Based on the incoming
>>> frequency it can use it directly or it needs to use the internal PLL to
>>> generate the cocks.
>>> It can output generated clock via GPIO1
>>
>> That already sounds like there is room for configuration and hooking
>> into a wider clock tree - we've got three different source options and
>> an output plus a PLL that can presumably take in non-audio rates.
> 
> +1
> 
> It is quite easy for existing drivers to become clock providers. Please
> see struct isp_xclk in:
> 
> drivers/media/platform/omap3isp/isp.h
> drivers/media/platform/omap3isp/isp.c
> 
> CCF is intentionally designed as a library, meaning that you don't need
> to create a new struct device to register clocks. Feel free to BYOD
> (bring your own device).

I have already started to look around what I would need for at least McASP and
tlv320aic3x drivers (the most common combination).
I did not know that omap3isp has CCF provider implementation.

> Then your IP block clocks (McASP in this case) can hook into the
> system-wide clock tree (e.g. where some of the parent clocks come from).
>>
>>> I don't think it will bring any clarity or features we miss right now if we
>>> try to move CPU and codec drivers to clk API. IMHO.
> 
> CPU drivers? Peter, you wrote the CCF clock provider driver for DRA7
> ATL, so I'm not sure what you mean here.

also the clk-twl6040, which is not in use upstream yet.
The ATL is providing the clocks to be used as master clock in McASP and
external components (audio codec).
In ASoC the CPU driver means the CPU DAI (Digital Audio Interface) driver,
like the McASP, McBSP, DMIC, McPDM in TI parts.
In order them to generate the needed clocks on the bus they have internal
clock selection, divider(s). From the SoC point of view these are not really
important, but McASP can also output high speed reference clock to outside so
the codec for example can use the same reference, reducing jitter.

>> You happen to be looking at a particularly simple system but things do
>> scale up and there's not a clear cutoff point which would allow us to
>> make a clear distinction between things that might get used in a simple
>> system and things that might need something more complex.  This seems
>> particularly important when we're adding things to simple-card, we want
>> it to be usable with as many different devices as possible.
> 
> The original patches didn't hit my inbox, only the last two replies. Can
> someone fill me in on the DT side of this discussion?

the original patch:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-February/104320.html

> Why are DT bindings needed here?

ASoC have an API to configure the DAI system clock:
snd_soc_dai_set_sysclk(dai, sysclk_id, sysclk, sysclk_dir);

The sysclk_id is to select among the possible clock sources, sysclk is the
rate of the clock and sysclk_dir is to tell the DAI driver if the given clock
should be input or output.
McASP (and McBSP also) can select between two master clock source. aic3106 can
select between 3 reference clocks.
Unfortunately the simple-card was hardwired to only handle DAIs which have no
master clock selection. We have added additional properties to simple-card so
it will be possible to select clocks and directions.
With this change we don't need to write custom machine drivers for setup not
using sysclk_id == 0.
I do think this is reasonable change by itself.

> Are other devices besides McASP consuming the clocks provided by McASP?

Yes, it can output the same reference clock it is using to external pin, but
it can do that only if it is set to generate the audio clocks on the bus.

> DT can also be a good candidate for doing per-board (or per-use case)
> clock configuration via the assigned-clocks, assigned-clock-rates, and
> assigned-clock-parents properties.

Yes, if the DAI driver implements it's clock tree with CCF internally and with
the assigned-clock* properties we will not need snd_soc_dai_set_sysclk() and
we don't need simple-card to know anything about the clocking of the
components. All of this can be done in the board's DTS file with standard CCF
bindings.

Mark: after thinking over how this should work I can see that it can bring
benefits for the DAI/codec drivers. They need to do things differently, but it
is just implementation question.
However I do think that the current simple-card is flawed regarding to clock
selection and the change Jyri and me are proposing is reasonable.
But if we have the CCF providers popping up in DAI/codec drivers the use of
clock configuration via simple-card not going to be needed. But right know it
is needed.

-- 
Péter

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-16 19:13         ` Michael Turquette
  2016-02-17  8:13           ` Peter Ujfalusi
@ 2016-02-17 11:31           ` Mark Brown
  2016-02-17 14:18           ` [alsa-devel] " Ricard Wanderlof
  2 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2016-02-17 11:31 UTC (permalink / raw)
  To: Michael Turquette
  Cc: Peter Ujfalusi, Stephen Boyd, Liam Girdwood, alsa-devel,
	Jyri Sarha, linux-clk, linux-kernel, Kristo, Tero

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

On Tue, Feb 16, 2016 at 11:13:46AM -0800, Michael Turquette wrote:
> Quoting Mark Brown (2016-02-16 05:42:33)
> > On Tue, Feb 16, 2016 at 11:46:52AM +0200, Peter Ujfalusi wrote:

> > > I don't think it will bring any clarity or features we miss right now if we
> > > try to move CPU and codec drivers to clk API. IMHO.

> CPU drivers? Peter, you wrote the CCF clock provider driver for DRA7
> ATL, so I'm not sure what you mean here.

In this case he's referring to the drivers for the audio IP blocks
inside the SoC.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-17  8:13           ` Peter Ujfalusi
@ 2016-02-17 12:07             ` Mark Brown
  2016-02-17 19:52               ` Peter Ujfalusi
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2016-02-17 12:07 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: Michael Turquette, Stephen Boyd, Liam Girdwood, alsa-devel,
	Jyri Sarha, linux-clk, linux-kernel, Kristo, Tero

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

On Wed, Feb 17, 2016 at 10:13:35AM +0200, Peter Ujfalusi wrote:

> With this change we don't need to write custom machine drivers for setup not
> using sysclk_id == 0.
> I do think this is reasonable change by itself.

> However I do think that the current simple-card is flawed regarding to clock
> selection and the change Jyri and me are proposing is reasonable.

But you define a new ABI to specify it in the process, I'd rather fix
the flaws by using the common clock ABI than extend any device stuff.
If it didn't define a new ABI I'd probably not worry about it but one of
the issues we have with DT is that we do end up making ABIs every time
we put something in DT.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-16 19:13         ` Michael Turquette
  2016-02-17  8:13           ` Peter Ujfalusi
  2016-02-17 11:31           ` Mark Brown
@ 2016-02-17 14:18           ` Ricard Wanderlof
  2016-02-22  3:21             ` Mark Brown
  2 siblings, 1 reply; 14+ messages in thread
From: Ricard Wanderlof @ 2016-02-17 14:18 UTC (permalink / raw)
  To: Mark Brown
  Cc: Peter Ujfalusi, alsa-devel, Stephen Boyd, linux-kernel,
	Jyri Sarha, Liam Girdwood, Kristo, Tero, linux-clk,
	Michael Turquette


Quoting Mark Brown (2016-02-16 05:42:33)
> On Tue, Feb 16, 2016 at 11:46:52AM +0200, Peter Ujfalusi wrote:
> 
> > As for codecs, tlv320aic3106 is also pretty simple device from the outside, it
> > can receive it's reference clock via:
> > MCLK pin, GPIO2 pin or it can use the BCLK from the bus. Based on the incoming
> > frequency it can use it directly or it needs to use the internal PLL to
> > generate the cocks.
> > It can output generated clock via GPIO1
> 
> That already sounds like there is room for configuration and hooking
> into a wider clock tree - we've got three different source options and
> an output plus a PLL that can presumably take in non-audio rates.

It makes sense to use an already existing clock framework, but I'm 
wondering, how do we model the clock select function? Using a clock mux? 
Somewhere, somehow, something needs to look at the setup and decide which 
pin on the codec should be the clock source (e.g. MCLK, GPIO2, or BCLK in 
the case of the tlv320aic3106).

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-17 12:07             ` Mark Brown
@ 2016-02-17 19:52               ` Peter Ujfalusi
  2016-04-18 15:50                 ` [alsa-devel] " Peter Ujfalusi
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Ujfalusi @ 2016-02-17 19:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Michael Turquette, Stephen Boyd, Liam Girdwood, alsa-devel,
	Jyri Sarha, linux-clk, linux-kernel, Kristo, Tero

On 02/17/2016 02:07 PM, Mark Brown wrote:
> On Wed, Feb 17, 2016 at 10:13:35AM +0200, Peter Ujfalusi wrote:
> 
>> With this change we don't need to write custom machine drivers for setup not
>> using sysclk_id == 0.
>> I do think this is reasonable change by itself.
> 
>> However I do think that the current simple-card is flawed regarding to clock
>> selection and the change Jyri and me are proposing is reasonable.
> 
> But you define a new ABI to specify it in the process, I'd rather fix
> the flaws by using the common clock ABI than extend any device stuff.
> If it didn't define a new ABI I'd probably not worry about it but one of
> the issues we have with DT is that we do end up making ABIs every time
> we put something in DT.

I understand. This should have been supported by simple-card since the
beginning. When we tried to move all boards to use simple-card, we hit the
wall by not being able to select and configure other sysclk_id than 0.
I don't want to create yet another simple card which handles only sysclk_id 1 ;)
On the other hand this ABI is backwards compatible since if it is missing it
will default to the configuration we right now have regarding to sysclk_dir
and sysclk_id.

I will look at the CCF implementation for McASP first then for aic3x.

-- 
Péter

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-17 14:18           ` [alsa-devel] " Ricard Wanderlof
@ 2016-02-22  3:21             ` Mark Brown
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2016-02-22  3:21 UTC (permalink / raw)
  To: Ricard Wanderlof
  Cc: Peter Ujfalusi, alsa-devel, Stephen Boyd, linux-kernel,
	Jyri Sarha, Liam Girdwood, Kristo, Tero, linux-clk,
	Michael Turquette

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

On Wed, Feb 17, 2016 at 03:18:57PM +0100, Ricard Wanderlof wrote:

> It makes sense to use an already existing clock framework, but I'm 
> wondering, how do we model the clock select function? Using a clock mux? 

Yes, that looks like a mux to me.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-02-17 19:52               ` Peter Ujfalusi
@ 2016-04-18 15:50                 ` Peter Ujfalusi
  2016-04-18 16:29                   ` Mark Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Ujfalusi @ 2016-04-18 15:50 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Jyri Sarha, linux-kernel, Kristo, Tero, linux-clk

On 02/17/2016 09:52 PM, Peter Ujfalusi wrote:
> On 02/17/2016 02:07 PM, Mark Brown wrote:
>> On Wed, Feb 17, 2016 at 10:13:35AM +0200, Peter Ujfalusi wrote:
>>
>>> With this change we don't need to write custom machine drivers for setup not
>>> using sysclk_id == 0.
>>> I do think this is reasonable change by itself.
>>
>>> However I do think that the current simple-card is flawed regarding to clock
>>> selection and the change Jyri and me are proposing is reasonable.
>>
>> But you define a new ABI to specify it in the process, I'd rather fix
>> the flaws by using the common clock ABI than extend any device stuff.
>> If it didn't define a new ABI I'd probably not worry about it but one of
>> the issues we have with DT is that we do end up making ABIs every time
>> we put something in DT.
> 
> I understand. This should have been supported by simple-card since the
> beginning. When we tried to move all boards to use simple-card, we hit the
> wall by not being able to select and configure other sysclk_id than 0.
> I don't want to create yet another simple card which handles only sysclk_id 1 ;)
> On the other hand this ABI is backwards compatible since if it is missing it
> will default to the configuration we right now have regarding to sysclk_dir
> and sysclk_id.
> 
> I will look at the CCF implementation for McASP first then for aic3x.

The first issue with converting the McASP to use CCF internally for clock
selection, muxing and rate configuration is that the daVinci platform does not
use CCF at all. Given that the davinci-mcasp driver is used by daVinci, we
need to have non CCF way supported in ASoC...

-- 
Péter

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-04-18 15:50                 ` [alsa-devel] " Peter Ujfalusi
@ 2016-04-18 16:29                   ` Mark Brown
  2016-04-21 22:29                     ` Stephen Boyd
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2016-04-18 16:29 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: alsa-devel, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Jyri Sarha, linux-kernel, Kristo, Tero, linux-clk

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

On Mon, Apr 18, 2016 at 06:50:52PM +0300, Peter Ujfalusi wrote:
> On 02/17/2016 09:52 PM, Peter Ujfalusi wrote:

> > On the other hand this ABI is backwards compatible since if it is missing it
> > will default to the configuration we right now have regarding to sysclk_dir
> > and sysclk_id.

> > I will look at the CCF implementation for McASP first then for aic3x.

> The first issue with converting the McASP to use CCF internally for clock
> selection, muxing and rate configuration is that the daVinci platform does not
> use CCF at all. Given that the davinci-mcasp driver is used by daVinci, we
> need to have non CCF way supported in ASoC...

Well, at least long term we do need daVinci converting to CCF - this is
going to continue to cause problems, devices not part of the SoC can and
do contain clocks and are going to end up being supported via the clock
API.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-04-18 16:29                   ` Mark Brown
@ 2016-04-21 22:29                     ` Stephen Boyd
  2016-04-22 11:52                       ` Peter Ujfalusi
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Boyd @ 2016-04-21 22:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: Peter Ujfalusi, alsa-devel, Michael Turquette, Liam Girdwood,
	Jyri Sarha, linux-kernel, Kristo, Tero, linux-clk

On 04/18, Mark Brown wrote:
> On Mon, Apr 18, 2016 at 06:50:52PM +0300, Peter Ujfalusi wrote:
> > On 02/17/2016 09:52 PM, Peter Ujfalusi wrote:
> 
> > > On the other hand this ABI is backwards compatible since if it is missing it
> > > will default to the configuration we right now have regarding to sysclk_dir
> > > and sysclk_id.
> 
> > > I will look at the CCF implementation for McASP first then for aic3x.
> 
> > The first issue with converting the McASP to use CCF internally for clock
> > selection, muxing and rate configuration is that the daVinci platform does not
> > use CCF at all. Given that the davinci-mcasp driver is used by daVinci, we
> > need to have non CCF way supported in ASoC...
> 
> Well, at least long term we do need daVinci converting to CCF - this is
> going to continue to cause problems, devices not part of the SoC can and
> do contain clocks and are going to end up being supported via the clock
> API.

Does anyone here know what's involved in converting daVinci to
CCF? It doesn't look too far off from what is in the CCF today,
so I'm not sure what's blocking the transition.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-04-21 22:29                     ` Stephen Boyd
@ 2016-04-22 11:52                       ` Peter Ujfalusi
  2016-04-22 12:08                         ` Tero Kristo
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Ujfalusi @ 2016-04-22 11:52 UTC (permalink / raw)
  To: Stephen Boyd, Mark Brown
  Cc: alsa-devel, Michael Turquette, Liam Girdwood, Jyri Sarha,
	linux-kernel, Kristo, Tero, linux-clk

On 04/22/16 01:29, Stephen Boyd wrote:
>>> The first issue with converting the McASP to use CCF internally for clock
>>> selection, muxing and rate configuration is that the daVinci platform does not
>>> use CCF at all. Given that the davinci-mcasp driver is used by daVinci, we
>>> need to have non CCF way supported in ASoC...
>>
>> Well, at least long term we do need daVinci converting to CCF - this is
>> going to continue to cause problems, devices not part of the SoC can and
>> do contain clocks and are going to end up being supported via the clock
>> API.
> 
> Does anyone here know what's involved in converting daVinci to
> CCF? It doesn't look too far off from what is in the CCF today,
> so I'm not sure what's blocking the transition.

Not entirely sure, but most likely new clk driver(s) for daVinci under
drivers/clk/ti/ new set of structures to describe the clocks if the ti_clk* is
not applicable I guess for starter. Support for DT, non DT boots as most of
daVinci is not booting with DT and most likely never will.
It might help to have different daVinci boards for testing the transition. I
only have OMAP-L138-evm. I don't think it is enough for testing an entire
architecture for this big change...

Tero might have better estimates on what is involved when switching an
architecture to CCF from custom, but at least synchronized API - so we don't
need to convert drivers at least.

-- 
Péter

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [alsa-devel] [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID
  2016-04-22 11:52                       ` Peter Ujfalusi
@ 2016-04-22 12:08                         ` Tero Kristo
  0 siblings, 0 replies; 14+ messages in thread
From: Tero Kristo @ 2016-04-22 12:08 UTC (permalink / raw)
  To: Peter Ujfalusi, Stephen Boyd, Mark Brown
  Cc: alsa-devel, Michael Turquette, Liam Girdwood, Jyri Sarha,
	linux-kernel, linux-clk

On 22/04/16 14:52, Peter Ujfalusi wrote:
> On 04/22/16 01:29, Stephen Boyd wrote:
>>>> The first issue with converting the McASP to use CCF internally for clock
>>>> selection, muxing and rate configuration is that the daVinci platform does not
>>>> use CCF at all. Given that the davinci-mcasp driver is used by daVinci, we
>>>> need to have non CCF way supported in ASoC...
>>>
>>> Well, at least long term we do need daVinci converting to CCF - this is
>>> going to continue to cause problems, devices not part of the SoC can and
>>> do contain clocks and are going to end up being supported via the clock
>>> API.
>>
>> Does anyone here know what's involved in converting daVinci to
>> CCF? It doesn't look too far off from what is in the CCF today,
>> so I'm not sure what's blocking the transition.
>
> Not entirely sure, but most likely new clk driver(s) for daVinci under
> drivers/clk/ti/ new set of structures to describe the clocks if the ti_clk* is
> not applicable I guess for starter. Support for DT, non DT boots as most of
> daVinci is not booting with DT and most likely never will.
> It might help to have different daVinci boards for testing the transition. I
> only have OMAP-L138-evm. I don't think it is enough for testing an entire
> architecture for this big change...
>
> Tero might have better estimates on what is involved when switching an
> architecture to CCF from custom, but at least synchronized API - so we don't
> need to convert drivers at least.
>

Davinci is currently a mutant architecture, it is overriding the common 
clk APIs and using its own. Converting these to CCF may open a can of 
worms in many ways.

All the clock data should be converted to support CCF, (from 
arch/arm/mach-davinci/), along with whatever Peter said.

This also in a situation where many/most upstream people don't even have 
davinci devices... Personally I have a grand total of zero davinci 
boards on my desk so at least I am unable to work on this right now.

-Tero

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-22 12:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1455545495-20292-1-git-send-email-peter.ujfalusi@ti.com>
     [not found] ` <1455545495-20292-5-git-send-email-peter.ujfalusi@ti.com>
     [not found]   ` <20160215152635.GN18988@sirena.org.uk>
2016-02-16  9:46     ` [PATCH 4/4] ASoC: simple-card: Support for selecting system clocks by ID Peter Ujfalusi
2016-02-16 13:42       ` Mark Brown
2016-02-16 19:13         ` Michael Turquette
2016-02-17  8:13           ` Peter Ujfalusi
2016-02-17 12:07             ` Mark Brown
2016-02-17 19:52               ` Peter Ujfalusi
2016-04-18 15:50                 ` [alsa-devel] " Peter Ujfalusi
2016-04-18 16:29                   ` Mark Brown
2016-04-21 22:29                     ` Stephen Boyd
2016-04-22 11:52                       ` Peter Ujfalusi
2016-04-22 12:08                         ` Tero Kristo
2016-02-17 11:31           ` Mark Brown
2016-02-17 14:18           ` [alsa-devel] " Ricard Wanderlof
2016-02-22  3:21             ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).