From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] clk: sunxi: PLL2 support for sun4i, sun5i and sun7i
Date: Thu, 7 Aug 2014 13:23:37 +0200 [thread overview]
Message-ID: <20140807112337.GA15297@lukather> (raw)
In-Reply-To: <53DFEBD0.4050704@elopez.com.ar>
On Mon, Aug 04, 2014 at 05:23:44PM -0300, Emilio L?pez wrote:
> El 04/08/14 a las 17:02, Maxime Ripard escibi?:
> >On Sun, Aug 03, 2014 at 07:02:41PM -0300, Emilio L?pez wrote:
> >>Hi,
> >>
> >>El 03/08/14 a las 09:44, Maxime Ripard escibi?:
> >>>On Thu, Jul 31, 2014 at 06:28:07PM -0300, Emilio L?pez wrote:
> >>>>This patch adds support for PLL2 and derivates on sun4i, sun5i and
> >>>>sun7i SoCs. As this PLL is only used for audio and requires good
> >>>>accuracy, we only support two known good rates.
> >>>>
> >>>>Signed-off-by: Emilio L?pez <emilio@elopez.com.ar>
> >>>>---
> >>>>
> >>(...)
> >>>>+ /* PLL2x8, double of PLL2 without the post divisor */
> >>>>+ of_property_read_string_index(np, "clock-output-names", 3, &clk_name);
> >>>>+ clks[3] = clk_register_fixed_factor(NULL, clk_name, parent,
> >>>>+ CLK_SET_RATE_PARENT, 2 * 4, 1);
> >>>
> >>>Why have you declared them here, instead of using fixed factors in the
> >>>DT directly, like we have done in the past?
> >>
> >>I'd prefer to see one clock with four outputs represented as one
> >>clock with four outputs rather than one clock with one output and
> >>other three weirdly named nodes floating around.
> >
> >Except that you have no control over these 3 other outputs, that
> >directly derive from the only one you can control.
>
> You do have one degree of control, see below.
>
> >Plus, their name wouldn't be weirded than the one you gave in
> >clock-output-names ;)
>
> Allwinner chose those names on the user manual, not me :)
>
> >>I can only see four uses of fixed-factor-clock in our DTSI, three of
> >>which are "pass through" clocks for ahb and ar100 on sun6/8i, and a
> >>fourth one to implement the 32k that results from reducing the 24M
> >>osc on sun7i.
> >
> >And PLLx2, PLL2x4, PLL2x8 are really just pass-through clocks
> >too. Once PLL2 is controlled, those will just be enabled.
>
> Yes and no.
>
> >>As a second reason, implementing it as fixed factors would be
> >>slightly incorrect, as it's only "x8" when you use the limited set
> >>of factors that Allwinner and us are using for audio.
> >
> >Hu? What do you mean by that?
>
> PLL2 (aka PLL2x1) is 24 * N / pre / post
> PLL2x8 is 24 * 2 * N / pre
>
> So PLL2 * 8 == PLL2x8 only if post == 4, which holds true on our
> software implementation as well as AW's, but may not always hold
> true hardware wise.
Ah, right. I was looking at the wrong datasheet for this, my bad.
Then, at least document the bindings properly :)
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/20140807/f4332e60/attachment.sig>
next prev parent reply other threads:[~2014-08-07 11:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 21:28 [PATCH 0/9] Audio clocks for sun[457]i, SoC revision detection Emilio López
2014-07-31 21:28 ` [PATCH 1/9] ARM: sunxi: introduce SoC identification support Emilio López
2014-08-03 12:40 ` Maxime Ripard
2014-08-03 21:45 ` Emilio López
2014-08-04 8:08 ` Lee Jones
2014-08-04 19:48 ` Maxime Ripard
2014-07-31 21:28 ` [PATCH 2/9] ARM: sunxi: quirk support Emilio López
2014-08-03 12:42 ` Maxime Ripard
2014-08-03 21:37 ` Emilio López
2014-08-04 19:32 ` Maxime Ripard
2014-07-31 21:28 ` [PATCH 3/9] ARM: sunxi: make sun6i SMP ops static Emilio López
2014-08-03 12:41 ` Maxime Ripard
2014-07-31 21:28 ` [PATCH 4/9] clk: sunxi: PLL2 support for sun4i, sun5i and sun7i Emilio López
2014-08-03 12:44 ` Maxime Ripard
2014-08-03 15:58 ` Chen-Yu Tsai
2014-08-03 18:48 ` Maxime Ripard
2014-08-03 22:02 ` Emilio López
2014-08-04 20:02 ` Maxime Ripard
2014-08-04 20:23 ` Emilio López
2014-08-07 11:23 ` Maxime Ripard [this message]
2014-08-06 13:51 ` jonsmirl at gmail.com
2014-08-06 15:20 ` jonsmirl at gmail.com
2014-08-08 0:03 ` jonsmirl at gmail.com
2014-07-31 21:28 ` [PATCH 5/9] clk: sunxi: codec clock support Emilio López
2014-07-31 21:28 ` [PATCH 6/9] clk: sunxi: mod1 " Emilio López
2014-08-03 12:47 ` Maxime Ripard
2014-08-03 22:11 ` Emilio López
2014-08-04 19:52 ` Maxime Ripard
2014-07-31 21:28 ` [PATCH 7/9] ARM: sunxi: dt: Add PLL2 support Emilio López
2014-07-31 21:46 ` jonsmirl at gmail.com
2014-08-03 12:50 ` Maxime Ripard
2014-08-03 15:55 ` Chen-Yu Tsai
2014-08-03 22:15 ` Emilio López
2014-08-04 19:53 ` Maxime Ripard
2014-07-31 21:28 ` [PATCH 8/9] ARM: sunxi: dt: Add codec clock support Emilio López
2014-07-31 21:28 ` [PATCH 9/9] ARM: sun7i: dt: Add mod1 clock nodes Emilio López
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=20140807112337.GA15297@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).