From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91BC5E732E5 for ; Thu, 28 Sep 2023 15:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JTpU/ZuOclZsuX24OS4CfG1Ei99UovF3sZDkKTMpGZ8=; b=i40CdTg2OeMyek Ao/tqPVlIu0Hpg2zIsEpQ92LjciU/qcZh95ccyvvM5xV/6WlD+PmoL6eorslsq1LM4lIqCjBfqs+3 3xzilEY0LNLbp3PqCBkjsURtbaECEyFZkfr2kKjJ4dOK2Ln/qaAOzQGTi8yPwXZxt7Xlq9b92+9St 7kqDKUEbm/gfHiFalHic78DMGDFfojvUipQBea2OxfY9gut33hDUojlqu1vl8R+DE+tYsf/N9kq6w 5mpunbH8GE+4WK14mGYZ7xl26qBhuDraGmwj6RTwpM464JgPslXpjIlCPuvtUomEH5TGizywjkI6y TJkM4midR1ObY+k+ubzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qltCg-005bXU-0r; Thu, 28 Sep 2023 15:45:26 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qltCc-005bUT-22 for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2023 15:45:24 +0000 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-41368601e92so74677281cf.3 for ; Thu, 28 Sep 2023 08:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20230601.gappssmtp.com; s=20230601; t=1695915921; x=1696520721; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zjyiO2aerenB+L5bFFtdZmRzY+MpNJymXfUVpkxGKO4=; b=TKR5ze8mJyIk3E04nY7B9/taCRDG1EXdCLQ9YJDVbGClyxTODjipCaVvdcPfALBz/q AzTJLQGbe9L53ur9ay+UWsdbTtrrjt+Jf60ujbW1rLnouwJajdFQb633utq5v8gvlEUw 2oabhvqvIZ8gb7cVnrS9iqTMYPJNv3IsN6Jhv+zR5K5qNLqn6YyNvetoUYO8TBD6/ygG aFiMrnbFOuYCzlxHx9wVI3g6if/RwLM2WMYguiwkQy7ne6NXruSZNmkre0hZtMqy/Vge rl068O7TSqVuA8EEPZ9hvuWHCKiFLx+zKh8uAIdJiE321gBPSJCb3PgNYCY8xHOne8Q4 USyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695915921; x=1696520721; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zjyiO2aerenB+L5bFFtdZmRzY+MpNJymXfUVpkxGKO4=; b=esmYphr1w2u76hJ+GaurPvNH61D+8E8ryDCj7luwRw7Q3oNf0QGH5v5SyDEvr0NcZi WM34cWk41rjm3gP/18Bmehrwos3tGzzBxGRZdTyanxPQDhyZXhx2v59pzBj56BOM3Vdv OcnHHTK0zaeuuK7ZTju/peJKoO+0YkvQHBDETXnMUsebaIfJfkYTKSI9W2IOA4Nw8klL EOifwgxos7gwMTOLE1CaqH8z9raUbZJ1zpNDuwUl9/G/rTaNlldnonuBz5ntqYjTFAYN +3FqdURyyzvmWrHfNwmJHgJitS3XHVm3Y9P3eCcfLZcdLmo73nVO6A+sll6B5cZYHKF0 yboA== X-Gm-Message-State: AOJu0YyP7r3J6AHs97kKwzxDFOuFrujwVif4opgtzeuonXLe2oTe/kAl vUrIyh1/6TmiBZmgQ126cFlh6w== X-Google-Smtp-Source: AGHT+IFKFYsPa5h8pLMtcKIq+MzAXP0NgUcgCjLytQEnC2TxzCHGxJpa5mBsW/GglWjJvBke4oO7bg== X-Received: by 2002:ac8:5885:0:b0:418:12c6:467f with SMTP id t5-20020ac85885000000b0041812c6467fmr1513741qta.3.1695915921011; Thu, 28 Sep 2023 08:45:21 -0700 (PDT) Received: from dell-precision-5540 ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id r15-20020ac87eef000000b004181a3eeff4sm3076750qtc.5.2023.09.28.08.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 08:45:20 -0700 (PDT) Date: Thu, 28 Sep 2023 11:45:10 -0400 From: Ben Wolsieffer To: Christophe Roullier Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Jose Abreu , Liam Girdwood , Mark Brown , 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 Subject: Re: [PATCH v3 08/12] net: ethernet: stmmac: stm32: support the phy-supply regulator binding Message-ID: References: <20230928151512.322016-1-christophe.roullier@foss.st.com> <20230928151512.322016-9-christophe.roullier@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230928151512.322016-9-christophe.roullier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_084522_896001_374510BD X-CRM114-Status: GOOD ( 24.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On Thu, Sep 28, 2023 at 05:15:08PM +0200, Christophe Roullier wrote: > From: Christophe Roullier > > Configure the phy regulator if defined by the "phy-supply" DT phandle. > > Signed-off-by: Christophe Roullier > --- > .../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 ... snip ... > static int stm32mp1_suspend(struct stm32_dwmac *dwmac) > @@ -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) Why only turn off the regulator in suspend on the STM32MP1 and not STM32 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. > -- > 2.25.1 > Thanks, Ben _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel