From: Marek Vasut <marex@nabladev.com>
To: Wei Fang <wei.fang@nxp.com>, "Frank Li (OSS)" <frank.li@oss.nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Clark Wang <xiaoning.wang@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Conor Dooley <conor+dt@kernel.org>,
Eric Dumazet <edumazet@kernel.org>, Frank Li <frank.li@nxp.com>,
Jakub Kicinski <kuba@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [net-next,PATCH 2/2] enetc: Make eMDIO MDC rate configurable from DT
Date: Mon, 19 Oct 2026 18:10:18 +0200 [thread overview]
Message-ID: <fe920b05-6d89-4dc1-83d3-0664fbc2e00c@nabladev.com> (raw)
In-Reply-To: <AS4PR04MB933821150913BDCF35C4827F88982@AS4PR04MB9338.eurprd04.prod.outlook.com>
On 10/19/26 4:59 AM, Wei Fang wrote:
Hello Wei,
>>>>> +int enetc_mdio_update_mdc_div(struct mii_bus *bus) {
>>>>> + struct enetc_mdio_priv *mdio_priv = bus->priv;
>>>>> + struct device *dev = bus->parent;
>>>>> + struct clk *enet_clk;
>>>>> + u32 div, mdc_freq;
>>>>> +
>>>>> + if (device_property_read_u32(dev, "clock-frequency", &mdc_freq))
>>>>> + return 0;
>>>>> +
>>>>> + enet_clk = devm_clk_get(dev, NULL);
>>>>> + if (IS_ERR(enet_clk))
>>>>> + return dev_err_probe(dev, PTR_ERR(enet_clk),
>>>>> + "Input clock unknown, not changing MDC
>>>> frequency\n");
>>>>
>>>> binding said clock is optional. If return failure here, it will block
>>>> existing dts, which have not clock property.
>>>>
>>>
>>> For EMDIO device, the clocks property is not added to
>>> fsl,enetc-mdio.yaml, I suppose this property should be added to the
>>> dt-binding doc if the clock is really needed here.
>>
>> Isn't this what 1/2 in this series does ? (maybe I misunderstood this
>> paragraph)
>
> Sorry, my email filtered out the 1/2 patch, so I missed it.
No worries.
>>> For ENETC device, we already have a 'ref' clock in the enetc node, so
>>> devm_clk_get(dev, NULL) may get the 'ref' clock rather than the system
>>> clock of NETC.
>> Shouldn't the clock be described in the MDIO DT node ?
>
> The enetc_mdio_read_* and enetc_mdio_write_* interfaces are not only
> used by EMDIO devices, the ENETCs and NETC switches also use them.
> NETC switches and ENETCs can access external PHYs or internal PCS/Serdes
> through their own port MDIO registers, instead of through EMDIO devices.
>
> Your first patch only modified the EMDIO binding-doc, not the ENETC and
> switch binding-doc.
So I need to patch also
Documentation/devicetree/bindings/net/dsa/mscc,ocelot.yaml ? Any other
binding document ?
Thank you for your help !
next prev parent reply other threads:[~2026-10-20 1:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 19:32 [net-next,PATCH 1/2] dt-bindings: net: enetc-mdio: Document optional MDC clock Marek Vasut
2026-10-16 19:32 ` [net-next,PATCH 2/2] enetc: Make eMDIO MDC rate configurable from DT Marek Vasut
2026-10-16 20:04 ` Frank Li
2026-10-16 22:04 ` Marek Vasut
2026-10-17 2:24 ` Wei Fang
2026-10-17 17:30 ` Marek Vasut
2026-10-19 2:59 ` Wei Fang
2026-10-19 16:10 ` Marek Vasut [this message]
2026-10-16 20:59 ` Andrew Lunn
2026-10-16 22:26 ` Marek Vasut
2026-10-17 17:39 ` Andrew Lunn
2026-10-16 19:59 ` [net-next,PATCH 1/2] dt-bindings: net: enetc-mdio: Document optional MDC clock Frank Li
2026-10-18 19:42 ` Conor Dooley
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=fe920b05-6d89-4dc1-83d3-0664fbc2e00c@nabladev.com \
--to=marex@nabladev.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=chleroy@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=frank.li@nxp.com \
--cc=frank.li@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--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
all inboxes | Powered by JetHome®