From: Detlev Casanova <detlev.casanova@collabora.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux-kernel@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: net: phy: Document support for external PHY clk
Date: Fri, 02 Jun 2023 15:26:53 -0400 [thread overview]
Message-ID: <2288019.ElGaqSPkdT@arisu> (raw)
In-Reply-To: <4255bc0a-491c-4fbb-88ea-ec1d864a1a24@lunn.ch>
On Friday, June 2, 2023 2:42:38 P.M. EDT Andrew Lunn wrote:
> On Fri, Jun 02, 2023 at 02:26:58PM -0400, Detlev Casanova wrote:
> > Ethern PHYs can have external an clock that needs to be activated before
> > probing the PHY.
>
> `Ethernet PHYs can have an external clock.`
>
> We need to be careful with 'activated before probing the PHY'. phylib
> itself will not activate the clock. You must be putting the IDs into
> the compatible string, so the correct driver is loaded, and its probe
> function is called. The probe itself enables the clock, so it is not
> before probe, but during probe.
>
> I'm picky about this because we have issues with enumerating the MDIO
> bus to find PHYs. Some boards needs the PHY taking out of reset,
> regulators enabled, clocks enabled etc, before the PHY will respond on
> the bus. It is hard for the core to do this, before the probe. So we
> recommend putting IDs in the compatible, so the driver probe function
> to do any additional setup needed.
That makes sense, In my head, "probing" == calling phy_write/read() functions.
But I get how this could be confused with the _probe() function. (And I just
realised that there are typos)
What about "Ethernet PHYs can have an external clock that needs to be
activated before communicating with the PHY" ?
> > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> > ---
> >
> > Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > b/Documentation/devicetree/bindings/net/ethernet-phy.yaml index
> > 4f574532ee13..c1241c8a3b77 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> >
> > @@ -93,6 +93,12 @@ properties:
> > the turn around line low at end of the control phase of the
> > MDIO transaction.
> >
> > + clocks:
> > + maxItems: 1
> > + description:
> > + External clock connected to the PHY. If not specified it is assumed
> > + that the PHY uses a fixed crystal or an internal oscillator.
>
> This text is good.
Detlev
next prev parent reply other threads:[~2023-06-02 19:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 18:26 net: phy: realtek: Support external PHY clock Detlev Casanova
2023-06-02 18:26 ` [PATCH v2 1/3] net: phy: realtek: Add optional " Detlev Casanova
2023-06-02 18:43 ` Andrew Lunn
2023-06-02 19:10 ` Florian Fainelli
2023-06-02 18:26 ` [PATCH v2 2/3] dt-bindings: net: phy: Document support for external PHY clk Detlev Casanova
2023-06-02 18:42 ` Andrew Lunn
2023-06-02 19:26 ` Detlev Casanova [this message]
2023-06-02 19:43 ` Andrew Lunn
2023-06-03 10:27 ` Krzysztof Kozlowski
2023-06-02 18:26 ` [PATCH v2 3/3] net: phy: realtek: Disable clock on suspend Detlev Casanova
2023-06-02 19:11 ` Florian Fainelli
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=2288019.ElGaqSPkdT@arisu \
--to=detlev.casanova@collabora.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).