From db5eaa4e3bb45bffeb4569c1cc2e4fe2fd4b9024 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 28 Oct 2020 19:32:46 +0000 Subject: Fixes for AllWinner wired network issues due to Realtek PHY driver change (rhbz 1889090) --- ...ino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch (limited to 'ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch') diff --git a/ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch b/ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch new file mode 100644 index 000000000..d3dfe92c5 --- /dev/null +++ b/ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch @@ -0,0 +1,132 @@ +From patchwork Sun Oct 25 14:01:44 2020 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Adam Sampson +X-Patchwork-Id: 11855267 +Return-Path: + +X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on + aws-us-west-2-korg-lkml-1.web.codeaurora.org +X-Spam-Level: +X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, + DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, + MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, + USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 +Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) + by smtp.lore.kernel.org (Postfix) with ESMTP id D1D99C388F7 + for ; + Sun, 25 Oct 2020 14:04:02 +0000 (UTC) +Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by mail.kernel.org (Postfix) with ESMTPS id 539B92225E + for ; + Sun, 25 Oct 2020 14:04:02 +0000 (UTC) +Authentication-Results: mail.kernel.org; + dkim=pass (2048-bit key) header.d=lists.infradead.org + header.i=@lists.infradead.org header.b="pKL4zMU1" +DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 539B92225E +Authentication-Results: mail.kernel.org; + dmarc=fail (p=none dis=none) header.from=offog.org +Authentication-Results: mail.kernel.org; + spf=none + smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; + d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: + Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: + List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=Smw7tRUwTAlV9zXVX1uVl3+PN3QebXDyiZrExxBSCPU=; b=pKL4zMU1LMKGyGrnNBuRIJVlPn + yMf8/tMv8w7BT/mMtZkxY22WUlN4IpqNLAx1mdiIa5VUVbVpdsXYWYdSWaUvJe24nyJi8NycxIoO8 + 168UTytxMlzI5F18yr9bXZ79rSRW+/P0zQbb+OQPMPbJPNb1RusFtve8WGNCkqlOWUOpiVQqPFPJ9 + hGhOsDJhXjep7y7HNpu7+UBYvZInmOOrAS079WoEc1jX4u6zDXt0ox24r0Fcc8wnVpsWpGxPhb0xZ + uZtguJOo2ItQdeT/6OfafjzV15qXfPGK+148ny4vyOvgHNvJX88R6RBIxqUdvQzoh10GTlb76K45i + Gfx5ufkA==; +Received: from localhost ([::1] helo=merlin.infradead.org) + by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) + id 1kWgb2-0000uB-6w; Sun, 25 Oct 2020 14:02:08 +0000 +Received: from a-painless.mh.aa.net.uk ([2001:8b0:0:30::51] + helo=alt.a-painless.mh.aa.net.uk) + by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) + id 1kWgaz-0000tq-Kq + for linux-arm-kernel@lists.infradead.org; Sun, 25 Oct 2020 14:02:06 +0000 +Received: from cartman.offog.org ([2001:8b0:83b:b53f::a]) + by a-painless.mh.aa.net.uk with esmtps + (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) + (envelope-from ) + id 1kWgay-0001oV-R0; Sun, 25 Oct 2020 14:02:04 +0000 +Received: from ats by cartman.offog.org with local (Exim 4.94) + (envelope-from ) + id 1kWgao-0007UQ-4s; Sun, 25 Oct 2020 14:01:54 +0000 +From: Adam Sampson +To: linux-sunxi@googlegroups.com, devicetree@vger.kernel.org, + linux-arm-kernel@lists.infradead.org +Subject: [PATCH] ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on + PHY +Date: Sun, 25 Oct 2020 14:01:44 +0000 +Message-Id: <20201025140144.28693-1-ats@offog.org> +X-Mailer: git-send-email 2.29.1 +MIME-Version: 1.0 +X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 +X-CRM114-CacheID: sfid-20201025_100205_812453_7FAF68C8 +X-CRM114-Status: GOOD ( 13.85 ) +X-BeenThere: linux-arm-kernel@lists.infradead.org +X-Mailman-Version: 2.1.29 +Precedence: list +List-Id: +List-Unsubscribe: + , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: + , + +Cc: Adam Sampson +Sender: "linux-arm-kernel" +Errors-To: + linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org + +The RX/TX delays for the Ethernet PHY on the Linksprite pcDuino 3 Nano +are configured in hardware, using resistors that are populated to pull +the RTL8211E's RXDLY/TXDLY pins low or high as needed. + +phy-mode should be set to rgmii-id to reflect this. Previously it was +set to rgmii, which used to work but now results in the delays being +disabled again as a result of the bugfix in commit bbc4d71d6354 ("net: +phy: realtek: fix rtl8211e rx/tx delay config"). + +Tested on two pcDuino 3 Nano boards purchased in 2015. Without this fix, +Ethernet works unreliably on one board and doesn't work at all on the +other. + +Fixes: 061035d456c9 ("ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board") +Signed-off-by: Adam Sampson +Reviewed-by: Andrew Lunn +--- + arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +index fce2f7fcd084..bf38c66c1815 100644 +--- a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts ++++ b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +@@ -1,5 +1,5 @@ + /* +- * Copyright 2015 Adam Sampson ++ * Copyright 2015-2020 Adam Sampson + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual +@@ -115,7 +115,7 @@ &gmac { + pinctrl-names = "default"; + pinctrl-0 = <&gmac_rgmii_pins>; + phy-handle = <&phy1>; +- phy-mode = "rgmii"; ++ phy-mode = "rgmii-id"; + status = "okay"; + }; + -- cgit