From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs Date: Tue, 29 Sep 2015 14:09:43 +0200 Message-ID: <20150929120943.GP7104@lukather> References: <1443365828-8956-1-git-send-email-hdegoede@redhat.com> <560813CF.4000807@schinagl.nl> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="psiTe9LjpVyD9953" Return-path: Content-Disposition: inline In-Reply-To: <560813CF.4000807-dxLnbx3+1qmEVqv0pETR8A@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Olliver Schinagl Cc: hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Wolfram Sang , Thomas Petazzoni , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: linux-i2c@vger.kernel.org --psiTe9LjpVyD9953 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline On Sun, Sep 27, 2015 at 06:05:35PM +0200, Olliver Schinagl wrote: > Hey Hans, > > On 27-09-15 16:57, Hans de Goede wrote: > >According to the datasheets to n factor for dividing the tclk is > >2 to the power n on Allwinner SoCs, not 2 to the power n + 1 as it is > >on other mv64xxx implementations. > Ah! > > > >I've contacted Allwinner about this and they have confirmed that the > >datasheet is correct. > > > >This commit fixes the clk-divider calculations for Allwinner SoCs > >accordingly. > So this explains why all my i2c frequenties are double of what I setup. > Thanks for taking the time of figuring it out! I'll give it a test hopefully > soon. It would have been great to let us know... Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --psiTe9LjpVyD9953--