From: John Keeping <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
To: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Michael Turquette
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] clk: rockchip: add I2S internal clock IDs for rk3288
Date: Wed, 7 Sep 2016 19:18:23 +0100 [thread overview]
Message-ID: <20160907191823.7f955ae2.john@metanate.com> (raw)
In-Reply-To: <2003903.QOgKKA6m1b@phil>
On Wed, 07 Sep 2016 19:58:31 +0200, Heiko Stuebner wrote:
> Am Mittwoch, 7. September 2016, 17:53:29 CEST schrieb John Keeping:
> > To minimize jitter on the I2S clocks, it is important that the
> > denominator in the fractional divider is much greater than the
> > numerator. Add identifiers for these internal clocks so that the
> > specific clock topology and rates can be specified in the device tree.
>
> The TRM states that the denominator must be bigger than 20. Is this the one
> you found or did you find further constraints?
Is it not that the denominator must be bigger than 20 times the
numerator? That's what we found, although it seems that the greater the
divisor the better, so our aim is dividing down from 594MHz from GPLL to
the target rate in i2s_frac.
> Did you try teaching the fractional divider to handle these constraints before
> going this way?
No, I hadn't looked at doing that. I'm not sure how that would work,
we'd need to add support for fractional divider changing the parent rate
wouldn't we?
> Exporting the internal clocks really would be sort of plan d or e, after
> handling this in the clock framework failed. Especially as i2s rates are
> probably dependant on the media being handled (frequencies and such), so
> setting fractional rates statically in the dts won't help you much in the
> general case, as any new playback could trigger a clk_set_rate call anyway?
We're not setting the fractional rate specifically, instead we're
setting the i2s_pre rate and parent explicitly and banning the i2s_src
mux setting to i2s_pre, which means that clk_set_rate on sclk_i2s0 will
always change i2s_frac but leave i2s_pre alone.
> > Signed-off-by: John Keeping <john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
> > ---
> > include/dt-bindings/clock/rk3288-cru.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/include/dt-bindings/clock/rk3288-cru.h
> > b/include/dt-bindings/clock/rk3288-cru.h index 9a586e2d9c91..9526653383d9
> > 100644
> > --- a/include/dt-bindings/clock/rk3288-cru.h
> > +++ b/include/dt-bindings/clock/rk3288-cru.h
> > @@ -88,6 +88,9 @@
> > #define SCLK_PVTM_GPU 124
> > #define SCLK_CRYPTO 125
> > #define SCLK_MIPIDSI_24M 126
> > +#define SCLK_I2S_PRE 127
> > +#define SCLK_I2S_SRC 128
> > +#define SCLK_I2S_FRAC 129
> >
> > #define SCLK_MAC 151
> > #define SCLK_MACREF_OUT 152
>
>
--
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:[~2016-09-07 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 16:53 [PATCH 1/2] clk: rockchip: add I2S internal clock IDs for rk3288 John Keeping
2016-09-07 16:53 ` [PATCH 2/2] clk: rockchip: use identifiers for rk3288 I2S clocks John Keeping
[not found] ` <20160907165330.14607-1-john-HooS5bfzL4hWk0Htik3J/w@public.gmane.org>
2016-09-07 17:58 ` [PATCH 1/2] clk: rockchip: add I2S internal clock IDs for rk3288 Heiko Stuebner
2016-09-07 18:18 ` John Keeping [this message]
2016-09-25 21:50 ` Heiko Stuebner
2016-09-26 17:04 ` John Keeping
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=20160907191823.7f955ae2.john@metanate.com \
--to=john-hoos5bfzl4hwk0htik3j/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@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).