From: Michael Walle <michael@walle.cc>
To: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: lan966x: fix sys_clk frequency
Date: Thu, 28 Apr 2022 10:49:33 +0200 [thread overview]
Message-ID: <3e860b122533f488c053abe0f3ff03eb@walle.cc> (raw)
In-Reply-To: <20220326194028.2945985-1-michael@walle.cc>
Am 2022-03-26 20:40, schrieb Michael Walle:
> The sys_clk frequency is 165.625MHz. The register reference of the
> Generic Clock controller lists the CPU clock as 600MHz, the DDR clock
> as
> 300MHz and the SYS clock as 162.5MHz. This is wrong. It was first
> noticed during the fan driver development and it was measured and
> verified via the CLK_MON output of the SoC which can be configured to
> output sys_clk/64.
>
> The core PLL settings (which drives the SYS clock) seems to be as
> follows:
> DIVF = 52
> DIVQ = 3
> DIVR = 1
>
> With a refernce clock of 25MHz, this means we have a post divider clock
> Fpfd = Fref / (DIVR + 1) = 25MHz / (1 + 1) = 12.5MHz
>
> The resulting VCO frequency is then
> Fvco = Fpfd * (DIVF + 1) * 2 = 12.5MHz * (52 + 1) * 2 = 1325MHz
>
> And the output frequency is
> Fout = Fvco / 2^DIVQ = 1325MHz / 2^3 = 165.625Mhz
>
> This all adds up to the constrains of the PLL:
> 10MHz <= Fpfd <= 200MHz
> 20MHz <= Fout <= 1000MHz
> 1000MHz <= Fvco <= 2000MHz
>
> Fixes: 290deaa10c50 ("ARM: dts: add DT for lan966 SoC and 2-port board
> pcb8291")
> Signed-off-by: Michael Walle <michael@walle.cc>
Ping :)
Btw. this is also true for the new B0 silicon. I just verified it
with the CLK_MON output.
-michael
next prev parent reply other threads:[~2022-04-28 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-26 19:40 [PATCH] ARM: dts: lan966x: fix sys_clk frequency Michael Walle
2022-04-28 8:49 ` Michael Walle [this message]
2022-06-22 11:51 ` Michael Walle
2022-07-15 18:41 ` Michael Walle
2022-07-18 6:36 ` Claudiu.Beznea
2022-06-29 11:40 ` Kavyasree.Kotagiri
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=3e860b122533f488c053abe0f3ff03eb@walle.cc \
--to=michael@walle.cc \
--cc=devicetree@vger.kernel.org \
--cc=kavyasree.kotagiri@microchip.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.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).