[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240306172409.878928-2-catalin.popescu@leica-geosystems.com>
Date: Wed, 6 Mar 2024 18:24:09 +0100
From: Catalin Popescu <catalin.popescu@...ca-geosystems.com>
To: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
robh@...nel.org,
krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org,
shawnguo@...nel.org,
s.hauer@...gutronix.de,
kernel@...gutronix.de,
festevam@...il.com,
xiaoning.wang@....com,
linux-imx@....com,
alexandre.torgue@...s.st.com,
joabreu@...opsys.com,
mcoquelin.stm32@...il.com
Cc: netdev@...r.kernel.org,
devicetree@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
bsp-development.geo@...ca-geosystems.com,
m.felsch@...gutronix.de,
Catalin Popescu <catalin.popescu@...ca-geosystems.com>
Subject: [PATCH net-next 2/2] net: stmmac: dwmac-imx: add support for PHY WOL
Add support for PHY WOL capability into dwmac-imx MAC driver.
This is required to enable WOL feature on a platform where MAC
WOL capability is not sufficient and WOL capability built into
the PHY is actually needed.
Signed-off-by: Catalin Popescu <catalin.popescu@...ca-geosystems.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
index 6b65420e11b5..9d7278c083bf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -59,6 +59,7 @@ struct imx_priv_data {
struct regmap *intf_regmap;
u32 intf_reg_off;
bool rmii_refclk_ext;
+ bool phy_wol;
void __iomem *base_addr;
const struct imx_dwmac_ops *ops;
@@ -312,6 +313,8 @@ imx_dwmac_parse_dt(struct imx_priv_data *dwmac, struct device *dev)
}
}
+ dwmac->phy_wol = of_property_read_bool(np, "nxp,phy-wol");
+
return err;
}
@@ -353,6 +356,11 @@ static int imx_dwmac_probe(struct platform_device *pdev)
if (data->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY)
plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY;
+ if (dwmac->phy_wol)
+ plat_dat->flags |= STMMAC_FLAG_USE_PHY_WOL;
+ else
+ plat_dat->flags &= ~STMMAC_FLAG_USE_PHY_WOL;
+
/* Default TX Q0 to use TSO and rest TXQ for TBS */
for (int i = 1; i < plat_dat->tx_queues_to_use; i++)
plat_dat->tx_queues_cfg[i].tbs_en = 1;
--
2.34.1
Powered by blists - more mailing lists