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