On 9/28/23 17:45, Ben Wolsieffer wrote:
Hello,Hi,
On Thu, Sep 28, 2023 at 05:15:08PM +0200, Christophe Roullier wrote:
From: Christophe Roullier <christophe.roullier@xxxxxx>... snip ...
Configure the phy regulator if defined by the "phy-supply" DT phandle.
Signed-off-by: Christophe Roullier <christophe.roullier@xxxxxxxxxxx>
---
.../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 51 ++++++++++++++++++-
1 file changed, 50 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 72dda71850d75..31e3abd2caeaa 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
static int stm32mp1_suspend(struct stm32_dwmac *dwmac)Why only turn off the regulator in suspend on the STM32MP1 and not STM32
@@ -455,12 +496,20 @@ static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
if (dwmac->enable_eth_ck)
clk_disable_unprepare(dwmac->clk_eth_ck);
+ /* Keep the PHY up if we use Wake-on-Lan. */
+ if (!device_may_wakeup(dwmac->dev))
+ phy_power_on(dwmac, false);
+
return ret;
}
static void stm32mp1_resume(struct stm32_dwmac *dwmac)
{
clk_disable_unprepare(dwmac->clk_ethstp);
+
+ /* The PHY was up for Wake-on-Lan. */
+ if (!device_may_wakeup(dwmac->dev))
+ phy_power_on(dwmac, true);
}
static int stm32mcu_suspend(struct stm32_dwmac *dwmac)
MCUs? It seems like this could just go in stm32_dwmac_suspend/resume().
Selfishly, I have a use case for this on an STM32F746 platform, so I
would like to see support for it and would test an updated version.
I'm working on MPU boards, I do not have MCU board, so feel free to contribute on MCU part ;-)
Thanks
Christophe
--Thanks, Ben
2.25.1