linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 6/8] of: add clock providers
Date: Wed, 09 Nov 2011 07:59:17 -0600	[thread overview]
Message-ID: <4EBA8735.902@gmail.com> (raw)
In-Reply-To: <4EBA62AD.3000407@ti.com>

On 11/09/2011 05:23 AM, Cousson, Benoit wrote:
> On 11/9/2011 10:13 AM, Sascha Hauer wrote:
>> On Tue, Nov 08, 2011 at 06:19:41PM -0700, Grant Likely wrote:
> 
> [...]
> 
>>> +Sources of clock signal can be represented by any node in the device
>>> +tree.  Those nodes are designated as clock providers.  Clock consumer
>>> +nodes use a phandle and clock specifier pair to connect clock provider
>>> +outputs to clock inputs.  Similar to the gpio specifiers, a clock
>>> +specifier is an array of one more more cells identifying the clock
>>> +output on a device.  The length of a clock specifier is defined by the
>>> +value of a #clock-cells property in the clock provider node.
>>> +
>>> +[1] http://patchwork.ozlabs.org/patch/31551/
>>> +
>>> +==Clock providers==
>>> +
>>> +Required properties:
>>> +#clock-cells:       Number of cells in a clock specifier; typically
>>> will be
>>> +           set to 1
>>> +
>>> +Optional properties:
>>> +clock-output-name: Recommended to be a list of strings of clock
>>> output signal
>>> +           names indexed by the first cell in the clock specifier.
>>> +           However, the meaning of clock-output-names is domain
>>> +           specific to the clock provider, and is only provided to
>>> +           encourage using the same meaning for the majority of clock
>>> +           providers.  This format may not work for clock providers
>>> +           using a complex clock specifier format.  In those cases it
>>> +           is recommended to omit this property and create a binding
>>> +           specific names property.
>>
>> If the clock-output-name property is omitted, does this mean a clock
>> provider only has a single output or does it mean that it's not known
>> how many clock outputs a provider actually has?
> 
> Allowing several outputs for a single clock node might lead to a lot of
> confusion. What will be the meaning of a clock rate if you have several
> outputs at different frequency?

You typically only have a frequency property for fixed clocks.

However, we should think about how to set frequency for programmable
clocks. Perhaps this is just making clock-frequency an array of
values in the same order as the outputs.

> I think it will be better to define a clock node as a single source of
> clock. If several outputs are needed, then we should define several
> clock nodes.
> If we let a clock node be any kind of big clock blob, we will never be
> able to define some generic reusable clock node API. Everybody will
> define its own custom clock blobs.
> 

Whether you decide to implement a blob or every single mux, divider, and
gate is independent from whether you use generic clock code or not. You
could simply define a clock controller node with lots of outputs yet
still use generic code to implement clock support in Linux. The reality
is you will probably have a mixture of generic and SOC-specific clocks.

What is our goal here? I'm skeptical we will ever get to the point that
we can fully describe the clock tree for a new SOC without any code
changes. Perhaps our goal is simply that clock differences across all
boards for an SOC can be described in DT.

Rob

  parent reply	other threads:[~2011-11-09 13:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  1:19 [RFC 0/8] Initial DT clock bindings Grant Likely
     [not found] ` <1320801583-12774-8-git-send-email-grant.likely@secretlab.ca>
2011-11-09  2:36   ` [RFC 7/8] arm/clkdev: lookup clocks from OF clock providers Rob Herring
2011-11-16 18:54     ` Grant Likely
     [not found] ` <1320801583-12774-7-git-send-email-grant.likely@secretlab.ca>
2011-11-09  2:49   ` [RFC 6/8] of: add " Rob Herring
2011-11-14  2:14     ` Richard Zhao
2011-11-16 19:06       ` Grant Likely
2011-11-09  9:13   ` Sascha Hauer
2011-11-09 11:23     ` Cousson, Benoit
2011-11-09 11:49       ` Sascha Hauer
2011-11-11 19:57         ` Cousson, Benoit
2011-11-16 22:12           ` Grant Likely
2011-11-18  7:48             ` Sascha Hauer
2011-11-09 13:59       ` Rob Herring [this message]
2011-11-11 19:50         ` Cousson, Benoit
2011-11-09 13:31     ` Rob Herring
2011-11-09 18:39   ` Tony Lindgren
2011-11-21 15:37   ` Shawn Guo
2011-11-30 19:38     ` Grant Likely
2011-12-01  6:34       ` Shawn Guo
     [not found] ` <1320801583-12774-9-git-send-email-grant.likely@secretlab.ca>
2011-11-09  9:31   ` [RFC 8/8] dt/arm: versatile add clock parsing Sascha Hauer
     [not found] ` <1320801583-12774-4-git-send-email-grant.likely@secretlab.ca>
2011-11-14  3:59   ` [RFC 3/8] of: create of_phandle_args to simplify return of phandle parsing data Shawn Guo
2011-11-16 18:47     ` Grant Likely
2011-11-21 15:50   ` Shawn Guo
     [not found] ` <1320801583-12774-2-git-send-email-grant.likely@secretlab.ca>
2011-12-21 10:22   ` [RFC 1/8] gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags() Michal Simek
2012-01-04 18:30     ` Grant Likely
2012-01-05  7:28       ` Michal Simek

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=4EBA8735.902@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).