From patchwork Tue Mar 8 13:06:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1602996 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Nqq/06uB; dkim=fail reason="key not found in DNS" header.d=true.cz header.i=@true.cz header.a=rsa-sha256 header.s=xnet header.b=WvceuLxE; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KCbJ327SDz9s2R for ; Wed, 9 Mar 2022 00:09:07 +1100 (AEDT) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=702fPLlFpbAvWmsfQtJ49/v7bUtkcNuj8SgZA06Ggm8=; b=Nqq/06uBAjOpYO rFoisppp1PEzcmFYYzjCIKfNx3CnTwlD+3j2K+OGoFwaiNutVFFHKoqmW7+xYDHXL6P9kkE0gcf5s JC5/wt+V+8CtI6u1IUSGORFE3rKEbjc/Aur8v2HnunZ+KpBiVfp86RuLzDIOXgI/WoTHjaYS+8cr/ +aGxIv/JZfZ0t3ADF5r/P/nH13eHpTgWNKw+XrZEv3BYFT5QxmLe/ykqVBFQ5kB/qxOs6wmU3Qi+P dqSvKt2Smf1MySYNrjNj7L9SR16KY3uaCZjfABgI63J9jD3ZBGxRF3YjqM2AA2+DY4nFzjp8cbBGL igRGjEOqd08PglU+6e/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRZXq-004S3E-8N; Tue, 08 Mar 2022 13:06:30 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRZXm-004S22-L0 for openwrt-devel@lists.openwrt.org; Tue, 08 Mar 2022 13:06:28 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id CEA603F8E; Tue, 8 Mar 2022 14:06:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1646744783; bh=DBc9hpR8eLkFKjeKq9n++Ebxhf3J+gVaLvNela3tLJ0=; h=From:To:Cc:Subject:Date; b=WvceuLxES2pVS9nJrstwuarDKHYNfFVfXQVMYj0wTnQB9q/s3i8DEB2xK2eR+/mX7 E3+kzaC4DorIdsWAU8qKpYaEEpUZQtlYoN2liZMYQj288zFAOGmDMFG2ElyEZJW0MV qiTuqQUcUZTccDeIe5q0dIPsMEV6KiZoN5FxT/LI= Received: by meh.true.cz (OpenSMTPD) with ESMTP id f63ca5d6; Tue, 8 Mar 2022 14:05:59 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Subject: [PATCH 1/2] sunxi: cortexa7: fix ethernet link detection on a20-olinuxino-lime2 Date: Tue, 8 Mar 2022 14:06:16 +0100 Message-Id: <20220308130617.28021-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_050626_858132_9357A938 X-CRM114-Status: GOOD ( 11.09 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: a20-olinuxino-lime2 is currently having hard time with link detection of certain 1000Mbit partners due to usage of generic PHY driver, probably due to following missing workaround introduced in upstre [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org a20-olinuxino-lime2 is currently having hard time with link detection of certain 1000Mbit partners due to usage of generic PHY driver, probably due to following missing workaround introduced in upstream in commit 3aed3e2a143c ("net: phy: micrel: add Asym Pause workaround"): The Micrel KSZ9031 PHY may fail to establish a link when the Asymmetric Pause capability is set. This issue is described in a Silicon Errata (DS80000691D or DS80000692D), which advises to always disable the capability. This patch implements the workaround by defining a KSZ9031 specific get_feature callback to force the Asymmetric Pause capability bit to be cleared. This fixes issues where the link would not come up at boot time, or when the Asym Pause bit was set later on. As a20-olinuxino-lime2 has Micrel KSZ9031RNXCC-TR Gigabit PHY since revision H we need to use Micrel PHY driver on those devices. Fixes #9153 Signed-off-by: Petr Štetiar --- target/linux/sunxi/cortexa7/config-5.10 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/sunxi/cortexa7/config-5.10 b/target/linux/sunxi/cortexa7/config-5.10 index e77f4d872fba..c3ceb99c3d23 100644 --- a/target/linux/sunxi/cortexa7/config-5.10 +++ b/target/linux/sunxi/cortexa7/config-5.10 @@ -5,6 +5,7 @@ CONFIG_GRO_CELLS=y # CONFIG_MACH_SUN4I is not set # CONFIG_MACH_SUN5I is not set CONFIG_MDIO_BUS_MUX=y +CONFIG_MICREL_PHY=y CONFIG_MUSB_PIO_ONLY=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y From patchwork Tue Mar 8 13:06:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1602997 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Vm+CUitJ; dkim=fail reason="key not found in DNS" header.d=true.cz header.i=@true.cz header.a=rsa-sha256 header.s=xnet header.b=KvU+qHav; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KCbJ43K38z9s2R for ; Wed, 9 Mar 2022 00:09:08 +1100 (AEDT) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nvA3bt9aXubiuGG6Un7ZASsfTZS25zGDSFRnvAX4Dzk=; b=Vm+CUitJ9qgL8S x96i7kAEYMBuZzM1hUKXFAsG8w/0iyjNPZav2iiWLQn4PXyIcSVwV0tGIRK/Z9O+s+B6K2yqFVG8v mN5d1SXrdqcvS91qpYncjncg2WINfUfq1I+RwNqMneWdYSnI+ZaMA9h2OR69qRPo879gb0nuni4h6 lqybKXz6FRpKQ5Y8x9FAwf8GaZtCCVECMMxkZIiPal8bWPAtgwcigvCvr22RMJCDt2bDI6xZi5Q0S aoXMUgV/FuYVu6GqfPk/TvGFPTghHcYbuv6/s5awVKkV5KI7f+MqcmvwiwjQdxSQAfif0TwVo8AEp RVOLfN/7oHHgLHDJoWBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRZY3-004S5H-2x; Tue, 08 Mar 2022 13:06:43 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRZXn-004S2P-D5 for openwrt-devel@lists.openwrt.org; Tue, 08 Mar 2022 13:06:29 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 0786E3F8F; Tue, 8 Mar 2022 14:06:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1646744786; bh=BI8Yj0C0TXMtR5JJRDa+hJbQR77mqPmW/MPXlcTt2vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KvU+qHavoXBReB2bF+KayMQhRqNKkAs3KrGHSPY7ps0BnGoqD/Jp2Cx6UA4/WvWUO aVovycnSmWHGfMeENJFiLWsNLCrzPsx2Mg2N6zhQ3rGGM+cSNN5O3OhtLv2155GAJz ZnAufl7AWoC0vkkGjE/tlnjIkOdmeaJLaOooM3to= Received: by meh.true.cz (OpenSMTPD) with ESMTP id de4a418f; Tue, 8 Mar 2022 14:06:01 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Subject: [PATCH 2/2] sunxi: cortexa7: fix ethernet on a20-olinuxino-lime2 Date: Tue, 8 Mar 2022 14:06:17 +0100 Message-Id: <20220308130617.28021-2-ynezz@true.cz> In-Reply-To: <20220308130617.28021-1-ynezz@true.cz> References: <20220308130617.28021-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220308_050627_613237_D5190EA4 X-CRM114-Status: GOOD ( 12.32 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This reverts upstream commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 as it breaks network on my A20-olinuxino-lime2 hardware revision "K" which has Micrel KSZ9031RNXCC-TR Gigabit PHY. Bastien has pro [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This reverts upstream commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 as it breaks network on my A20-olinuxino-lime2 hardware revision "K" which has Micrel KSZ9031RNXCC-TR Gigabit PHY. Bastien has probably some previous hardware revisions which were based on RTL8211E-VB-CG1 PHY and thus this fix was working on his board. Fixes #9153 References: https://lore.kernel.org/all/20220308125531.27305-1-ynezz@true.cz/ Signed-off-by: Petr Štetiar --- ...un7i-A20-olinuxino-lime2-Fix-etherne.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 target/linux/sunxi/patches-5.10/500-Revert-ARM-dts-sun7i-A20-olinuxino-lime2-Fix-etherne.patch diff --git a/target/linux/sunxi/patches-5.10/500-Revert-ARM-dts-sun7i-A20-olinuxino-lime2-Fix-etherne.patch b/target/linux/sunxi/patches-5.10/500-Revert-ARM-dts-sun7i-A20-olinuxino-lime2-Fix-etherne.patch new file mode 100644 index 000000000000..d776e62ab5ab --- /dev/null +++ b/target/linux/sunxi/patches-5.10/500-Revert-ARM-dts-sun7i-A20-olinuxino-lime2-Fix-etherne.patch @@ -0,0 +1,37 @@ +From faad85a9b02227d40d02324190add26e2c8ac276 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0tetiar?= +Date: Tue, 8 Mar 2022 13:45:44 +0100 +Subject: [PATCH] Revert "ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet + phy-mode" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit 55dd7e059098ce4bd0a55c251cb78e74604abb57 as it +breaks network on my A20-olinuxino-lime2 hardware revision "K" which has +Micrel KSZ9031RNXCC-TR Gigabit PHY. Bastien has probably some previous +hardware revisions which were based on RTL8211E-VB-CG1 PHY and thus this +fix was working on his board. + +Cc: stable@vger.kernel.org +Cc: Bastien Roucariès +References: https://github.com/openwrt/openwrt/issues/9153 +References: https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt +Signed-off-by: Petr Štetiar +--- + arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +index ecb91fb899ff..8077f1716fbc 100644 +--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts ++++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +@@ -112,7 +112,7 @@ &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; + phy-handle = <&phy1>; +- phy-mode = "rgmii-id"; ++ phy-mode = "rgmii"; + status = "okay"; + }; +