Devicetree
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Daniel Mack <daniel@zonque.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Mark Brown <broonie@kernel.org>,
	lgirdwood@gmail.com, kuninori.morimoto.gx@renesas.com
Subject: Re: [PATCH 2/3] ASoC: simple-card: make sysclk index configurable
Date: Thu, 31 May 2018 12:02:40 -0500	[thread overview]
Message-ID: <20180531170240.GA29973@rob-hp-laptop> (raw)
In-Reply-To: <f130a86f-deca-b5cf-da34-5cf52a9c39fc@zonque.org>

On Tue, May 29, 2018 at 10:23:48PM +0200, Daniel Mack wrote:
> On Tuesday, May 29, 2018 01:24 PM, Mark Brown wrote:
> > On Mon, May 28, 2018 at 09:35:02PM +0200, Daniel Mack wrote:
> > > The simple-card driver currently hard-codes the clk_id parameter in
> > > snd_soc_dai_set_sysclk() to 0. Make this configrable for both CPU and
> > > codec dai sub-nodes.
> > 
> > > This still has the limitation that only one clk_id can be configured, but it
> > > should help some more platforms to use simple-card in favor to a more
> > > specific machine driver.
> > 
> > If we want to get more complex usage of clocks in the DT we should be
> > moving the CODECs over to using the standard clock bindings for this
> > stuff rather than inventing custom ASoC clock bindings for it.  That way
> > we don't have to deal with the pain of trying to join things up in the
> > future.
> 
> This will get rather complex too though, because most codec and cpu dais can
> act as clock source xor clock consumer, depending on how the hardware is
> built. Would you want to represent everything, bit clocks, frame clocks,
> master clocks etc as clock nodes?

I have no idea if you need all the clocks or not, but they certainly 
shouldn't be a node per clock. Rather the codec and/or cpu dai should be 
a clock provider and can provide N clocks.
 
> If that's the case, could you depict how the DT bindings should look like by
> example?

In clock providers, you just add #clock-cells. Then the consumer side 
defines 'clocks'. Which clock(s) comes from the dai is defined by the 
index in the 'clocks' property for that node.

Both ends can be providers, but who is active is determined by defining 
the actual connections with 'clocks'. Or perhaps you have both 
directions shown and there is some other means to select which one is 
active such as solving for who can provide the desired freq.

Hope that helps.

Rob

  parent reply	other threads:[~2018-05-31 17:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-28 19:35 [PATCH 0/3] ASoC: make simple-card a bit more versatile Daniel Mack
2018-05-28 19:35 ` [PATCH 1/3] ASoC: simple-card: set cpu dai clk in hw_params Daniel Mack
2018-05-29  1:38   ` Kuninori Morimoto
2018-05-29  4:26     ` Daniel Mack
2018-05-29 11:16   ` Mark Brown
2018-05-29 11:17     ` Daniel Mack
2018-05-29 11:32       ` Mark Brown
2018-05-29 20:31         ` Daniel Mack
2018-05-28 19:35 ` [PATCH 2/3] ASoC: simple-card: make sysclk index configurable Daniel Mack
2018-05-29  1:35   ` Kuninori Morimoto
2018-05-29  4:34     ` Daniel Mack
2018-05-29 11:24   ` Mark Brown
2018-05-29 20:23     ` Daniel Mack
2018-05-30  9:49       ` Mark Brown
2018-05-31 17:02       ` Rob Herring [this message]
2018-05-31 20:03         ` Daniel Mack
2018-06-01 14:21           ` Rob Herring
2018-05-28 19:35 ` [PATCH 3/3] ASoC: simple-card: add support for clock divider setup Daniel Mack
2018-05-29  1:31   ` Kuninori Morimoto
2018-05-29 11:35   ` Mark Brown
2018-05-29 20:29     ` Daniel Mack
2018-05-30  9:10       ` Mark Brown
2018-05-30  9:12         ` Daniel Mack
2018-06-23 18:41           ` Daniel Mack
2018-06-25 11:24             ` Mark Brown
2018-06-25 12:55               ` Daniel Mack
2018-06-25 12:57                 ` Mark Brown
2018-06-25 12:57                   ` Daniel Mack

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=20180531170240.GA29973@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox