From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: sunxi: Extend the simple gates and handle the Allwinner H3
Date: Tue, 8 Dec 2015 08:53:54 +0100 [thread overview]
Message-ID: <20151208075354.GJ27957@lukather> (raw)
In-Reply-To: <20151208074226.17c75247f9eed69c9cac1d2d@free.fr>
Hi Jean-Francois,
On Tue, Dec 08, 2015 at 07:42:26AM +0100, Jean-Francois Moine wrote:
> On Mon, 7 Dec 2015 08:31:02 -0600
> Rob Herring <robh@kernel.org> wrote:
>
> > On Sun, Dec 06, 2015 at 10:04:12AM +0100, Jean-Francois Moine wrote:
> > > The H3 has a clock gate definition similar to the other Allwinner SoCs,
> > > but with a different parent clock for each single gate.
> > >
> > > Adding the names of the parent clocks in both the source and output clocks
> > > permits the use of the simple-gates driver to define the bus gates
> > > of all known Allwinner SoCs.
> > >
> > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
> > > ---
> > > This patch replaces a part of Jens Kuske's patch
> > > [PATCH v5 1/4] clk: sunxi: Add H3 clocks support
> > > ---
> > > Documentation/devicetree/bindings/clock/sunxi.txt | 25 +++++++++++++++++++++++
> > > drivers/clk/sunxi/clk-simple-gates.c | 14 ++++++++++++-
> > > 2 files changed, 38 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > index 8a47b77..5736e6d 100644
> > > --- a/Documentation/devicetree/bindings/clock/sunxi.txt
> > > +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > @@ -70,6 +70,7 @@ Required properties:
> > > "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
> > > "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
> > > "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
> > > + "allwinner,sunxi-gates-clk" - simple gates
> > >
> > > Required properties for all clocks:
> > > - reg : shall be the control register address for the clock.
> > > @@ -93,6 +94,12 @@ The "allwinner,sun9i-a80-mmc-config-clk" clock also requires:
> > > - #reset-cells : shall be set to 1
> > > - resets : shall be the reset control phandle for the mmc block.
> > >
> > > +The "allwinner,sunxi-gates-clk" clock also requires:
> > > +- clock-names : corresponding names of the parent clocks
> > > +when the output clocks have different parents.
> > > +These names must be 4 characters long and must appear as a prefix in
> > > +the names of the output clocks. See example.
> > > +
> >
> > I don't think you should be encoding relationships of clocks using the
> > name strings. We describe relationships in DT via parent/child or
> > phandles.
>
> As you know, in the H3, each of the 49 output clock has one of the 4
> main clocks as its source.
> There are 3 options for defining the source of each clock:
> 1- all definitions are in the DT,
> 2- some definitions are in the DT, some other ones are hard-coded,
> 3- all definitions are hard-coded.
Look, we all agreed on a solution that raised all objections, but
yours.
I'm going to take Jens patch.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151208/6bfa0551/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
Cc: "Rob Herring" <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Vishnu Patekar"
<vishnupatekar0510-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Emilio López" <emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>,
"Michael Turquette"
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
"Reinder de Haan"
<patchesrdh-I1/eAgTnXDYAvxtiuMwx3w@public.gmane.org>,
"Stephen Boyd" <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
"Hans de Goede"
<hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Chen-Yu Tsai" <wens-jdAy2FN1RRM@public.gmane.org>,
"Jens Kuske" <jenskuske-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Linus Walleij"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] clk: sunxi: Extend the simple gates and handle the Allwinner H3
Date: Tue, 8 Dec 2015 08:53:54 +0100 [thread overview]
Message-ID: <20151208075354.GJ27957@lukather> (raw)
In-Reply-To: <20151208074226.17c75247f9eed69c9cac1d2d-GANU6spQydw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2980 bytes --]
Hi Jean-Francois,
On Tue, Dec 08, 2015 at 07:42:26AM +0100, Jean-Francois Moine wrote:
> On Mon, 7 Dec 2015 08:31:02 -0600
> Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
> > On Sun, Dec 06, 2015 at 10:04:12AM +0100, Jean-Francois Moine wrote:
> > > The H3 has a clock gate definition similar to the other Allwinner SoCs,
> > > but with a different parent clock for each single gate.
> > >
> > > Adding the names of the parent clocks in both the source and output clocks
> > > permits the use of the simple-gates driver to define the bus gates
> > > of all known Allwinner SoCs.
> > >
> > > Signed-off-by: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
> > > ---
> > > This patch replaces a part of Jens Kuske's patch
> > > [PATCH v5 1/4] clk: sunxi: Add H3 clocks support
> > > ---
> > > Documentation/devicetree/bindings/clock/sunxi.txt | 25 +++++++++++++++++++++++
> > > drivers/clk/sunxi/clk-simple-gates.c | 14 ++++++++++++-
> > > 2 files changed, 38 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > index 8a47b77..5736e6d 100644
> > > --- a/Documentation/devicetree/bindings/clock/sunxi.txt
> > > +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > @@ -70,6 +70,7 @@ Required properties:
> > > "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
> > > "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
> > > "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
> > > + "allwinner,sunxi-gates-clk" - simple gates
> > >
> > > Required properties for all clocks:
> > > - reg : shall be the control register address for the clock.
> > > @@ -93,6 +94,12 @@ The "allwinner,sun9i-a80-mmc-config-clk" clock also requires:
> > > - #reset-cells : shall be set to 1
> > > - resets : shall be the reset control phandle for the mmc block.
> > >
> > > +The "allwinner,sunxi-gates-clk" clock also requires:
> > > +- clock-names : corresponding names of the parent clocks
> > > +when the output clocks have different parents.
> > > +These names must be 4 characters long and must appear as a prefix in
> > > +the names of the output clocks. See example.
> > > +
> >
> > I don't think you should be encoding relationships of clocks using the
> > name strings. We describe relationships in DT via parent/child or
> > phandles.
>
> As you know, in the H3, each of the 49 output clock has one of the 4
> main clocks as its source.
> There are 3 options for defining the source of each clock:
> 1- all definitions are in the DT,
> 2- some definitions are in the DT, some other ones are hard-coded,
> 3- all definitions are hard-coded.
Look, we all agreed on a solution that raised all objections, but
yours.
I'm going to take Jens patch.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: "Rob Herring" <robh@kernel.org>,
devicetree@vger.kernel.org,
"Vishnu Patekar" <vishnupatekar0510@gmail.com>,
"Emilio López" <emilio@elopez.com.ar>,
"Michael Turquette" <mturquette@baylibre.com>,
"Reinder de Haan" <patchesrdh@mveas.com>,
"Stephen Boyd" <sboyd@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
"Hans de Goede" <hdegoede@redhat.com>,
"Chen-Yu Tsai" <wens@csie.org>,
"Jens Kuske" <jenskuske@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: sunxi: Extend the simple gates and handle the Allwinner H3
Date: Tue, 8 Dec 2015 08:53:54 +0100 [thread overview]
Message-ID: <20151208075354.GJ27957@lukather> (raw)
In-Reply-To: <20151208074226.17c75247f9eed69c9cac1d2d@free.fr>
[-- Attachment #1: Type: text/plain, Size: 2999 bytes --]
Hi Jean-Francois,
On Tue, Dec 08, 2015 at 07:42:26AM +0100, Jean-Francois Moine wrote:
> On Mon, 7 Dec 2015 08:31:02 -0600
> Rob Herring <robh@kernel.org> wrote:
>
> > On Sun, Dec 06, 2015 at 10:04:12AM +0100, Jean-Francois Moine wrote:
> > > The H3 has a clock gate definition similar to the other Allwinner SoCs,
> > > but with a different parent clock for each single gate.
> > >
> > > Adding the names of the parent clocks in both the source and output clocks
> > > permits the use of the simple-gates driver to define the bus gates
> > > of all known Allwinner SoCs.
> > >
> > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
> > > ---
> > > This patch replaces a part of Jens Kuske's patch
> > > [PATCH v5 1/4] clk: sunxi: Add H3 clocks support
> > > ---
> > > Documentation/devicetree/bindings/clock/sunxi.txt | 25 +++++++++++++++++++++++
> > > drivers/clk/sunxi/clk-simple-gates.c | 14 ++++++++++++-
> > > 2 files changed, 38 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > index 8a47b77..5736e6d 100644
> > > --- a/Documentation/devicetree/bindings/clock/sunxi.txt
> > > +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
> > > @@ -70,6 +70,7 @@ Required properties:
> > > "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
> > > "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
> > > "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
> > > + "allwinner,sunxi-gates-clk" - simple gates
> > >
> > > Required properties for all clocks:
> > > - reg : shall be the control register address for the clock.
> > > @@ -93,6 +94,12 @@ The "allwinner,sun9i-a80-mmc-config-clk" clock also requires:
> > > - #reset-cells : shall be set to 1
> > > - resets : shall be the reset control phandle for the mmc block.
> > >
> > > +The "allwinner,sunxi-gates-clk" clock also requires:
> > > +- clock-names : corresponding names of the parent clocks
> > > +when the output clocks have different parents.
> > > +These names must be 4 characters long and must appear as a prefix in
> > > +the names of the output clocks. See example.
> > > +
> >
> > I don't think you should be encoding relationships of clocks using the
> > name strings. We describe relationships in DT via parent/child or
> > phandles.
>
> As you know, in the H3, each of the 49 output clock has one of the 4
> main clocks as its source.
> There are 3 options for defining the source of each clock:
> 1- all definitions are in the DT,
> 2- some definitions are in the DT, some other ones are hard-coded,
> 3- all definitions are hard-coded.
Look, we all agreed on a solution that raised all objections, but
yours.
I'm going to take Jens patch.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-12-08 7:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-06 9:04 [PATCH] clk: sunxi: Extend the simple gates and handle the Allwinner H3 Jean-Francois Moine
2015-12-06 9:04 ` Jean-Francois Moine
2015-12-06 9:04 ` Jean-Francois Moine
2015-12-07 14:31 ` Rob Herring
2015-12-07 14:31 ` Rob Herring
2015-12-07 14:31 ` Rob Herring
2015-12-08 6:42 ` Jean-Francois Moine
2015-12-08 6:42 ` Jean-Francois Moine
2015-12-08 6:42 ` Jean-Francois Moine
2015-12-08 7:53 ` Maxime Ripard [this message]
2015-12-08 7:53 ` Maxime Ripard
2015-12-08 7:53 ` Maxime Ripard
2015-12-08 8:09 ` Jean-Francois Moine
2015-12-08 8:09 ` Jean-Francois Moine
2015-12-08 8:09 ` Jean-Francois Moine
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=20151208075354.GJ27957@lukather \
--to=maxime.ripard@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.