linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Tero Kristo <t-kristo@ti.com>, Tony Lindgren <tony@atomide.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-omap@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH] clk: ti: clkctrl: Fix hidden dependency to node name with reg-names
Date: Thu, 19 Sep 2019 09:50:54 -0700	[thread overview]
Message-ID: <20190919165055.43CEB21928@mail.kernel.org> (raw)
In-Reply-To: <20190919141224.GH5610@atomide.com>

Quoting Tony Lindgren (2019-09-19 07:12:24)
> Hi,
> 
> * Tero Kristo <t-kristo@ti.com> [190919 06:46]:
> > On 06/09/2019 00:55, Tony Lindgren wrote:
> > > diff --git a/Documentation/devicetree/bindings/clock/ti-clkctrl.txt b/Documentation/devicetree/bindings/clock/ti-clkctrl.txt
> > > --- a/Documentation/devicetree/bindings/clock/ti-clkctrl.txt
> > > +++ b/Documentation/devicetree/bindings/clock/ti-clkctrl.txt
> > > @@ -20,15 +20,19 @@ Required properties :
> > >   - #clock-cells : shall contain 2 with the first entry being the instance
> > >              offset from the clock domain base and the second being the
> > >              clock index
> > > +- reg : clock registers
> > > +- reg-names : clock register names for the clock, should be same as the
> > > +         domain name
> > 
> > Hmm, I think using the reg-names property like this is kind of wrong.
> > Basically, reg and reg-names have pretty much nothing in common. Shouldn't
> > you instead use something like ti,clkdm-name? This also breaks with SoCs
> > like am3, which have mutant clkctrl entries like the one here:
> > 
> >                 l4ls_clkctrl: l4ls-clkctrl@38 {
> >                         compatible = "ti,clkctrl";
> >                         reg = <0x38 0x2c>, <0x6c 0x28>, <0xac 0xc>, <0xc0
> > 0x1c>, <0xec 0xc>, <0x10c 0x8>, <0x130 0x4>;
> >                         #clock-cells = <2>;
> >                 };
> > 
> > What would you think single entry in reg-names would mean in this case?
> 
> Oh right, I forgot about the mixed register case again.
> These are all in l4ls domain..
> 
> So sounds like the best option is just to allow adding more
> specific compatible values like this for the omap4 rng case:
> 
>         l4_secure_clkctrl: clock@1a0 {
>                 compatible = "ti,clkctrl-omap4-l4-secure", "ti,clkctrl";
>                 reg = <0x1a0 0x28>;
>                 #clock-cells = <2>;
>         };
> 
> And then use match data to get the domain name on init.
> 

The existing ti,clkctrl binding is pretty weird. I still believe that
the CM container node should be the only node and it should be logic in
the driver that describes the clks provided by the CM node. I guess I
have to just ignore this stuff because it's all working! 


  reply	other threads:[~2019-09-19 16:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 21:55 [PATCH] clk: ti: clkctrl: Fix hidden dependency to node name with reg-names Tony Lindgren
2019-09-07  3:55 ` Stephen Boyd
2019-09-08 19:42   ` Tony Lindgren
2019-09-18 18:07     ` Stephen Boyd
2019-09-18 20:53       ` Tony Lindgren
2019-09-18 23:28         ` Stephen Boyd
2019-09-19  0:01           ` Tony Lindgren
2019-09-19  6:46 ` Tero Kristo
2019-09-19 14:12   ` Tony Lindgren
2019-09-19 16:50     ` Stephen Boyd [this message]
2019-09-19 17:06       ` Tony Lindgren

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=20190919165055.43CEB21928@mail.kernel.org \
    --to=sboyd@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).