Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Christophe ROULLIER <christophe.roullier@foss.st.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linusw@kernel.org,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [net-next,PATCH v2 1/5] dt-bindings: net: add phy-supply property for stm32
Date: Tue, 1 Sep 2026 09:01:42 -0500	[thread overview]
Message-ID: <20260901140142.GB1244140-robh@kernel.org> (raw)
In-Reply-To: <3326ff38-75c3-4218-b537-17077f3faa4e@foss.st.com>

On Tue, Sep 01, 2026 at 09:33:33AM +0200, Christophe ROULLIER wrote:
> 
> Le 12/08/2026 à 21:58, Rob Herring a écrit :
> > On Wed, Aug 12, 2026 at 11:11:18AM +0200, Christophe Roullier wrote:
> > > Phandle to a regulator that provides power to the PHY. This
> > > regulator will be managed during the PHY power on/off sequence.
> > > 
> > > Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
> > > ---
> > >   Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 3 +++
> > >   1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> > > index 987254900d0da..0c7eb1ccadd47 100644
> > > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> > > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
> > > @@ -99,6 +99,9 @@ properties:
> > >         encompases the glue register, the offset of the control register and
> > >         the mask to set bitfield in control register
> > > +  phy-supply:
> > > +    description: PHY regulator
> > Which phy? There can be multiple for ethernet. In any case, doesn't
> > really matter because either is wrong. The supply(ies) for a device go
> > in that device's DT node. This node is not a PHY.
> > 
> > Rob
> 
> Hi Rob,
> 
> Ok I will update my description with :   "Regulator that powers the Ethernet
> PHY."
> 
> To manage this regulator on Ethernet glue, I based my work on the examples
> of :
> 
>   - allwinner,sun4i,
> 
>   - allwinner,sun7i
> 
>   - allwinner,sun8i
> 
>   - fsl,fec
> 
>   - rockchip-dwmac
> 
>   - rockchip,emac

There are plenty of examples of how not to model things in the tree.

> 
> For me it is normal that PHY Ethernet regulator is managed by MAC glue
> because it is mandatory to power ON Ethernet PHY chip BEFORE MDIO scan.

What happens when you have a PHY with a supply, clock, and reset that 
all need handling and those all need to be handled in a specific order 
and timing? And then you have 10 different boards with different PHYs 
and different power on requirements? You are not going to handle that in 
the MAC driver. We've fallen into the trap of "I just need this one 
property" many times. It doesn't scale.

The MDIO subsystem has provisions for handling power on of devices 
before discovery. I know it will generically enable a clock. Maybe a 
single regulator is handled too, I don't recall. If the PHY gets more 
complicated, then you need a specific PHY driver to handle it.

Rob


  reply	other threads:[~2026-09-01 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  9:11 [net-next,PATCH v2 0/5] Some improve for STM32MP2X Christophe Roullier
2026-08-12  9:11 ` [net-next,PATCH v2 1/5] dt-bindings: net: add phy-supply property for stm32 Christophe Roullier
2026-08-12 19:58   ` Rob Herring
2026-09-01  7:33     ` Christophe ROULLIER
2026-09-01 14:01       ` Rob Herring [this message]
2026-08-12  9:11 ` [net-next,PATCH v2 2/5] net: ethernet: stmmac: stm32: support the phy-supply regulator binding Christophe Roullier
2026-08-12  9:11 ` [net-next,PATCH v2 3/5] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk Christophe Roullier
2026-08-12  9:11 ` [net-next,PATCH v2 4/5] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk Christophe Roullier
2026-08-12  9:11 ` [net-next,PATCH v2 5/5] arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1 Christophe Roullier

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=20260901140142.GB1244140-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=christophe.roullier@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@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