From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-arm-kernel@lists.infradead.org
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
Shenwei Wang <shenwei.wang@nxp.com>,
Shenwei Wang <shenwei.wang@nxp.com>
Subject: Re: [PATCH] arm64: dts: imx93: update default value for snps,clk-csr
Date: Thu, 11 Jul 2024 08:09:33 +0200 [thread overview]
Message-ID: <2280257.iZASKD2KPV@steina-w> (raw)
In-Reply-To: <20240710200833.153521-1-shenwei.wang@nxp.com>
Am Mittwoch, 10. Juli 2024, 22:08:33 CEST schrieb Shenwei Wang:
> For the i.MX93 SoC, the clock rate for the IP of STMMAC EQOS is 315 MHz.
Are you talking about enet_qos (IMX93_CLK_ENET_QOS_GATE)?
Downstream 6.1 kernel shows:
sys_pll_pfd2 1 1 0 625000000 0 0 50000 Y
wakeup_axi_root 4 4 0 312500000 0 0 50000 Y
enet_qos 5 5 0 312500000 0 0 50000 Y
Also RM gives a maximum of 312.5 MHz.
> According to the following mapping table from the i.MX93 reference manual,
> this clock rate corresponds to a CSR value of 6.
>
> 0100: CSR clock = 150-250 MHz; MDC clock = CSR clock/102
> 0101: CSR clock = 250-300 MHz; MDC clock = CSR clock/124
> 0110: CSR clock = 300-500 MHz; MDC clock = CSR clock/204
> 0111: CSR clock = 500-800 MHz; MDC clock = CSR clock/324
As the old value is 0 you should at least add that entry as well.
But AFAICS enet_qos is passed as clock 'mem' to this device.
So instead of hard-coding this into DT, this divider should be calculated from actual
enet_qos clock.
Best regards,
Alexander
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> arch/arm64/boot/dts/freescale/imx93.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
> index 4a3f42355cb8..a0993022c102 100644
> --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> @@ -1105,7 +1105,7 @@ eqos: ethernet@428a0000 {
> <&clk IMX93_CLK_SYS_PLL_PFD0_DIV2>;
> assigned-clock-rates = <100000000>, <250000000>;
> intf_mode = <&wakeupmix_gpr 0x28>;
> - snps,clk-csr = <0>;
> + snps,clk-csr = <6>;
> nvmem-cells = <ð_mac2>;
> nvmem-cell-names = "mac-address";
> status = "disabled";
>
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2024-07-11 6:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-10 20:08 [PATCH] arm64: dts: imx93: update default value for snps,clk-csr Shenwei Wang
2024-07-11 6:09 ` Alexander Stein [this message]
2024-07-11 13:22 ` Shenwei Wang
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=2280257.iZASKD2KPV@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shenwei.wang@nxp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.