From: Rob Herring <robh@kernel.org>
To: Daniel Palmer <daniel@0x0f.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
DTML <devicetree@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-clk@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] dt-bindings: clk: Mstar msc313 clkgen mux
Date: Fri, 5 Mar 2021 14:12:18 -0600 [thread overview]
Message-ID: <20210305201218.GA568065@robh.at.kernel.org> (raw)
In-Reply-To: <CAFr9PXmhnW8PgdZ7i3W2J0SGfW5sNfYd6cHDMSt_E_4Z9XNbUg@mail.gmail.com>
On Sat, Feb 13, 2021 at 10:18:14AM +0900, Daniel Palmer wrote:
> Hi Stephen,
>
> On Sat, 13 Feb 2021 at 09:11, Stephen Boyd <sboyd@kernel.org> wrote:
> > > +examples:
> > > + - |
> > > + clkgen_mux_mspi0: clkgen_mux_mspi0 {
> > > + compatible = "mstar,msc313-clkgen-mux";
> > > + regmap = <&clkgen>;
> > > + offset = <0xcc>;
> > > + #clock-cells = <1>;
> > > + mstar,gate = <0>;
> > > + mstar,mux-shift = <2>;
> > > + mstar,mux-width = <2>;
> >
> > It looks like a node-per clk sort of binding which has been rejected
> > multiple times in the past. If the clks are spread across various
> > devices then it sounds like the mediatek design where they have many
> > syscon nodes that also register clks inside those register spaces. In
> > this case, I would expect the clkgen node to be registering clks. Given
> > that there isn't a reg property and there's these mstar specific
> > properties like shift/width it looks really wrong. Please don't do this.
>
> Ok. I will rethink this. One of the problems I face here is that there
> isn't any documentation for what the clkgen looks like.
All the more reason to not do a node per clock.
> I have a list of offsets and bit positions for these muxes but very little else.
> Looking at the mediatek clock drivers it seems like they have a driver
> that consumes some register areas and then creates all of the muxes
> etc within those areas within the driver instead. If that's an
> acceptable solution I will go for that.
> There would probably be 2 compatible strings right now (one for the pm
> area and one for the normal area) and that would take a phandle to the
> syscon that holds the registers. Then there would be a big table of
> the offsets, masks etc in the driver.
Ideally, the 'syscon' is just the clock provider or a child node is.
Rob
prev parent reply other threads:[~2021-03-05 20:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 11:16 [RFC PATCH 0/1] Potential binding MStar clk muxes Daniel Palmer
2021-02-12 11:16 ` [RFC PATCH 1/1] dt-bindings: clk: Mstar msc313 clkgen mux Daniel Palmer
2021-02-13 0:11 ` Stephen Boyd
2021-02-13 1:18 ` Daniel Palmer
2021-03-05 20:12 ` Rob Herring [this message]
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=20210305201218.GA568065@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=daniel@0x0f.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=sboyd@kernel.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).