Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp76606rdb; Wed, 20 Dec 2023 06:46:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbIFHwuvqOoerh1OzB5+K39pQTx0c9q5dDf/rgPp8WwxRu9uhafCeQOdxnVQLNDSLXMf1i X-Received: by 2002:ac8:5aca:0:b0:425:4043:8d4c with SMTP id d10-20020ac85aca000000b0042540438d4cmr21213011qtd.103.1703083610733; Wed, 20 Dec 2023 06:46:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703083610; cv=none; d=google.com; s=arc-20160816; b=ZXtEUUa3eDk4Z0+BDyM6v0JR2jHKUfiGUJG40zvWilR5o84TLwqtMqIiyG80AcR7Np cUeUPugn4kYrTeCUZqSfIZ0EmMlT8BCuRvhdkWoFYCG3EVAzQiHnDsWxWJAqW3AG8ZDK I1Yi6L2S1DfQfqdXo8IQLAPXVlce7BwJ6+eyvvvkL7UhDgJE054eiNod2z5m1rE5Q43U VMgeZrUsbCFn6RWr5f4Qccwjbj5aAjylyY4KB3HrKV1+FUHP0ow1LEjG+VmZmCzvxwZo 9bFkhkGJe6M6CWLzBAopy9L4qsogmXZ9rKKTB18Duwn1cOG7CZNCJ6IJY5rI8nh0q5rG KCgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=OvegbbZ+GY+9/TaS8xX7bWpldc3nE2mg9MvxzdvV23E=; fh=RQTnRjrThQ1vZf/sNMtXhj/UAh0ZbYCQlG1TedulDPY=; b=kC0QXclK5PExM0nKriHYsbmNLXHHRVUfDuRwSzl0A33VQm+yCTAUctyKOiCXJZo4gp RUKz5Z2gqbmSf6S8hipy9W4e9judHRovOB+O195rKjOIhxgzu+xwrWElSjSt1rbDMPMl iYkwC4PXb//AqOHJX1Qxtug1sEHp5Le5ndNncuOJYTLOp3YLZwJLQ0NRGWLGo2PqbB01 v4VGMkDU8WEyAAYoub3o8/05FcUeR45ikMFoZu6LG9ljNQFX0aowzfQbRhH0qqrlkooo E8kTUwzczK230tZGBt9ObP5dCulUnHik9aeNtzlDQYuJyeuPl6PAMW89nwe0T0NIXqiH Iy9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dYHIEosQ; spf=pass (google.com: domain of linux-kernel+bounces-7079-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 fz6-20020a05622a5a8600b0042578b77421si29498605qtb.550.2023.12.20.06.46.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 06:46:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7079-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=@collabora.com header.s=mail header.b=dYHIEosQ; spf=pass (google.com: domain of linux-kernel+bounces-7079-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7079-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 777381C2380D for ; Wed, 20 Dec 2023 14:46:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51F603DBBA; Wed, 20 Dec 2023 14:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="dYHIEosQ" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 1089238DF5; Wed, 20 Dec 2023 14:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703083590; bh=/9ZkXTPBAbpS5HHi1uX2hV2E8187O/n+9qHuDOsquXs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dYHIEosQMzFCxEwKxk9ybMdZvjawnoTjbsUieYfYSEuoY+2U7pumu+hDFpU4bHWQM imn5P9bVsOmFMSu+kgW300Lz+++WwaqRQhapkgU1K8bojQcIOvAkUt9emxa7z1V/JB j63+cl1q3k42I9b3E/lVGF+fsrEkcmxCxVloKv6AfQAVuIHEXvHFULcHL6XUPQZsrc zBxJAQF1X0l/AWo93E50i9+WAsR5vjpm8+1jI5SaaOKbEMVkXDZm/+bV06yZnY2mvD /iZIeqb5IYnrEQaSRWS2pyV7UULp1YVXL4gzZgylTpcOUnoHL0gohPqG7unjADNSFc MgodlqrdUfaEg== Received: from [100.115.223.179] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2D9C93781478; Wed, 20 Dec 2023 14:46:29 +0000 (UTC) Message-ID: <73dc7954-f005-4806-b7c0-a4d8a267de7b@collabora.com> Date: Wed, 20 Dec 2023 16:46:28 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/4] riscv: dts: starfive: visionfive-v1: Setup ethernet phy Content-Language: en-US To: Emil Renner Berthing , 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 References: <20231220004638.2463643-1-cristian.ciocaltea@collabora.com> <20231220004638.2463643-4-cristian.ciocaltea@collabora.com> From: Cristian Ciocaltea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/20/23 15:48, Emil Renner Berthing wrote: > 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. Yeah, I wasn't sure if the ordering is more important than having the referenced nodes added before. I suppose there's a need for v6. :-) > /Emil