From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Cc: takasi-y-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org,
SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org,
Shinya Kuribayashi
<shinya.kuribayashi.px-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Paul Mundt <lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/6] ARM: shmobile: emev2: Define SMU clock DT bindings
Date: Tue, 01 Oct 2013 13:36:33 +0200 [thread overview]
Message-ID: <21574726.tiJa6Opb1k@avalon> (raw)
In-Reply-To: <20130924045215.GE3619-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Hi Yoshii-san and Simon,
On Tuesday 24 September 2013 13:52:15 Simon Horman wrote:
> [ Cc Laurent ]
>
> On Tue, Sep 24, 2013 at 01:13:31PM +0900, takasi-y-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org wrote:
> > Device tree clock binding document for EMMA Mobile EV2 SMU.
> > Following nodes are defined to describe clock tree.
> > - renesas,emev2-smu
> > - renesas,emev2-smu-clkdiv
> > - renesas,emev2-smu-gclk
>
> I realise this has been entirely consistent in the past and
> even as recently as Linus' pre v3.12-rc2 master branch.
> However, after some recent discussion we are now trying to make our
> compatibility strings consistently of the form renesas,<unit>-<soc>.
>
> With this in mind I believe the strings should be:
>
> - renesas,smu-emev2
> - renesas,smu-clkdiv-emev2
> - renesas,smu-gclk-emev2
>
> To be honest I am not quite sure about the "-clkdiv" and "-gclk"
> bits and I would appreciate some review from others.
I don't have access to the EMEV2 datasheet so my ability to comment on this is
somehow limited. However, given that the clock hardware is very SoC-specific,
it might make sense to keep the names proposed by Yoshii-san. This would be
consistent with the other clock bindings.
> I have CCed Laurent as he may have some advice to offer here.
>
> > These bindings are designed manually based on
> >
> > 19UH0037EJ1000_SMU : System Management Unit User's Manual
> >
> > Signed-off-by: Takashi Yoshii <takashi.yoshii.zj-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> > ---
> >
> > .../devicetree/bindings/clock/emev2-clock.txt | 99 +++++++++++++++++
> > 1 file changed, 99 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/emev2-clock.txt
> >
> > diff --git a/Documentation/devicetree/bindings/clock/emev2-clock.txt
> > b/Documentation/devicetree/bindings/clock/emev2-clock.txt new file mode
> > 100644
> > index 0000000..f8649eb
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/emev2-clock.txt
> > @@ -0,0 +1,99 @@
> > +Device tree Clock bindings for Renesas EMMA Mobile EV2
> > +
> > +This binding uses the common clock binding.
> > +
> > +* SMU
> > +System Management Unit described in user's manual R19UH0037EJ1000_SMU.
> > +This is not a clock provider, but clocks under SMU depend on it.
> > +
> > +Required properties:
> > +- compatible: Should be "renesas,emev2-smu"
> > +- reg: Address and Size of SMU registers
> > +
> > +* SMU_CLKDIV
> > +Function block with an input mux and a divider, which corresponds to
> > +"Serial clock generator" in fig."Clock System Overview" of the manual,
> > +and "xxx frequency division setting register" (XXXCLKDIV) registers.
> > +This makes internal (neither input nor output) clock that is provided
> > +to input of xxxGCLK block.
> > +
> > +Required properties:
> > +- compatible: Should be "renesas,emev2-smu-clkdiv"
> > +- reg: Byte offset from SMU base and Bit position in the register
> > +- clocks: Parent clocks. Input clocks as described in clock-bindings.txt
> > +- #clock-cells: Should be <0>
> > +
> > +* SMU_GCLK
> > +Clock gating node shown as "Clock stop processing block" in the
> > +fig."Clock System Overview" of the manual.
> > +Registers are "xxx clock gate control register" (XXXGCLKCTRL).
> > +
> > +Required properties:
> > +- compatible: Should be "renesas,emev2-smu-gclk"
> > +- reg: Byte offset from SMU base and Bit position in the register
> > +- clocks: Input clock as described in clock-bindings.txt
> > +- #clock-cells: Should be <0>
> > +
> > +Example of provider:
> > +
> > +usia_u0_sclkdiv: usia_u0_sclkdiv {
> > + compatible = "renesas,emev2-smu-clkdiv";
> > + reg = <0x610 0>;
Is the registers space really 0 bytes long ?
> > + clocks = <&pll3_fo>, <&pll4_fo>, <&pll1_fo>, <&osc1_fo>;
> > + #clock-cells = <0>;
> > +};
> > +
> > +usia_u0_sclk: usia_u0_sclk {
> > + compatible = "renesas,emev2-smu-gclk";
> > + reg = <0x4a0 1>;
> > + clocks = <&usia_u0_sclkdiv>;
> > + #clock-cells = <0>;
> > +};
> > +
> > +Example of consumer:
> > +
> > +uart@e1020000 {
> > + compatible = "renesas,em-uart";
> > + reg = <0xe1020000 0x38>;
> > + interrupts = <0 8 0>;
> > + clocks = <&usia_u0_sclk>;
> > + clock-names = "sclk";
> > +};
> > +
> > +Example of clock-tree description:
> > +
> > + This describes a clock path in the clock tree
> > + c32ki -> pll3_fo -> usia_u0_sclkdiv -> usia_u0_sclk
> > +
> > +smu {
> > + compatible = "renesas,emev2-smu";
> > + reg = <0xe0110000 0x10000>;
> > + #address-cells = <2>;
> > + #size-cells = <0>;
> > +
> > + c32ki: c32ki {
> > + compatible = "fixed-clock";
> > + clock-frequency = <32768>;
> > + #clock-cells = <0>;
> > + };
> > + pll3_fo: pll3_fo {
> > + compatible = "fixed-factor-clock";
> > + clocks = <&c32ki>;
> > + clock-div = <1>;
> > + clock-mult = <7000>;
> > + #clock-cells = <0>;
> > + };
> > + usia_u0_sclkdiv: usia_u0_sclkdiv {
> > + compatible = "renesas,emev2-smu-clkdiv";
> > + reg = <0x610 0>;
> > + clocks = <&pll3_fo>;
> > + #clock-cells = <0>;
> > + };
> > + usia_u0_sclk: usia_u0_sclk {
> > + compatible = "renesas,emev2-smu-gclk";
> > + reg = <0x4a0 1>;
> > + clocks = <&usia_u0_sclkdiv>;
> > + #clock-cells = <0>;
> > + };
> > +};
> > +
There's an extra blank line at the end of the file.
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-10-01 11:36 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 4:05 [PATCH 0/6] ARM: shmobile: kzm9d-reference: migrate to common clock framework with DT Takashi Yoshii
2013-09-24 4:09 ` [PATCH 1/6] clocksource: em_sti: convert to clk_prepare/unprepare takasi-y
2013-09-24 4:42 ` Simon Horman
2013-09-26 10:18 ` Daniel Lezcano
[not found] ` <20130924130924.61d4ecedf3d4fca5952d55fc-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-09-30 15:25 ` Laurent Pinchart
[not found] ` <52440A07.4050101-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-10-03 2:30 ` Simon Horman
2013-10-01 9:05 ` Magnus Damm
2013-09-24 4:10 ` [PATCH 2/6] serial8250-em: " takasi-y
2013-09-24 4:44 ` Simon Horman
2013-09-24 13:41 ` Greg Kroah-Hartman
2013-09-30 15:25 ` Laurent Pinchart
[not found] ` <20130924134113.GA7246-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-10-03 2:30 ` Simon Horman
[not found] ` <20130924131039.3c871cad7acb2a068a988d0f-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-10-01 9:07 ` Magnus Damm
2013-09-24 4:12 ` [PATCH 3/6] sh: clkfwk: Select sh-/common- clkfwk alternatively takasi-y
2013-09-30 18:40 ` Laurent Pinchart
2013-10-04 5:25 ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-10-01 9:30 ` Magnus Damm
2013-09-24 4:13 ` [PATCH 4/6] ARM: shmobile: emev2: Define SMU clock DT bindings takasi-y
[not found] ` <20130924131331.0e9a5f830f531655b2ea0ebe-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-09-24 4:52 ` Simon Horman
2013-09-24 9:00 ` takashi.yoshii.zj
[not found] ` <20130924045215.GE3619-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-10-01 11:36 ` Laurent Pinchart [this message]
2013-10-02 1:28 ` Simon Horman
2013-10-06 17:16 ` Takashi YOSHII
[not found] ` <52410F86.4040301-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-09-24 4:15 ` [PATCH 5/6] clk: emev2: Add support for emev2 SMU clocks with DT takasi-y-nDL5PR/MsHhHfZP73Gtkiw
[not found] ` <20130924131542.f865fad4dec98e024c0d4676-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-10-01 9:15 ` Magnus Damm
2013-10-01 12:27 ` Laurent Pinchart
[not found] ` <CANqRtoRD35Ei31PK8a_TOp=2uiYPCoaJuDb6tyZtQL8s0PavNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-04 5:44 ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-09-24 4:17 ` [PATCH 6/6] ARM: shmobile: kzm9d-reference: Use common clock framework takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-09-24 4:55 ` Simon Horman
2013-10-01 9:23 ` Magnus Damm
2013-09-25 7:17 ` [PATCH 0/6] ARM: shmobile: kzm9d-reference: migrate to common clock framework with DT Kuninori Morimoto
[not found] ` <87siwtl69z.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-10-04 1:12 ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-09-24 4:56 ` Simon Horman
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=21574726.tiJa6Opb1k@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=lethal-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=shinya.kuribayashi.px-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=takasi-y-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.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).