[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231123-dwmac-rk_phy_wol-v1-2-bf4e718081b9@wolfvision.net>
Date: Thu, 23 Nov 2023 13:14:14 +0100
From: Javier Carrasco <javier.carrasco@...fvision.net>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Heiko Stuebner <heiko@...ech.de>,
David Wu <david.wu@...k-chips.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
Javier Carrasco <javier.carrasco@...fvision.net>
Subject: [PATCH RFC WIP 2/2] net: stmmac: dwmac-rk: add support for PHY
wake on LAN
PHY WOL will be used if the rockhip,phy-wol property is defined. MAC WOL
will be preferred otherwise.
Signed-off-by: Javier Carrasco <javier.carrasco@...fvision.net>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 382e8de1255d..c543566b4f90 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1694,6 +1694,11 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
dev_info(dev, "integrated PHY? (%s).\n",
bsp_priv->integrated_phy ? "yes" : "no");
+ if (of_property_read_bool(dev->of_node, "rockchip,phy-wol"))
+ plat->flags |= STMMAC_FLAG_USE_PHY_WOL;
+ else
+ plat->flags &= ~STMMAC_FLAG_USE_PHY_WOL;
+
bsp_priv->pdev = pdev;
return bsp_priv;
--
2.39.2
Powered by blists - more mailing lists