Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp37059rdb; Wed, 20 Dec 2023 05:48:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlmx1IlykcUhAIHpeyixvFbeFSX7/DJdxItdF8Ga9K5c6Cn2DFn30z75TMLOTXa2JsKV2F X-Received: by 2002:a05:6214:202f:b0:67f:27b6:9bb7 with SMTP id 15-20020a056214202f00b0067f27b69bb7mr11326257qvf.45.1703080121182; Wed, 20 Dec 2023 05:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703080121; cv=none; d=google.com; s=arc-20160816; b=PiL3km2bZnu7nLO/RyRrFCeWhOCSeEaiM4aOzVmHRej33CkcCoRcfR8g8aj2ZRXL8Y Eq9SktnxiaPlfW0W0OSOSC7ZUNgVbsmXrBgZm+dlPW/ATU9qi5lTy6lh3VKU1UPnfS0F WOIj4gMlKlBHtuZ4DpSeTNAyQP2aflLsDfjCshJqY6bLjR6KCc7n5V/aORQsU08YN1eE LdFlIdbYt1bgInufq4erzmqVPrsRSpDjbLMgpKevJ4B/mxPQ5SktMU+cOdBPpShwqRLK idbs7JrSgFYFi3lIMTBREZX49PhbMvPDFxfdv3nikUX3YWCR/GqgXy91YHVskfxGv0XI Ox4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:from :dkim-signature; bh=Wf8bdqHDddS6qx2uHaD55Uu+LiLQy0d/grCj6aFu9Gk=; fh=Jyj4M11pJ2rGazHklIGngNiX+IoqClrsQrs+Sp7SdaQ=; b=L+LDOzaDQZdacVSYGwdxLEfdbEN3E0rNxQbLqPsSsEAwYB1iw4PmHdZMhebY1+xO6E 0qrI42KEuNAkDus4QqSyhPS1T6e9ql8ex2HstyMEl8SZz+3b3HVDD+OLdqCaugaGUsBp 9rvtzU+Sbh40cpkWS8e/5qKXMVCUcchJWWVMnoc6BpOm4+WAX74C+iEFSJVlHY8LvSFO fk3y+14AAyPCiOFn7Wy6A/I/kN2BQbG4gKVAfib5po9BCIUvnQ1HyThXJFYQBX7a0PG8 DSbvIzUKKmEE+4mkOs1wzLCdPRbqal+DyK83MZA+20f/tqSRryLcs1tTxjpoNoCmsCYW 86Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=v6sb8UKr; spf=pass (google.com: domain of linux-kernel+bounces-6988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d18-20020a0cb2d2000000b0067f27aa2837si10189327qvf.361.2023.12.20.05.48.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 05:48:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=v6sb8UKr; spf=pass (google.com: domain of linux-kernel+bounces-6988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9D4591C22313 for ; Wed, 20 Dec 2023 13:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52AB238DE7; Wed, 20 Dec 2023 13:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="v6sb8UKr" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E01F2381CA for ; Wed, 20 Dec 2023 13:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 2E0173F2C1 for ; Wed, 20 Dec 2023 13:48:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1703080089; bh=Wf8bdqHDddS6qx2uHaD55Uu+LiLQy0d/grCj6aFu9Gk=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=v6sb8UKrkMrX9XqrfNjORAFlrEzG8f9yApgLKydLqLa2LqNVeEc0xSNWXp4aGr8tm RThnzaCJyvWyJ9os4TJ8KvVbXmI7+RrLf11Yb0JkcUiI+rQs9+Xm4CbAAbTJOyoHav KTkqnwYLBBKqsTIJDWlBdmfvsSWTR6keDzRTJdMXESJXG1N8h/VQuhORKmonLOP0kT U7FsMx5PQq1zB1Qqkv0d75OytNxM41IcshkaSq7NXcGtW7TgggxUsgAV87a0gtypWw EzErnDnX9wAqj3FNFJBYvfa3UCTkTKDtVvqogT4WabmLETvLlnWO0AxoPANgrv2OE5 Q4B1rTkVnO3Zg== Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-6dbad18d6d5so363638a34.1 for ; Wed, 20 Dec 2023 05:48:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703080088; x=1703684888; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wf8bdqHDddS6qx2uHaD55Uu+LiLQy0d/grCj6aFu9Gk=; b=BsKrSRNBue8XCecFAl3j/5fCH6F+tpUbgtkzvz64EjIyyTocXHr9vK8BV1tylfxhWh cJoWKWw+j1X/1LqCF+l95udh40yrn2+eWfa4c561GbP2tQnup5avpGi6X59soeUD3hmn 9D9tCuJqiTnO4h3qsicmas+Fh6jw7EKrnzay6orGnsUDpi6eqtNJRgKPbUaUDvvH1PEA 8sZH4L1VAR/0Ua3rhf6mIk0D22X7oiPkbMUvTclScRWbT4/vIzIoKMWRT6zhSv7cihq4 n+ZoJQqy79gAXWUu60VcXGiPVheQG7mQGMPuBsAepfOkLTvMrCFak7qIE9REE2ccg2Qx P75w== X-Gm-Message-State: AOJu0YwXGmnQutbEDoKe4WXVUfL0H3LRjDyXNdWcJhkpkN213gcpJuAk KJkfGlWCvjpwYTT1CIHA+DZg6IOtUGqpSBHXmtpZpD0GkjRvZoNPAb/qxMOzztH0tfIDF1dPUyt 2fC7/aYfMPaOGbbKGte86zR/qP3AWOr491szcS+hBYcXvrDPCr4hVnrP2mw== X-Received: by 2002:a05:6830:3446:b0:6db:b23a:b416 with SMTP id b6-20020a056830344600b006dbb23ab416mr98112otu.21.1703080087908; Wed, 20 Dec 2023 05:48:07 -0800 (PST) X-Received: by 2002:a05:6830:3446:b0:6db:b23a:b416 with SMTP id b6-20020a056830344600b006dbb23ab416mr98097otu.21.1703080087626; Wed, 20 Dec 2023 05:48:07 -0800 (PST) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Wed, 20 Dec 2023 05:48:07 -0800 From: Emil Renner Berthing In-Reply-To: <20231220004638.2463643-4-cristian.ciocaltea@collabora.com> References: <20231220004638.2463643-1-cristian.ciocaltea@collabora.com> <20231220004638.2463643-4-cristian.ciocaltea@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Date: Wed, 20 Dec 2023 05:48:07 -0800 Message-ID: Subject: Re: [PATCH v5 3/4] riscv: dts: starfive: visionfive-v1: Setup ethernet phy To: Cristian Ciocaltea , Emil Renner Berthing , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Richard Cochran , Andrew Lunn , Jacob Keller Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kernel@collabora.com, Emil Renner Berthing Content-Type: text/plain; charset="UTF-8" Cristian Ciocaltea wrote: > The StarFive VisionFive V1 SBC uses a Motorcomm YT8521 PHY supporting > RGMII-ID, but requires manual adjustment of the RX internal delay to > work properly. > > The default RX delay provided by the driver is 1.95 ns, which proves to > be too high. Applying a 50% reduction seems to mitigate the issue. > > Also note this adjustment is not necessary on BeagleV Starlight SBC, > which uses a Microchip PHY. Hence, there is no indication of a > misbehaviour on the GMAC side, but most likely the issue stems from > the Motorcomm PHY. > > While at it, drop the redundant gpio include, which is already provided > by jh7100-common.dtsi. > > Co-developed-by: Emil Renner Berthing > Signed-off-by: Emil Renner Berthing > Signed-off-by: Cristian Ciocaltea > Reviewed-by: Jacob Keller > Reviewed-by: Andrew Lunn > --- > .../jh7100-starfive-visionfive-v1.dts | 22 ++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts > index e82af72f1aaf..4e396f820660 100644 > --- a/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts > +++ b/arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dts > @@ -6,7 +6,6 @@ > > /dts-v1/; > #include "jh7100-common.dtsi" > -#include > > / { > model = "StarFive VisionFive V1"; > @@ -18,3 +17,24 @@ gpio-restart { > priority = <224>; > }; > }; > + > +/* > + * The board uses a Motorcomm YT8521 PHY supporting RGMII-ID, but requires > + * manual adjustment of the RX internal delay to work properly. The default > + * RX delay provided by the driver (1.95ns) is too high, but applying a 50% > + * reduction seems to mitigate the issue. > + * > + * It is worth noting the adjustment is not necessary on BeagleV Starlight SBC, > + * which uses a Microchip PHY. Hence, most likely the Motorcomm PHY is the one > + * responsible for the misbehaviour, not the GMAC. > + */ > +&mdio { > + phy: ethernet-phy@0 { > + reg = <0>; > + rx-internal-delay-ps = <900>; > + }; > +}; > + > +&gmac { > + phy-handle = <&phy>; > +}; Alphabetical ordering here, please. /Emil