From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: sun6i: Enable clock support in the DTSI
Date: Wed, 31 Jul 2013 09:37:24 +0200 [thread overview]
Message-ID: <20130731073724.GA24439@lukather> (raw)
In-Reply-To: <51F86A2E.10505@elopez.com.ar>
Hi Emilio,
On Tue, Jul 30, 2013 at 10:36:46PM -0300, Emilio L?pez wrote:
> Hi Maxime,
>
> Overall this looks good to me, but I have some small comments:
>
> El 30/07/13 11:44, Maxime Ripard escribi?:
> > Now that the clock driver has support for the A31 clocks, we can add
> > them to the DTSI and start using them in the relevant hardware blocks.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> > arch/arm/boot/dts/sun6i-a31.dtsi | 137 ++++++++++++++++++++++++++++++++++++---
> > 1 file changed, 127 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
> > index 0d13dc6..c6a3a91 100644
> > --- a/arch/arm/boot/dts/sun6i-a31.dtsi
> > +++ b/arch/arm/boot/dts/sun6i-a31.dtsi
> > @@ -51,13 +51,130 @@
> >
> > clocks {
> > #address-cells = <1>;
> > - #size-cells = <0>;
> > + #size-cells = <1>;
> > + ranges;
> >
> > - osc: oscillator {
> > + osc24M: hosc {
>
> Please use osc24M and osc32k instead of hosc and losc, respectively.
The problem is a bit more complex than that.
On the A31, the losc clock is actually a mux between an external
oscillator running at 32kHz, and the internal oscillator running at
667MHz, that would be scaled down.
Support for this mux is not quite there yet, since I've not seen any
documentation for it, but this would allow to just rearrange losc
parents and compatible when we will had such support.
Hence why I chose these names.
> > #clock-cells = <0>;
> > compatible = "fixed-clock";
> > clock-frequency = <24000000>;
>
> Is osc24M not gatable on A31?
Nope.
> > };
> > +
> > + osc32k: losc {
> > + #clock-cells = <0>;
> > + compatible = "fixed-clock";
> > + clock-frequency = <32768>;
> > + };
> > +
> > + pll1: pll1 at 01c20000 {
> > + #clock-cells = <0>;
> > + compatible = "allwinner,sun6i-pll1-clk";
> > + reg = <0x01c20000 0x4>;
> > + clocks = <&osc24M>;
> > + };
> > +
> > + /*
> > + * This is a dummy clock, to be used as placeholder on
> > + * other mux clocks when a specific parent clock is not
> > + * yet implemented. It should be dropped when the driver
> > + * is complete.
> > + */
> > + pll6: pll6 {
> > + #clock-cells = <0>;
> > + compatible = "fixed-clock";
> > + clock-frequency = <0>;
> > + };
> > +
> > + cpu: cpu at 01c20050 {
> > + #clock-cells = <0>;
> > + compatible = "allwinner,sun4i-cpu-clk";
> > + reg = <0x01c20050 0x4>;
> > + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
>
> Listing pll1 twice doesn't sound correct, but vendor code seems to
> indicate so. A comment to clarify it's not a typo would be good I think.
Yes, I suspect an error in the datasheet, but until proven otherwise,
it's that way.
I'll add a comment.
> > + };
> > +
> > + axi: axi at 01c20050 {
> > + #clock-cells = <0>;
> > + compatible = "allwinner,sun4i-axi-clk";
> > + reg = <0x01c20050 0x4>;
> > + clocks = <&cpu>;
> > + };
> > +
> > + ahb1_mux: ahb1_mux at 01c20054 {
> > + #clock-cells = <0>;
> > + compatible = "allwinner,sun6i-ahb1-mux-clk";
> > + reg = <0x01c20054 0x4>;
> > + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
> > + };
> > +
> > + ahb1: ahb1 at 01c20054 {
> > + #clock-cells = <0>;
> > + compatible = "allwinner,sun4i-ahb-clk";
> > + reg = <0x01c20054 0x4>;
> > + clocks = <&ahb1_mux>;
> > + };
>
> Depending on when this lands, I believe these two above could be merged
> into one with the refactoring introduced on my patchset.
Since your patchset is still in RFC and we had no comments from Mike so
far, while this one looks pretty similar to the one we had before, I
guess the safest thing to do would be to rebase your patches on top of
this ones.
But it's right those clocks (AHB1 and APB2) will benefit from your work
as well :)
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: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130731/458dcc5f/attachment-0001.sig>
next prev parent reply other threads:[~2013-07-31 7:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 14:44 [PATCH 0/4] Add support for the Allwinner A31 clocks Maxime Ripard
2013-07-30 14:44 ` [PATCH 1/4] clk: sunxi: Rename the structure to prepare the addition of sun6i Maxime Ripard
2013-07-31 0:14 ` Emilio López
2013-07-31 9:20 ` Maxime Ripard
2013-07-30 14:44 ` [PATCH 2/4] clk: sunxi: Allow to specify the divider width from the dividers data Maxime Ripard
2013-07-31 0:27 ` Emilio López
2013-07-30 14:44 ` [PATCH 3/4] clk: sunxi: Add A31 clocks support Maxime Ripard
2013-07-31 1:01 ` Emilio López
2013-07-31 10:14 ` Maxime Ripard
2013-08-12 12:53 ` Mark Rutland
2013-08-12 13:01 ` Emilio López
2013-08-12 13:54 ` Mark Rutland
2013-07-30 14:44 ` [PATCH 4/4] ARM: sun6i: Enable clock support in the DTSI Maxime Ripard
2013-07-31 1:36 ` Emilio López
2013-07-31 7:37 ` Maxime Ripard [this message]
[not found] ` <2013073116110750016327@gmail.com>
2013-07-31 11:37 ` Emilio López
2013-07-31 11:49 ` maxime.ripard
2013-07-31 12:10 ` kevin.z.m
2013-07-31 15:49 ` maxime.ripard
[not found] ` <2013080108343040654547@gmail.com>
2013-08-01 9:53 ` maxime.ripard
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=20130731073724.GA24439@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 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).