All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] ASoC: simple-card: Update clocks binding for simple-card DAI subnodes
@ 2015-09-11 13:18 Jyri Sarha
       [not found] ` <1441977482-29215-1-git-send-email-jsarha-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jyri Sarha @ 2015-09-11 13:18 UTC (permalink / raw)
  To: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ,
	Xiubo.Lee-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	peter.ujfalusi-l0cyMroinI0,
	liam.r.girdwood-VuQAYsv1563Yd54FQh9/CA, Jyri Sarha

The updated binding provides a way to set clock-ID and direction
parameters for DAI drivers set_sysclk() call back.

Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
I proposed something similar about a year ago, but Mark rejected that
at the time. This RFC is to start that discussion again. This time
before I do any code changes.

Best regards,
Jyri

 Documentation/devicetree/bindings/sound/simple-card.txt | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index cf3979e..d10bf2d 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -76,6 +76,7 @@ Optional CPU/CODEC subnodes properties:
 - dai-tdm-slot-num			: Please refer to tdm-slot.txt.
 - dai-tdm-slot-width			: Please refer to tdm-slot.txt.
 - clocks / system-clock-frequency	: specify subnode's clock if needed.
+
 					  it can be specified via "clocks" if system has
 					  clock node (= common clock), or "system-clock-frequency"
 					  (if system doens't support common clock)
@@ -83,7 +84,21 @@ Optional CPU/CODEC subnodes properties:
 					  enabled with clk_prepare_enable()
 					  in dai startup() and disabled with
 					  clk_disable_unprepare() in dai
-					  shutdown().
+					  shutdown(). "system-clock-frequency" 
+					  can also be an array if more than one
+					  clock is described.
+- clock-ids				: An array of clock ID integers,
+					  preferrably defined in DT header.
+					  Each entry corresponds to the same
+					  index postion first in "clocks" and
+					  after the end of clocks array to
+					  "system-clock-frequency" array.
+- clock-dirs				: An array of integers describing
+					  clock directions: CLK_IN (= 0) or
+					  OUT (= 1). Entries in the array
+					  refer to clocks in the same way as
+					  in clock-ids property.
+
 
 Example 1 - single DAI link:
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH RFC] ASoC: simple-card: Update clocks binding for simple-card DAI subnodes
       [not found] ` <1441977482-29215-1-git-send-email-jsarha-l0cyMroinI0@public.gmane.org>
@ 2015-09-19 18:42   ` Mark Brown
       [not found]     ` <20150919184225.GR30445-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2015-09-19 18:42 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ,
	Xiubo.Lee-Re5JQEeQqe8AvxtiuMwx3w, peter.ujfalusi-l0cyMroinI0,
	liam.r.girdwood-VuQAYsv1563Yd54FQh9/CA

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

On Fri, Sep 11, 2015 at 04:18:02PM +0300, Jyri Sarha wrote:

> The updated binding provides a way to set clock-ID and direction
> parameters for DAI drivers set_sysclk() call back.

> I proposed something similar about a year ago, but Mark rejected that
> at the time. This RFC is to start that discussion again. This time
> before I do any code changes.

What's the use case again?  Can we address this by converting the
relevant drivers to the clock API (or improving their clock API
support)?

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

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

* Re: [PATCH RFC] ASoC: simple-card: Update clocks binding for simple-card DAI subnodes
       [not found]     ` <20150919184225.GR30445-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2015-09-28 18:49       ` Jyri Sarha
       [not found]         ` <56098BBF.2010700-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jyri Sarha @ 2015-09-28 18:49 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ,
	Xiubo.Lee-Re5JQEeQqe8AvxtiuMwx3w, peter.ujfalusi-l0cyMroinI0,
	liam.r.girdwood-VuQAYsv1563Yd54FQh9/CA

On 09/19/15 21:42, Mark Brown wrote:
> On Fri, Sep 11, 2015 at 04:18:02PM +0300, Jyri Sarha wrote:
>
>> The updated binding provides a way to set clock-ID and direction
>> parameters for DAI drivers set_sysclk() call back.
>
>> I proposed something similar about a year ago, but Mark rejected that
>> at the time. This RFC is to start that discussion again. This time
>> before I do any code changes.
>
> What's the use case again?  Can we address this by converting the
> relevant drivers to the clock API (or improving their clock API
> support)?
>

Sorry, I forgot to reply this earlier. The reason why we need this is 
the way McASP driver uses and provides clocks for different purposes. 
The most pressing need is to be able to select if we want to use some 
external clock pin as an input for McASP clock divider that produces the 
i2s bit-clock or if we want to use McASP's internal clock source.

There are several other things this binding would allow us, and others 
with flexible i2s HW, to do. Some TI codecs would also benefit from a 
flexible way of describing the used clock configuration, but Peter know 
that part better.

I tried to make the binding as flexible and generic as possible. But I 
do not currently see any immediate need for more than one set_sysclk() 
call per dai. I just did not see any reason to not allow it either.

Best regards,
Jyri
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH RFC] ASoC: simple-card: Update clocks binding for simple-card DAI subnodes
       [not found]         ` <56098BBF.2010700-l0cyMroinI0@public.gmane.org>
@ 2015-10-06 11:06           ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-10-06 11:06 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ,
	Xiubo.Lee-Re5JQEeQqe8AvxtiuMwx3w, peter.ujfalusi-l0cyMroinI0,
	liam.r.girdwood-VuQAYsv1563Yd54FQh9/CA

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

On Mon, Sep 28, 2015 at 09:49:35PM +0300, Jyri Sarha wrote:
> On 09/19/15 21:42, Mark Brown wrote:

> >What's the use case again?  Can we address this by converting the
> >relevant drivers to the clock API (or improving their clock API
> >support)?

> Sorry, I forgot to reply this earlier. The reason why we need this is the
> way McASP driver uses and provides clocks for different purposes. The most
> pressing need is to be able to select if we want to use some external clock
> pin as an input for McASP clock divider that produces the i2s bit-clock or
> if we want to use McASP's internal clock source.

> There are several other things this binding would allow us, and others with
> flexible i2s HW, to do. Some TI codecs would also benefit from a flexible
> way of describing the used clock configuration, but Peter know that part
> better.

> I tried to make the binding as flexible and generic as possible. But I do
> not currently see any immediate need for more than one set_sysclk() call per
> dai. I just did not see any reason to not allow it either.

This explains why you want to do this but what about the clock API
portion of the question - it would be good to move the ASoC clocking
more into the clock API, this would help integration with wider clock
trees.

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

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

end of thread, other threads:[~2015-10-06 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-11 13:18 [PATCH RFC] ASoC: simple-card: Update clocks binding for simple-card DAI subnodes Jyri Sarha
     [not found] ` <1441977482-29215-1-git-send-email-jsarha-l0cyMroinI0@public.gmane.org>
2015-09-19 18:42   ` Mark Brown
     [not found]     ` <20150919184225.GR30445-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-09-28 18:49       ` Jyri Sarha
     [not found]         ` <56098BBF.2010700-l0cyMroinI0@public.gmane.org>
2015-10-06 11:06           ` Mark Brown

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.