From patchwork Fri Jul 5 07:59:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13724505 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 6240EC30658 for ; Fri, 5 Jul 2024 08:00:02 +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:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=LUMN2EorVK9ZKjl3nYk8pUQwq1AjgjHL4pNrj0IYSJw=; b=v7J9F9R+XkXBPlg+AQqVe3pLVq C7sSWgwnPM1aMyCIIvahIehJdq4n4MbanDWwodFHs0ZpAmfCs35ZtSf2SJ5ZG8Bw/CBndMGO4NgGM tnYbLOFfeFurgOunfTRHhmyVpt7GPzQMsK/6wJ3UP1mUq8pHc4yylJFMLxAjw565bifHJe46BWFV1 9KmsruWAWr2filQ5IlgX+JXrzn3bg4OrAexcU2OP+gxs2030D4hEm3hr2OpkCch8c+rnxbLG/Kdjh e2BvuYhllb5j77ECh+WG2Z7JeBgUMOomU2XJhbYPnD0zg5CcQQp60fVhH2iBx6il1HmqfZcm8spyJ 5BXlDySg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPdrE-0000000FDSZ-1giY; Fri, 05 Jul 2024 07:59:52 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPdqy-0000000FDNp-3wq8 for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2024 07:59:39 +0000 Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5AB7488582; Fri, 5 Jul 2024 09:59:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1720166374; bh=LUMN2EorVK9ZKjl3nYk8pUQwq1AjgjHL4pNrj0IYSJw=; h=From:To:Cc:Subject:Date:From; b=JZcAVWx0EAJd042yS0KXafKStaPIkXd11HVdsa+14pkHeP0Mgx+nkkGu4gf8x95I2 VByYH7+UQriML715NLCPSbOVlSji1cKmujUYFzu0k3QrQJWiGyfdksMp80LTgxvabu OEBobzv/5MINoNxVYmg324G5/Ikhtr3argMQ6t5tTUNNosfSTuIrtryfiR0vkGYBsh qQUJTeHITexGPp0nyFcmNEl5upHXL9/nReHQoeuiqimD+5jN4TNpXKq2b8EZJ9uerF e4X1NRGoag6GfLIm/acYymsC/xVAqfEph2TaXfNG98mTTbSXLzrUZ0E69A6rUbcNsD 4qGNfH+IGQkKA== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: kernel@dh-electronics.com, Marek Vasut , Alexandre Torgue , Christophe Roullier , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2] ARM: dts: stm32: Keep MDIO bus in AF across suspend DH STM32MP13xx DHCOR DHSBC board Date: Fri, 5 Jul 2024 09:59:10 +0200 Message-ID: <20240705075918.41213-1-marex@denx.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240705_005937_481531_05A770B4 X-CRM114-Status: GOOD ( 11.57 ) 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 The RTL8211F PHY gets confused when the MDIO bus lines get switched to ANALOG during suspend/resume cycle. Keep the MDIO and MDC lines in AF during suspend/resume to avoid confusing the PHY. The PHY can be brought out of the confused state by restarting auto-negotiation too, but that seems like an odd workaround and shouldn't be in the PHY driver. Signed-off-by: Marek Vasut --- Cc: Alexandre Torgue Cc: Christophe Roullier Cc: Conor Dooley Cc: Krzysztof Kozlowski Cc: Maxime Coquelin Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: kernel@dh-electronics.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com --- V2: Fixup the eth2_rgmii_sleep_pins_a into AF as well --- arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi b/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi index ca19c8c6b6771..62c64e9c2b9f0 100644 --- a/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi +++ b/arch/arm/boot/dts/st/stm32mp13-pinctrl.dtsi @@ -94,14 +94,20 @@ pins2 { /omit-if-no-ref/ eth1_rgmii_sleep_pins_a: eth1-rgmii-sleep-0 { pins1 { + pinmux = , /* ETH_MDIO */ + ; /* ETH_MDC */ + bias-disable; + drive-push-pull; + slew-rate = <2>; + }; + + pins2 { pinmux = , /* ETH_RGMII_TXD0 */ , /* ETH_RGMII_TXD1 */ , /* ETH_RGMII_TXD2 */ , /* ETH_RGMII_TXD3 */ , /* ETH_RGMII_TX_CTL */ , /* ETH_RGMII_GTX_CLK */ - , /* ETH_MDIO */ - , /* ETH_MDC */ , /* ETH_RGMII_RXD0 */ , /* ETH_RGMII_RXD1 */ , /* ETH_RGMII_RXD1 */ @@ -178,14 +184,20 @@ pins2 { /omit-if-no-ref/ eth2_rgmii_sleep_pins_a: eth2-rgmii-sleep-0 { pins1 { + pinmux = , /* ETH_MDIO */ + ; /* ETH_MDC */ + bias-disable; + drive-push-pull; + slew-rate = <2>; + }; + + pins2 { pinmux = , /* ETH_RGMII_TXD0 */ , /* ETH_RGMII_TXD1 */ , /* ETH_RGMII_TXD2 */ , /* ETH_RGMII_TXD3 */ , /* ETH_RGMII_TX_CTL */ , /* ETH_RGMII_GTX_CLK */ - , /* ETH_MDIO */ - , /* ETH_MDC */ , /* ETH_RGMII_RXD0 */ , /* ETH_RGMII_RXD1 */ , /* ETH_RGMII_RXD2 */