kernel/ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch

133 lines
6.2 KiB
Diff

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 <ats@offog.org>
X-Patchwork-Id: 11855267
Return-Path:
<SRS0=8R9C=EA=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
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 <linux-arm-kernel@archiver.kernel.org>;
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 <linux-arm-kernel@archiver.kernel.org>;
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 <ats@offog.org>)
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 <ats@offog.org>)
id 1kWgao-0007UQ-4s; Sun, 25 Oct 2020 14:01:54 +0000
From: Adam Sampson <ats@offog.org>
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: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Adam Sampson <ats@offog.org>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
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 <ats@offog.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
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 <ats@offog.org>
+ * Copyright 2015-2020 Adam Sampson <ats@offog.org>
*
* 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";
};