[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250917-wol-smsc-phy-v2-2-105f5eb89b7f@foss.st.com>
Date: Wed, 17 Sep 2025 17:36:37 +0200
From: Gatien Chevallier <gatien.chevallier@...s.st.com>
To: Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller"
<davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Rob Herring
<robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley
<conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
"Alexandre Torgue" <alexandre.torgue@...s.st.com>,
Christophe Roullier
<christophe.roullier@...s.st.com>,
Andrew Lunn <andrew@...n.ch>,
"Heiner
Kallweit" <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"Simon Horman" <horms@...nel.org>,
Tristram Ha <Tristram.Ha@...rochip.com>,
"Florian Fainelli" <florian.fainelli@...adcom.com>
CC: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
Gatien Chevallier <gatien.chevallier@...s.st.com>
Subject: [PATCH net-next v2 2/4] net: stmmac: stm32: add WoL from PHY
support
If the "st,phy-wol" property is present in the device tree node,
set the STMMAC_FLAG_USE_PHY_WOL flag to use the WoL capability of
the PHY.
Signed-off-by: Gatien Chevallier <gatien.chevallier@...s.st.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 77a04c4579c9dbae886a0b387f69610a932b7b9e..6f197789cc2e8018d6959158b795e4bca46869c5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -106,6 +106,7 @@ struct stm32_dwmac {
u32 speed;
const struct stm32_ops *ops;
struct device *dev;
+ bool phy_wol;
};
struct stm32_ops {
@@ -433,6 +434,8 @@ static int stm32_dwmac_parse_data(struct stm32_dwmac *dwmac,
}
}
+ dwmac->phy_wol = of_property_read_bool(np, "st,phy-wol");
+
return err;
}
@@ -557,6 +560,8 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
plat_dat->bsp_priv = dwmac;
plat_dat->suspend = stm32_dwmac_suspend;
plat_dat->resume = stm32_dwmac_resume;
+ if (dwmac->phy_wol)
+ plat_dat->flags |= STMMAC_FLAG_USE_PHY_WOL;
ret = stm32_dwmac_init(plat_dat);
if (ret)
--
2.35.3
Powered by blists - more mailing lists