linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: John Crispin <john@phrozen.org>, NOGUCHI Hiroshi <drvlabo@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-mips@vger.kernel.org, linux-clk@vger.kernel.org,
	NOGUCHI Hiroshi <drvlabo@gmail.com>
Subject: Re: [RFC v2 2/5] dt-bindings: clk: add document for ralink clock driver
Date: Thu, 25 Apr 2019 12:29:52 -0700	[thread overview]
Message-ID: <155622059236.15276.15417177789148260137@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20190405000129.19331-3-drvlabo@gmail.com>

Quoting NOGUCHI Hiroshi (2019-04-04 17:01:26)
> Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
> ---
>  .../bindings/clock/ralink,rt2880-clock.txt    | 58 +++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/ralink,rt2880-clock.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/ralink,rt2880-clock.txt b/Documentation/devicetree/bindings/clock/ralink,rt2880-clock.txt
> new file mode 100644
> index 000000000000..2fc0d622e01e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/ralink,rt2880-clock.txt
> @@ -0,0 +1,58 @@
> +* Clock bindings for Ralink/Mediatek MIPS based SoCs
> +
> +Required properties:
> + - compatible: must be "ralink,rt2880-clock"
> + - #clock-cells: must be 1
> + - ralink,sysctl: a phandle to a ralink syscon register region
> + - clock-indices: identifying number.
> +       These must correspond to the bit number in CLKCFG1.

These look like driver level details that we're putting in the DT so we
can compress the number space that consumers use. Is that right? If so,
I don't get it. Can we not use this property?

> +       Clock consumers use one of them as #clock-cells index.
> + - clock-output-names: array of gating clocks' names
> + - clocks: array of phandles which points the parent clock
> +       for gating clocks.
> +       If gating clock does not need parent clock linkage,
> +       we bind to dummy clock whose frequency is zero.
> +
> +
> +Example:
> +
> +/* dummy parent clock node */
> +dummy_ck: dummy_ck {
> +       #clock-cells = <0>;
> +       compatible = "fixed-clock";
> +       clock-frequency = <0>;
> +};

Would this ever exist in practice? If not, please remove from the
example so we don't get the wrong idea.

> +
> +clkctrl: clkctrl {
> +       compatible = "ralink,rt2880-clock";
> +       #clock-cells = <1>;
> +       ralink,sysctl = <&sysc>;
> +
> +       clock-indices =
> +                       <12>,
> +                       <16>, <17>, <18>, <19>,
> +                       <20>,
> +                       <26>;
> +       clock-output-names =
> +                       "uart0",
> +                       "i2c", "i2s", "spi", "uart1",
> +                       "uart2",
> +                       "pcie0";
> +       clocks =
> +                       <&pll MT7620_CLK_PERIPH>,
> +                       <&pll MT7620_CLK_PERIPH>, <&pll MT7620_CLK_PCMI2S>, <&pll MT7620_CLK_SYS>, <&pll MT7620_CLK_PERIPH>,
> +                       <&pll MT7620_CLK_PERIPH>,
> +                       <&dummy_ck>;
> +       };
> +};
> +
> +/* consumer which refers "uart0" clock */
> +uart0: uartlite@c00 {
> +       compatible = "ns16550a";
> +       reg = <0xc00 0x100>;
> +
> +       clocks = <&clkctrl 12>;

So 12 matches in indices and then that is really "uart0" clk?

> +       clock-names = "uart0";
> +

  reply	other threads:[~2019-04-25 19:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  0:01 [RFC v2 0/5] MIPS: ralink: peripheral clock gating driver NOGUCHI Hiroshi
2019-04-05  0:01 ` [RFC v2 1/5] clk: mips: ralink: add Ralink MIPS gating clock driver NOGUCHI Hiroshi
2019-04-25 19:27   ` Stephen Boyd
2019-05-01 10:58     ` NOGUCHI Hiroshi
2019-04-05  0:01 ` [RFC v2 2/5] dt-bindings: clk: add document for ralink " NOGUCHI Hiroshi
2019-04-25 19:29   ` Stephen Boyd [this message]
2019-05-01 11:33     ` NOGUCHI Hiroshi
2019-05-02 21:42       ` Stephen Boyd
2019-04-05  0:01 ` [RFC v2 3/5] mips: ralink: mt7620/76x8 use common clk framework NOGUCHI Hiroshi
2019-04-25 19:18   ` Stephen Boyd
2019-04-05  0:01 ` [RFC v2 4/5] mips: ralink: mt76x8: add nodes for clocks NOGUCHI Hiroshi
2019-04-05  0:01 ` [RFC v2 5/5] mips: ralink: mt7620: " NOGUCHI Hiroshi

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=155622059236.15276.15417177789148260137@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=drvlabo@gmail.com \
    --cc=john@phrozen.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@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).