Netdev List
 help / color / mirror / Atom feed
From: Marek Vasut <marex@nabladev.com>
To: Wei Fang <wei.fang@nxp.com>, Clark Wang <xiaoning.wang@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [net-next,PATCH v2] enetc: Increase eMDIO MDC rate to 2.5 MHz
Date: Thu, 1 Oct 2026 03:34:09 +0200	[thread overview]
Message-ID: <e7f574ab-5fcf-484a-a5bf-fc94d45b2311@nabladev.com> (raw)
In-Reply-To: <AS4PR04MB9338E76DB4A59D70F1D6AB2F888A2@AS4PR04MB9338.eurprd04.prod.outlook.com>

On 10/1/26 2:45 AM, Wei Fang wrote:

Hello Wei,

>> Hmmmm, are those clock available on MX95 ? Maybe we can do some sort of
>> fallback -- assume 166 MHz clock on LS, and obtain the clock and clock
>> rate via clock framework on MX95 ?
> 
> The MDC clock is derived from the NETC system clock. For iMX platforms, the
> system clock is controlled by system manager (M33 core), Linux cannot
> configure it.

That is probably still fine, as long as the clock are available via SCMI 
and their clock frequency can be read (not written/set), we can use them.

> Moreover, the actual situation is a bit complicated. For iMX95, the
> system clock source provided by the SoC to NETC is IMX95_CLK_ENET, which is
> 666MHz. There is a 1/2 divisor in NETCMIX, so the clock input to NETC is 333MHz.
> Therefore, to obtain the actual system clock from the clock framework, we need
> to add a fixed-factor clock to the DTS as the NETC's system clock. Some platforms
> do not have this divisor. So we do not add the system clock to the binding-doc of
> both emdio and enetc.

This is something which can still be handled by a compatible string match.

> In addition, the NETC is also used on S32 platforms, that might be another story
> altogether.
> 
> Therefore, hardcoding the clock frequency according to the NETC revision in
> the driver is a simple and quick method, just like we did in the enetc driver.
> https://elixir.bootlin.com/linux/v7.3-rc5/source/drivers/net/ethernet/freescale/enetc/enetc.c#L3770

Let me try something better, give me a day or two.

Jakub, do you want a revert of this one, fix, or follow up patch ?

  reply	other threads:[~2026-10-01  1:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 18:05 [net-next,PATCH v2] enetc: Increase eMDIO MDC rate to 2.5 MHz Marek Vasut
2026-09-25 18:43 ` netdev-bot+sashiko
2026-09-30  2:10 ` patchwork-bot+netdevbpf
2026-09-30  2:21   ` Marek Vasut
2026-09-30 20:51     ` Jakub Kicinski
2026-09-30  3:40 ` Wei Fang
2026-09-30  4:19   ` Marek Vasut
2026-09-30  6:12     ` Wei Fang
2026-09-30 13:11       ` Andrew Lunn
2026-10-01  0:04         ` Wei Fang
2026-09-30 13:27       ` Marek Vasut
2026-10-01  0:45         ` Wei Fang
2026-10-01  1:34           ` Marek Vasut [this message]
2026-10-01 10:57             ` Wei Fang
2026-10-01 13:53               ` Andrew Lunn
2026-10-01 22:43                 ` Marek Vasut
2026-10-08  3:08                   ` Wei Fang
2026-10-01 22:51             ` Jakub Kicinski
2026-10-01 23:11               ` Marek Vasut
2026-10-01 22:00         ` Marek Vasut
2026-10-08  2:34           ` Wei Fang

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=e7f574ab-5fcf-484a-a5bf-fc94d45b2311@nabladev.com \
    --to=marex@nabladev.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox