From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 235AB40488C for ; Tue, 9 Jun 2026 18:24:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781029492; cv=none; b=uSfLypGYw4+xqV57s5+emyvmXKafTJlQLkLKfpMi9LscYialwMbf688QGcQE7QvsAHtk6cx+0F9NA8E/Gb69gZVHLJBg2MHi0iJYuipKdJ4pJt9EAeLK8rL3a2Usfh1IWziOQJXDQvHGPOW7x+ku4wIQzuMA7RPaHINQ1hiLszk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781029492; c=relaxed/simple; bh=cYprcqby07aD8H622Y4drSTVA2JemKQFeIJ8S7r/+Z4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MbwL6oDai98K1Thxl2+XVBqDbL5VkKg3xkM+8hgGOzqusNzidn/ZlLgh5QunEvJcMeq5M8f47H0cIDA8boF3POUSGOPEt65NkRtGqaty2j4eaWNPxIVk4wA1/kbB2UZr4pIPJBukfKN3gTiy5v2RhabS05I2YYW5sTNn03whIGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rembrandt.dev; spf=pass smtp.mailfrom=rembrandt.dev; dkim=pass (2048-bit key) header.d=rembrandt.dev header.i=@rembrandt.dev header.b=EixPZ2KM; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=daGzXBDp; arc=none smtp.client-ip=202.12.124.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rembrandt.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rembrandt.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rembrandt.dev header.i=@rembrandt.dev header.b="EixPZ2KM"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="daGzXBDp" Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 250BB7A017C; Tue, 9 Jun 2026 14:24:49 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Tue, 09 Jun 2026 14:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rembrandt.dev; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1781029488; x= 1781115888; bh=cYprcqby07aD8H622Y4drSTVA2JemKQFeIJ8S7r/+Z4=; b=E ixPZ2KMTPtrBWcgx5w8G/hiz0XIr//c07Li4camk8/JBNA8dZE+t2qd94lmLOOY3 epq/J5GTF1JeMuEDpw0d2s3jaWS8lT9B0+sVk1xxkEkqSuTWQcg3mrPMCivgEK2Y HC5W6rwGuTB1wR6jlUvQtcVst03yyd0QVi0joP20c6dgsIX9J/XHCk1upAW1ejK0 UVrMbVC6MdsjxjFMHEZAyh5Vlj+FSmKLr8ITiBSrpyjzBIHM24vmTxpCWaKadv2n JDYaLLgAFTZlrzHnmyICJqpmPehpIxdWOvOpeAf00HZoCwPrO8gVJBXpHlKhNT0z WMiJh7FXnvhxhgfkQfznQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1781029488;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7jBYCHGAoHImc27LGZKUFe93tW3shlELaeQiD8e/VO33hpgpPTQpWh4C9Vg X-ME-Proxy: Feedback-ID: iec564b6b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Jun 2026 14:24:48 -0400 (EDT) Date: Tue, 9 Jun 2026 20:24:46 +0200 From: Andrew Rembrandt To: Inochi Amaoto Cc: Yixun Lan , linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: dts: spacemit: k3-pico-itx: Fix non-functional ethernet TX timing Message-ID: References: <20260608182358.170489-1-kernel@rembrandt.dev> Precedence: bulk X-Mailing-List: spacemit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jun 09, 2026 at 01:37:56 pm Inochi Amaoto wrote: > You should set tx-internal-delay-ps of the phy instead of > the controller. This is a phy in "rgmii-id" mode. Thanks for the review. I don't think that works on this board, but please let me know if I'm missing something. The PHY is a Realtek RTL8211F. Its driver only toggles the chip's fixed ~2ns delay on/off from phy-mode, and per the datasheet that's a hardware limit, not a driver one -- the RTL8211F has no tunable delay, so a ps value on the PHY node has nothing to act on. The only configurable delay element on K3 is the SoC RGMII delay line, and dwmac-spacemit programs it from tx-/rx-internal-delay-ps read off the controller node (spacemit_dwmac_probe()), so that is where the property has to live to take effect. This is the MAC "fine tuning ... values expected here are small" case described in Documentation/devicetree/bindings/net/ethernet-controller.yaml: the RTL8211F supplies the fixed ~2ns via rgmii-id and the MAC adds a 400ps trim on top. Ideally the PHY would own the delay, but as Andrew Lunn noted reviewing dwmac-meson8b, that requires the PHY to implement a configurable delay, which not all do. The already-merged k1-bananapi-f3 does the same thing: eth1 combines phy-mode = "rgmii-id" with tx-internal-delay-ps = <250> on the controller node (via the K1 EMAC rather than dwmac, but the same DT pattern). Would you be OK keeping it on the controller given the above? For v2 I can add an explicit rx-internal-delay-ps = <0> to match the other SpacemiT boards (k1-bananapi-f3 included) and spell this reasoning out in the commit message. Thanks, Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50C54CD8CB2 for ; Tue, 9 Jun 2026 18:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6qHsJv35aKFyczESgcTBM6k4tx/5baInsj4sdtqIfOc=; b=tSfEzF02EQEM2i nvE5Hw7iCIwMtNgcY+nF7Vq3zpaPTaZZuonrf92J39x56vMZ+UBAMfrExi6aq3MYGbVi+zEvBmby4 baFQaYHK0uO7QZkB5u43UK1b6oT8YRsBWw4ZkhWm3eLLEZrxSaSpXumb081814J0Me19Y3dHx9kYm VB1UG3W/tRmSc87BMoYIwMssSvzH6v7rMQzsqq8LNn/NZr0hbC01jOTWR1FyTDyLDwNMZd4+scPQy cLqL5ZwVRSYUDpOVXSrxIwLSaF2isjCOdEh9uW9RVqP7u8qva8fdC/iiRtKTWvZdNEzc2o0gf+NxA qD8FDneGegSHw31MhNxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wX18C-00000006Bsg-2wsf; Tue, 09 Jun 2026 18:24:56 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wX188-00000006BsB-2RQl for linux-riscv@lists.infradead.org; Tue, 09 Jun 2026 18:24:54 +0000 Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 250BB7A017C; Tue, 9 Jun 2026 14:24:49 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Tue, 09 Jun 2026 14:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rembrandt.dev; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1781029488; x= 1781115888; bh=cYprcqby07aD8H622Y4drSTVA2JemKQFeIJ8S7r/+Z4=; b=E ixPZ2KMTPtrBWcgx5w8G/hiz0XIr//c07Li4camk8/JBNA8dZE+t2qd94lmLOOY3 epq/J5GTF1JeMuEDpw0d2s3jaWS8lT9B0+sVk1xxkEkqSuTWQcg3mrPMCivgEK2Y HC5W6rwGuTB1wR6jlUvQtcVst03yyd0QVi0joP20c6dgsIX9J/XHCk1upAW1ejK0 UVrMbVC6MdsjxjFMHEZAyh5Vlj+FSmKLr8ITiBSrpyjzBIHM24vmTxpCWaKadv2n JDYaLLgAFTZlrzHnmyICJqpmPehpIxdWOvOpeAf00HZoCwPrO8gVJBXpHlKhNT0z WMiJh7FXnvhxhgfkQfznQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1781029488; x=1781115888; bh=cYprcqby07aD8H622Y4drSTVA2JemKQFeIJ 8S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TQpWh4C9Vg X-ME-Proxy: Feedback-ID: iec564b6b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Jun 2026 14:24:48 -0400 (EDT) Date: Tue, 9 Jun 2026 20:24:46 +0200 From: Andrew Rembrandt To: Inochi Amaoto Cc: Yixun Lan , linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: dts: spacemit: k3-pico-itx: Fix non-functional ethernet TX timing Message-ID: References: <20260608182358.170489-1-kernel@rembrandt.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260609_112453_189471_3D6BDEBB X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Jun 09, 2026 at 01:37:56 pm Inochi Amaoto wrote: > You should set tx-internal-delay-ps of the phy instead of > the controller. This is a phy in "rgmii-id" mode. Thanks for the review. I don't think that works on this board, but please let me know if I'm missing something. The PHY is a Realtek RTL8211F. Its driver only toggles the chip's fixed ~2ns delay on/off from phy-mode, and per the datasheet that's a hardware limit, not a driver one -- the RTL8211F has no tunable delay, so a ps value on the PHY node has nothing to act on. The only configurable delay element on K3 is the SoC RGMII delay line, and dwmac-spacemit programs it from tx-/rx-internal-delay-ps read off the controller node (spacemit_dwmac_probe()), so that is where the property has to live to take effect. This is the MAC "fine tuning ... values expected here are small" case described in Documentation/devicetree/bindings/net/ethernet-controller.yaml: the RTL8211F supplies the fixed ~2ns via rgmii-id and the MAC adds a 400ps trim on top. Ideally the PHY would own the delay, but as Andrew Lunn noted reviewing dwmac-meson8b, that requires the PHY to implement a configurable delay, which not all do. The already-merged k1-bananapi-f3 does the same thing: eth1 combines phy-mode = "rgmii-id" with tx-internal-delay-ps = <250> on the controller node (via the K1 EMAC rather than dwmac, but the same DT pattern). Would you be OK keeping it on the controller given the above? For v2 I can add an explicit rx-internal-delay-ps = <0> to match the other SpacemiT boards (k1-bananapi-f3 included) and spell this reasoning out in the commit message. Thanks, Andrew _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv