From patchwork Wed Mar 12 09:34:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013235 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 49087C28B28 for ; Wed, 12 Mar 2025 09:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zpS7p8o3mdBBFheqnhpM/ihzX7xt9vdxYe4n3JsWYLE=; b=eFbMR7rqQkk2AZRxxumsH5NV/M PJwhYhdQ+/QkhC7/cmNLpbklbi0lE7Of5y50ltwWh57bIpvIrA/DtkfwBBXQb/rWj/HRBon3LMQTm ON7KFnnPtz5H8yuk7QnareDRu80hok6Y/TnhDpQfcpvcNuFDdjGIbwb1q3hqHAi9jx/ShL0/wrGE1 ifQJGq2PY1EFjH80SvLJPo2bU5eque41J7r+i45cVaOtBjZ38WCRsQws2kGqWUTezcQCY29ZebkKe OxWYwebDEcZEhnjIa6jCXrOZwVsooCH3Yl1tQcgjGH3UuNpILGnJklKjas42+/nDXY1Seq4DPjHpD V8R311FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIg8-000000081Ut-3fVE; Wed, 12 Mar 2025 09:47:08 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUO-00000007zNq-3rZK; Wed, 12 Mar 2025 09:35:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zpS7p8o3mdBBFheqnhpM/ihzX7xt9vdxYe4n3JsWYLE=; b=HVldZJ2mfLEGg3pc11KXC3Gvfk 1ljvusFokICK3Pqkt0j9HQxxTWotDTGbLfhl1dW1sBCgOKfoo0VxO1esC5LIFdEBgZhCsl0j8lsQ9 ZO8t1aE8HFFXKwnrQo6C9rY23qJfaFlnJ+RwdP2En7ywr5htxUO60FE9/RXTnT8r/quvKvKblxCLp SqXebs3BcOJRwOXIrKmjoZDLnx1wOnNeT1MPcP3cCXBzuKjzNsdNbCDlKe7F4hI5kHKNriIi41NTP lhGn5A0+0+AADafBAoBqnBTmMtpcZjcs/kcWGDJf3A5gCnn40HdpYGeBrVwfabjifI1+9T6icid/O 3AK6RYTA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:51958 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUA-0005Gh-0O; Wed, 12 Mar 2025 09:34:46 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsITp-005vG9-Px; Wed, 12 Mar 2025 09:34:25 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring Subject: [PATCH net-next v2 1/7] net: stmmac: allow platforms to use PHY tx clock stop capability MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:25 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023500_962310_8402F47E X-CRM114-Status: GOOD ( 13.56 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow platform glue to instruct stmmac to make use of the PHY transmit clock stop capability when deciding whether to allow the transmit clock from the DWMAC core to be stopped. Reviewed-by: Lad Prabhakar Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++---- include/linux/stmmac.h | 3 ++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index d87275c1cf23..bddfa0f4aa21 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -306,6 +306,7 @@ struct stmmac_priv { struct timer_list eee_ctrl_timer; int lpi_irq; u32 tx_lpi_timer; + bool tx_lpi_clk_stop; bool eee_enabled; bool eee_active; bool eee_sw_timer_en; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index fa1d7d3a2f43..6f29804148b6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -457,8 +457,7 @@ static void stmmac_try_to_start_sw_lpi(struct stmmac_priv *priv) /* Check and enter in LPI mode */ if (!priv->tx_path_in_lpi_mode) stmmac_set_lpi_mode(priv, priv->hw, STMMAC_LPI_FORCED, - priv->plat->flags & STMMAC_FLAG_EN_TX_LPI_CLOCKGATING, - 0); + priv->tx_lpi_clk_stop, 0); } /** @@ -1104,13 +1103,18 @@ static int stmmac_mac_enable_tx_lpi(struct phylink_config *config, u32 timer, priv->eee_enabled = true; + /* Update the transmit clock stop according to PHY capability if + * the platform allows + */ + if (priv->plat->flags & STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP) + priv->tx_lpi_clk_stop = tx_clk_stop; + stmmac_set_eee_timer(priv, priv->hw, STMMAC_DEFAULT_LIT_LS, STMMAC_DEFAULT_TWT_LS); /* Try to cnfigure the hardware timer. */ ret = stmmac_set_lpi_mode(priv, priv->hw, STMMAC_LPI_TIMER, - priv->plat->flags & STMMAC_FLAG_EN_TX_LPI_CLOCKGATING, - priv->tx_lpi_timer); + priv->tx_lpi_clk_stop, priv->tx_lpi_timer); if (ret) { /* Hardware timer mode not supported, or value out of range. @@ -1269,6 +1273,10 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) if (!(priv->plat->flags & STMMAC_FLAG_RX_CLK_RUNS_IN_LPI)) priv->phylink_config.eee_rx_clk_stop_enable = true; + /* Set the default transmit clock stop bit based on the platform glue */ + priv->tx_lpi_clk_stop = priv->plat->flags & + STMMAC_FLAG_EN_TX_LPI_CLOCKGATING; + mdio_bus_data = priv->plat->mdio_bus_data; if (mdio_bus_data) priv->phylink_config.default_an_inband = diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index b6f03ab12595..c4ec8bb8144e 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -183,7 +183,8 @@ struct dwmac4_addrs { #define STMMAC_FLAG_INT_SNAPSHOT_EN BIT(9) #define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI BIT(10) #define STMMAC_FLAG_EN_TX_LPI_CLOCKGATING BIT(11) -#define STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY BIT(12) +#define STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP BIT(12) +#define STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY BIT(13) struct plat_stmmacenet_data { int bus_id; From patchwork Wed Mar 12 09:34:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013236 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 9E94EC28B28 for ; Wed, 12 Mar 2025 09:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HlbmyzYzLADsI2UNSNeNHJhLaybCyKx8Gh+zDwNi5KA=; b=2wDceykZI9TCjTXTM2s8G2MG3d qPefNIgMJoEX/wvQeUkQRFzP3zSRNdIGQUrzUwjoZyV7IQz1yBedeZAsT16lmV+NeLFF1JueQ0vJq FGD6l9HOTYdPrvk/1rgikanGENDDtRoHEUSyQUupR3sV76z4Y53Xcrm4f/qfMbod6MC9prjO9fHJL +/hACtzqyD8TbESQj6b8df5VejWIh3awrCtFh2CRYFOX4ytPoHNOZ9dmwYG+6k+naD04mABXD6t6d AMQhFjogt2SSLHQwonvTrAOl58jf9pEXiMSA8aS3/4SK88Q9oJv+B7hSOjcJv3DJI7sJZl/IAeZjD c29NuUGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIhm-000000081lA-0vuh; Wed, 12 Mar 2025 09:48:50 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUY-00000007zQk-3L2M; Wed, 12 Mar 2025 09:35:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HlbmyzYzLADsI2UNSNeNHJhLaybCyKx8Gh+zDwNi5KA=; b=Cje0fCZPMZ5rLcB/uy+H0ZonX6 X5XnBKLvztTCG+EXQynSq4V/Ub9m32CdpJvnOI9MaCei0ucOk9BRQAK7ggYkb2mgJnZZQKKJNUsLh rRwBbXGOyATiADxvM4E2Y5cxeJ2C5/wY/bWOW6L5mDQ6ZaapCf3YeT3Wa/5DGPVGb0IG0LR5Z1Ab/ wiW20vJeSUaaQG/SQAP1bmGUePWtb9SWc3Vk8QcFx6W1AjZd82JiblvB7eJG5+6oQve6+zA1EyHg5 jSb0McZT9d768gNKEw1IzMgNlSB9S1wRodBi14cPg6bdUoOsYuRfD29TFi9WovUOUArs66uPZ3PaS iz5bn6ag==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:51964 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUF-0005H0-1t; Wed, 12 Mar 2025 09:34:51 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsITu-005vGF-TM; Wed, 12 Mar 2025 09:34:30 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring , Samin Guo Subject: [PATCH net-next v2 2/7] net: stmmac: starfive: use PHY capability for TX clock stop MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:30 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023510_825823_F558C31B X-CRM114-Status: GOOD ( 10.56 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Add the flag to allow the stmmac core to use the PHY capability. Cc: Samin Guo Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c index 5e31cb3bb4b8..2013d7477eb7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c @@ -124,6 +124,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev) plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate; dwmac->dev = &pdev->dev; + plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP; plat_dat->bsp_priv = dwmac; plat_dat->dma_cfg->dche = true; From patchwork Wed Mar 12 09:34:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013237 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 51840C28B28 for ; Wed, 12 Mar 2025 09:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1GJLEqJTcLE/j9IX7nk50QB5Lf8CsNQlaa9n2xuwQLA=; b=WLeTAucPeJzdpHJ94E3f/PqRiB zOTVNsXoczMUQA9g4dV4RiibfnsbzkxX6ySz2uOGhWz0hAydg69WhwfLOkSyvZoey9pPW8RORTpWR KD6FcKRFlYfODDnviibyGJqJWNKyr8oF3qtuFGVXSeiddhNneX3fSL4dV8p/juwI1FscEN0uGocVe rlwaqDqx0Z9DAr8B3sqr1BWXtLHokev9rJayFXELvnmJCfuP2nz0MIL7lQTxct5PIE1260C8PqCNt 6gS0WGr2e1rR+ZrB83g6l6twnUsWwxAS0cyhevqir7K+wkvzEVHgOniJwznCfqPwiFuXxcSInAvso zy8P+7xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIjO-0000000823t-1ygh; Wed, 12 Mar 2025 09:50:30 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUi-00000007zTC-1Tw7; Wed, 12 Mar 2025 09:35:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1GJLEqJTcLE/j9IX7nk50QB5Lf8CsNQlaa9n2xuwQLA=; b=X9gHPjjlWMctrbf8QBKrgrxT/J FtU0oRO4MAuh5eoojzg7Xt7TL8CfsNmc9QMk0xSIovOsJg/aOxunrODNgPToUqygH9Ub5HA5/xzWu 3hYBdy8ySvzQt/eOT90lz5gefFlRs3pF08ROSkHnb83HQUHNtQcrfJI51KoQ6TVclCMpIpo7JrEXB vcXf36mfe2838GWk+W9leRnJ1eRodTOYvPlX4IrS8+qi1Nn4w2C9TUPXjlwhBG6tBaa/3k6HAcjma ctNTo5IzY+DtrOdVE5gXybnELuHQCJW2VykweUGWEvK8N4xf8pP20vS6mVPt/jr96ZWLIXS8k0+iW xX+E5XDw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:36258 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUL-0005HM-13; Wed, 12 Mar 2025 09:34:57 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsIU0-005vGL-17; Wed, 12 Mar 2025 09:34:36 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Christophe Roullier , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring Subject: [PATCH net-next v2 3/7] net: stmmac: stm32: use PHY capability for TX clock stop MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:36 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023520_398951_81541BFA X-CRM114-Status: GOOD ( 10.78 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Add the flag to allow the stmmac core to use the PHY capability. Cc: Christophe Roullier Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index 1fcb74e9e3ff..c3d321192581 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -538,6 +538,7 @@ static int stm32_dwmac_probe(struct platform_device *pdev) return ret; } + plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP; plat_dat->bsp_priv = dwmac; ret = stm32_dwmac_init(plat_dat, false); From patchwork Wed Mar 12 09:34:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013248 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 D957CC28B28 for ; Wed, 12 Mar 2025 09:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WlnjW2BpfjiM63UcojgauSdWRDJorCLGfJ2ZQigHONw=; b=D9hbLMdnZDMavA19YUCsnKR2q6 gtQBKRQRnJ3awY36sToxqMc3UXIbO4jToAV79wt0jtlb/TvtVPnS/cq3/vmCUwz9VkNba127uhR+Y OqVnxeix2oi1CNMeMMjvDT86sBdZPbKF3Z0HDfX9YnTWP84m8aN08mcVoVoLdQ20/h7mjR4Y82j4F yPYDfvkgH8MGbNTwX9aOEuT8Y1KdWxbOwrKq158EGhUfuaKI8oohsIaKADcjtSTkcZswk5gOhx/H4 twWBfM4g6u/FjLxaFOf6dhJbpj1wG4w2Ejmi5QeQn4o6zTwKGOaDC8ciJf6V59O8qMVjPgkX7WNC2 XPMRp8yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIl0-000000082HV-47GZ; Wed, 12 Mar 2025 09:52:10 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUr-00000007zYB-1OX6; Wed, 12 Mar 2025 09:35:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WlnjW2BpfjiM63UcojgauSdWRDJorCLGfJ2ZQigHONw=; b=X7IJpKnrsZz4mMD/Y0Imd0BscY ScXYdYmGGHGxceZABGH59dKp6Op9aD6N+QknONUFwhjdzmLrB1JoE+PsYvugL8vWxnuFbfKUx7XAi VEDp3Oc4nYVDL+5TQHgU0c7U6wQHIPi/qVz5A/1YrKHwhemAqcu9zAFG3SGbdPFS5aa15Vy366BfO UTmmU1lHl/mLEjniFwD3m95kk4T8lhPNCKvVHZrwttWqEeGkI6wl87mQHSzC85vsZ6i3VTH1dK8gH B6/yYn4HNBY771Peqn7tumWy1Hpmw1YBOpmcgSdAkcaWU4TmmMiXHEDJDOgr2DM5haKaqBE4GBjzs mpTA2naw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:38170 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUS-0005Hh-0g; Wed, 12 Mar 2025 09:35:04 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsIU5-005vGR-4c; Wed, 12 Mar 2025 09:34:41 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring , Samin Guo Subject: [PATCH net-next v2 4/7] riscv: dts: starfive: remove "snps,en-tx-lpi-clockgating" property MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:41 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023529_377915_0E38AFA7 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. As commit "net: stmmac: starfive: use PHY capability for TX clock stop" adds the flag to use the PHY capability, remove the DT property that is now unecessary. Cc: Samin Guo Acked-by: Conor Dooley Signed-off-by: Russell King (Oracle) --- arch/riscv/boot/dts/starfive/jh7110.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 0d8339357bad..a7aed4a21b65 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -1022,7 +1022,6 @@ gmac0: ethernet@16030000 { snps,force_thresh_dma_mode; snps,axi-config = <&stmmac_axi_setup>; snps,tso; - snps,en-tx-lpi-clockgating; snps,txpbl = <16>; snps,rxpbl = <16>; starfive,syscon = <&aon_syscon 0xc 0x12>; @@ -1053,7 +1052,6 @@ gmac1: ethernet@16040000 { snps,force_thresh_dma_mode; snps,axi-config = <&stmmac_axi_setup>; snps,tso; - snps,en-tx-lpi-clockgating; snps,txpbl = <16>; snps,rxpbl = <16>; starfive,syscon = <&sys_syscon 0x90 0x2>; From patchwork Wed Mar 12 09:34:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013249 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 D1455C28B2E for ; Wed, 12 Mar 2025 09:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DHaJAgb84V8aMUutZwPQWCAxCUaidjZX4yslhRdqYrw=; b=crMTMsktpmX46mPV9ZG4YxZrk0 LCgRxeVzaLC8RtKrwJVWPZt6nePLcsw2CeJnndeXeXaA+wF04rUnwQYY3AkYtEfWP7s8J+wMXQlw9 rRuRcN1u5rGqo3W/zSyD0ofuwTgcbYlRLWiiPFIAg8XD71xzwLAmTc+bnAC4GRmulJDXd6fq9iLnD ywL7QINUzl+rmJEvgdzKev6rSOSXm8ePZHVDYYCBUforM7O1No5G4hwpdbpbV2AWGLnHKnsIhO9Ag rFvOQ4wxkdYk6xN4KzFRMNzW8pl0rYWuZOTvACTpaQICwU1znL39afZ0w4/P8OE+EliNtgEMaXtzM EGosT1Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIme-000000082Zm-1bEv; Wed, 12 Mar 2025 09:53:52 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUt-00000007zZa-34xS; Wed, 12 Mar 2025 09:35:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=DHaJAgb84V8aMUutZwPQWCAxCUaidjZX4yslhRdqYrw=; b=GlEk33Gr20vSQ1U/WmZQrUvuv4 0wDgnVjVs5p2U4+9QqvOdo29ivNfG8tpPmwqAJ3TlwxDkf6CKj8ozDOszGu/VW+v5KJ1UFEqPRzhf nvxvTMqC1x046wdSql8UQ9fO6HdNLVb6zvBujE6N+gqYIUcitejlCclEmnzk1oFn+EdRIJP2em33O NmeEKc+J8NovkCCW7t+BL6hFGG926PWwkmr3GQNiAe/8MShwmEMDK554o5bebfA+HCLSj2Jy/crSU 6jZq/Kw8oEAR6icqV41hrhcy7vuzVLYQq5BlQR1CgqxxONYlmr0ZiwRwXBFk4q+HGfK6qnEaTyNX6 a0pobD+Q==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:38172 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUY-0005I1-0p; Wed, 12 Mar 2025 09:35:10 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsIUA-005vGX-8A; Wed, 12 Mar 2025 09:34:46 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring , Samin Guo Subject: [PATCH net-next v2 5/7] ARM: dts: stm32: remove "snps,en-tx-lpi-clockgating" property MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:46 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023531_770229_4A341E46 X-CRM114-Status: GOOD ( 10.14 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. As commit "net: stmmac: stm32: use PHY capability for TX clock stop" adds the flag to use the PHY capability, remove the DT property that is now unecessary. Cc: Samin Guo Signed-off-by: Russell King (Oracle) --- arch/arm/boot/dts/st/stm32mp151.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/st/stm32mp151.dtsi b/arch/arm/boot/dts/st/stm32mp151.dtsi index b9a87fbe971d..0daa8ffe2ff5 100644 --- a/arch/arm/boot/dts/st/stm32mp151.dtsi +++ b/arch/arm/boot/dts/st/stm32mp151.dtsi @@ -1781,7 +1781,6 @@ ethernet0: ethernet@5800a000 { st,syscon = <&syscfg 0x4>; snps,mixed-burst; snps,pbl = <2>; - snps,en-tx-lpi-clockgating; snps,axi-config = <&stmmac_axi_config_0>; snps,tso; access-controllers = <&etzpc 94>; From patchwork Wed Mar 12 09:34:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013336 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 7B2A1C28B28 for ; Wed, 12 Mar 2025 11:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=66r/Df/WRe1wVFnyIOw0GOt/Z4fFGvLuV3Qb0yAd/5Y=; b=TgcP+F3nX6/g0ecbeI/l2S4zli RcAmd3xXsHSXVJALaYxtBzcjHQkETGp1S2crj2sHv7CfJ/GLRNIkgCcTGyjspPlxM9XFp97t6NF54 IrOKinC6UkgKB+ACbU3JZawvSuEtB/HcKWN4FvkNanb813gV6m9AUSZGs4eBMCh/RxJC9xg96IhO9 fgiz/iYOxptjhOHfxmOF9YVQBNLyY1I2UlGNbyeBTn1tDfHW3AhUbBN+YM0o+AYN57ahZrlw+CWQt JKQM6bDpiW/IU0idvgXn8ii6sxTT8riG/CgOdfj2FGWHILk7/tkXCSWnJGBt6tbX4gN+0FLffgsTb 8j2jExGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsJuD-00000008CrM-27AC; Wed, 12 Mar 2025 11:05:45 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIUy-00000007zbZ-0ZDD; Wed, 12 Mar 2025 09:35:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=66r/Df/WRe1wVFnyIOw0GOt/Z4fFGvLuV3Qb0yAd/5Y=; b=tG6i5Av6LflwHt6a2VdGms32kA Tq7GZ5d//QSr++0OPfvaJS5d14Y9OmDTYUUoluxyruiNXCudNteoiJ57l/BdT71/uufNJrzZREk1T ISrh1iSSfukOCYhBmA1EnAAcrtobqpYApUEDEGRptmLvtmeCoWKfn5NHa9XSdInSM6z6f/o7dJVvA GXT2TgOPhEduvQaqyXUl4mU3gykx7v2cYcGbKBhoYBzcUegwaqfTmOuys2sZ+Vmfft5Hado7ic9Jk z9sivj9nhlis33jmHlZK+18xqriYfm+De+m5fjnGv1/ux6pdhPt7tlXGnT1d9xWWXOX35au87pAjW EIHpU59A==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:42840 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUb-0005IH-02; Wed, 12 Mar 2025 09:35:13 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsIUF-005vGd-C5; Wed, 12 Mar 2025 09:34:51 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring Subject: [PATCH net-next v2 6/7] dt-bindings: deprecate "snps,en-tx-lpi-clockgating" property MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:51 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023536_172305_5874CCCA X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Therefore, snps,en-tx-lpi-clockgating is technically incorrect, so this commit deprecates the property in the binding. Acked-by: Rob Herring (Arm) Reviewed-by: Lad Prabhakar Signed-off-by: Russell King (Oracle) --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 3f0aa46d798e..78b3030dc56d 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -494,6 +494,7 @@ title: Synopsys DesignWare MAC snps,en-tx-lpi-clockgating: $ref: /schemas/types.yaml#/definitions/flag + deprecated: true description: Enable gating of the MAC TX clock during TX low-power mode From patchwork Wed Mar 12 09:34:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 14013255 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 D3735C28B28 for ; Wed, 12 Mar 2025 09:57:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=coDruLhzUwUWr9PQ9J/pkDgkm+WduLU7r2hwaAyS0V4=; b=RmCnv237QiX5xYQrmaZpRe8g2z OQyU0tFtAvA5mfqMgvuNsc9Ahc1sF5PLQ5FqP6qVpNBB9kKXEBp2BZkjM0Nk8G/8A9lJARUkJTlaB bOUTB5ANOdCgd4DD6LhvoJJC8Ez3OaQqfF4f3+1ftem0cP5J1kX7XA0gXRYNLls0f1rmfdm0NVrwq /1V366F1zbUH9icVJAOz8bbAMPpZsKpz70cOScgP3aI9ina/KB92nksQgdOSQ+Uebd1dNEECYzTM8 9sbADXCNP7FeffTG5Kt52QuAw0QTxgsKhH0y5r10t2YrRlvUtC7/VrLYDhu70x2OBvf3GVgVM8BCo xwz6hiZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsIps-000000083Cf-3jof; Wed, 12 Mar 2025 09:57:12 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsIV1-00000007zdc-3ucj; Wed, 12 Mar 2025 09:35:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=coDruLhzUwUWr9PQ9J/pkDgkm+WduLU7r2hwaAyS0V4=; b=l38TbMDTtPijQLznVdXj9eUSID TXt78Gu7RakE9elMNI1mHpUmrCgm5/3bcl5H24UbxTmu1TLZ6m3qY5r2KpyIKdkNfpkB0whgy3InQ OVOGqdKoQQpfFJNy6wXOtGshaQgfPEJgIUBxCii7pdLlQ9v/IoICsNead6z3Co52C+rNPx7ix8/cU efEWjXjWPyiBVn9LCkCjZ9Zqr4rjEjNHAr96iAomHz8qTf1Ar1w0KHwCEA/BnRCEAEMFOCP+kRmiH 7H7NQmceeb1piiH4O4S5WTs53KwPr9P2azvAfEzgoXOVx8zHtlcRbDeCh1BRd9zNX9yuJdfytPWVq 52ML+odA==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:42846 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIUi-0005Ie-08; Wed, 12 Mar 2025 09:35:20 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tsIUK-005vGk-H7; Wed, 12 Mar 2025 09:34:56 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Albert Ou , Alexandre Ghiti , Alexandre Torgue , Andrew Lunn , Conor Dooley , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Emil Renner Berthing , Eric Dumazet , Giuseppe Cavallaro , Jakub Kicinski , Jose Abreu , Krzysztof Kozlowski , Lad Prabhakar , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Minda Chen , netdev@vger.kernel.org, Palmer Dabbelt , Paolo Abeni , Paul Walmsley , Rob Herring Subject: [PATCH net-next v2 7/7] net: stmmac: deprecate "snps,en-tx-lpi-clockgating" property MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Wed, 12 Mar 2025 09:34:56 +0000 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250312_023539_971283_5B9E9580 X-CRM114-Status: GOOD ( 14.16 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Whether the MII transmit clock can be stopped is primarily a property of the PHY (there is a capability bit that should be checked first.) Whether the MAC is capable of stopping the transmit clock is a separate issue, but this is already handled by the core DesignWare MAC code. Therefore, snps,en-tx-lpi-clockgating is technically incorrect, and this commit adds a warning should a DT be encountered with the property present. However, we keep backwards compatibility. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8dc3bd6946c6..c73eff6a56b8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -497,8 +497,11 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) plat->force_sf_dma_mode = of_property_read_bool(np, "snps,force_sf_dma_mode"); - if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating")) + if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating")) { + dev_warn(&pdev->dev, + "OF property snps,en-tx-lpi-clockgating is deprecated, please convert driver to use STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP\n"); plat->flags |= STMMAC_FLAG_EN_TX_LPI_CLOCKGATING; + } /* Set the maxmtu to a default of JUMBO_LEN in case the * parameter is not present in the device tree.