From: Gatien Chevallier <gatien.chevallier@foss.st.com>
To: 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>,
Rob Herring <robh@kernel.org>,
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>,
Christophe Roullier <christophe.roullier@foss.st.com>,
Andrew Lunn <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"Simon Horman" <horms@kernel.org>,
Tristram Ha <Tristram.Ha@microchip.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>
Cc: <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>,
Gatien Chevallier <gatien.chevallier@foss.st.com>
Subject: [PATCH net-next v2 0/4] net: add WoL from PHY support for stm32mp135f-dk
Date: Wed, 17 Sep 2025 17:36:35 +0200 [thread overview]
Message-ID: <20250917-wol-smsc-phy-v2-0-105f5eb89b7f@foss.st.com> (raw)
A previous patchset in drivers/net/phy/smsc.c introduced the WoL
from PHY capability of some PHYs. The Microchip LAN8742 PHY is
present on the stm32mp135f-dk board and posesses this capability.
Therefore, add the possibility to specify in the device tree that,
for a MAC instance, we want to use the WoL from PHY capability
instead of the MAC one.
However, when testing multiple power sequences with magic packets,
the first one succeeded but the following ones failed. This was
caused by uncleared flags in a PHY register. Therefore, I added
a patch to add suspend()/resume() callbacks that handle these.
These callbacks are only implemented for the Microchip LAN8742 as I
have no way of testing it for other WoL capable PHYs.
Note: This patchset does not solve the issue regarding the PHY pin
alternate fuctions (nPME/nINT). The driver still statically configures
the LED2/nINT/nPME in nPME mode. The interrupt management discussed in
V1 still needs rework, and probably at framework level.
The current state after this patchset is:
- Successive system wakeup with WoL event now possible
- WoL event received while the system is up do not prevent system wakeup
from a WoL event. I took inspiration from the broadcom driver
regarding this issue
Question: Given that the PHYs have pins with alternate functions that
are difficult to handle (some drivers like smsc.c are configuring them
statically), should we consider working on a pinctrl-like solution for
them?
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
Changes in v2:
- Rework commit message of the bindings patch
- Handle WoL flags in Microchip driver suspend() callback and always
call the suspend callback.
- Link to v1: https://lore.kernel.org/r/20250721-wol-smsc-phy-v1-0-89d262812dba@foss.st.com
---
Gatien Chevallier (4):
dt-bindings: net: document st,phy-wol property
net: stmmac: stm32: add WoL from PHY support
net: phy: smsc: fix and improve WoL support
arm: dts: st: activate ETH1 WoL from PHY on stm32mp135f-dk
.../devicetree/bindings/net/stm32-dwmac.yaml | 6 ++
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 1 +
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 5 ++
drivers/net/phy/smsc.c | 66 ++++++++++++++++++++--
include/linux/smscphy.h | 2 +
5 files changed, 75 insertions(+), 5 deletions(-)
---
base-commit: 5e87fdc37f8dc619549d49ba5c951b369ce7c136
change-id: 20250721-wol-smsc-phy-ff3b40848852
Best regards,
--
Gatien Chevallier <gatien.chevallier@foss.st.com>
next reply other threads:[~2025-09-17 15:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 15:36 Gatien Chevallier [this message]
2025-09-17 15:36 ` [PATCH net-next v2 1/4] dt-bindings: net: document st,phy-wol property Gatien Chevallier
2025-09-22 17:05 ` Rob Herring
2025-09-23 8:02 ` Gatien CHEVALLIER
2025-09-17 15:36 ` [PATCH net-next v2 2/4] net: stmmac: stm32: add WoL from PHY support Gatien Chevallier
2025-09-17 16:31 ` Russell King (Oracle)
2025-09-18 12:46 ` Gatien CHEVALLIER
2025-09-18 13:59 ` Russell King (Oracle)
2025-09-18 15:07 ` Gatien CHEVALLIER
2025-09-18 15:36 ` Russell King (Oracle)
2025-09-23 8:11 ` Gatien CHEVALLIER
2025-09-18 15:34 ` Andrew Lunn
2025-09-23 8:20 ` Gatien CHEVALLIER
2025-09-26 17:59 ` Russell King (Oracle)
2025-09-26 19:05 ` Florian Fainelli
2025-09-27 21:04 ` Florian Fainelli
2025-09-27 22:19 ` Russell King (Oracle)
2025-09-28 8:21 ` Russell King (Oracle)
2025-09-17 15:36 ` [PATCH net-next v2 3/4] net: phy: smsc: fix and improve WoL support Gatien Chevallier
2025-09-17 15:54 ` Russell King (Oracle)
2025-09-17 15:36 ` [PATCH net-next v2 4/4] arm: dts: st: activate ETH1 WoL from PHY on stm32mp135f-dk Gatien Chevallier
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=20250917-wol-smsc-phy-v2-0-105f5eb89b7f@foss.st.com \
--to=gatien.chevallier@foss.st.com \
--cc=Tristram.Ha@microchip.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@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=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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).