From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 09/15] clk: sunxi-ng: r40: Force LOSC parent to RTC LOSC output Date: Wed, 28 Nov 2018 11:25:50 +0100 Message-ID: <20181128102550.qsipssx67y3uexsr@flea> References: <20181128093013.24442-1-wens@csie.org> <20181128093013.24442-11-wens@csie.org> Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4n2727vtq662hds4" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20181128093013.24442-11-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Alexandre Belloni , Alessandro Zummo , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org --4n2727vtq662hds4 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline On Wed, Nov 28, 2018 at 05:30:07PM +0800, Chen-Yu Tsai wrote: > On the R40, in addition to a mux between the RTC's own RC oscillator and > an external 32768 Hz crystal, which are muxed inside the RTC module, the > CCU also has its own RC oscillator, which runs at around 2 MHz, and can > be muxed with the LOSC output from the RTC. This muxed output is called > "SYS 32K" in the module clock diagram, but otherwise referred to as the > LOSC throughout the CCU documentation. > > The RC oscillator is not very accurate, even though it has an undocumented > calibration function. We really want a precise clock at 32768 Hz, > instead of something at around 32 KHz. This patch forces the SYS 32K > clock to use the RTC output as its parent, and doesn't bother > registering the internal oscillator nor a clock mux. > > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --4n2727vtq662hds4--