From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f12.google.com (mail-wr2-f12.google.com [74.125.225.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA1D0344DB7 for ; Tue, 29 Sep 2026 15:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790694388; cv=none; b=L+48QRJ5bKZ7WVoXedgr39YQEjhlZg5q2xIsRSS+gnb0pXsh46HWpphtYVSZ7UlYQNb78fdh5yM6L+w+IMquV1LPa6A9G3ma5v6DszAWG3KdFLsPR78bcPAEyWStHqZlNAsrk6OiCR9i45J+vDMoGLz5NbunffTt4whvXEWmVXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790694388; c=relaxed/simple; bh=8vcedn3CUP1Ygu4h0fKEORUNhcyZl/aYo2TO5TrUblA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=D5jtTssoAGzWUFNHshU7FA1JQlB6vTbUrMkJ1D2T5+cqbHITUZVCR+6Vm/2Zgs+heZh1WseTSnvWTuRX6niMlrRUjBrIFSzl0sOAC/++rb7as6vRoSF95E1hiGMqy3aRwjrkYFTJRiZJtQz6hL8IToB/PYMdmWEbEXHW2OBuIN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=ff7feR11; arc=none smtp.client-ip=74.125.225.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="ff7feR11" Received: by mail-wr2-f12.google.com with SMTP id ffacd0b85a97d-485984ebf5cso3468924f8f.0 for ; Tue, 29 Sep 2026 08:06:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1790694375; x=1791299175; darn=vger.kernel.org; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YLptK7nHgocKDIIOZU1ThQFrj1CHU/IAWIcXLfeThzY=; b=ff7feR11aSekwydcvym14NWKr0RFC1kE1CKVvHVryeaGzD633tzAO8T0mElTFaxhtu Y56NLQzAGWRs0e3RhvpKEHAVelxx4nI2yaHdQdGuyFR72aEsEJ04oWPSvAW6kaQKTmpY 5lMMk0LAhXvZ2kGvZQI/NJHLl5BhgC6ZV+IgSfViffE3t9MysfoDPjrLtvrBZdqrS+ZJ Ep0JvqhugV2Df+lNjIUP1mCyzZ/vWiT7ZqEouQH7ynYvgIrqRZPfhBDQYR+HH+RWsRxi IzToElRdW4JpCUpCXHzMdL87b4/dZKs+npxUQs2uhqR4Cs03x3hm+ZjOhpGDkjAs5U48 lvQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790694375; x=1791299175; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=YLptK7nHgocKDIIOZU1ThQFrj1CHU/IAWIcXLfeThzY=; b=D2k1r64vrgwVql8a+///NxHpc0bIyT5cZRDeQ4c6CfHLR5tD+cmbdP9lHKUTwPJSxJ kJDIL8c/78GaxAWNGSLaKILH0AZ2bZZ+6PhrOpoQNSsJtRDNuzke6mw/BIBFklBgq+Ss kgmnSqio3abNaokyITCz3p4Glj4fJg/xB0JGS7IesMvkDtoKAu9JvLY9tnb9A+l/2XKV WI9Wj53n3GScoN55MLwwfe8nhDrnE6ZAuGeFLos0nTfKxVRAacmkU2/d+4IijoHtprgl w6TlilaktP4kqmW8kEWpa5pebWfYDUSlP9ei+StzzO0SUV2EguZFvZ5aHyBmex/ujCib 4zuw== X-Forwarded-Encrypted: i=1; AKwUvBxfmQgdzVxVf9kSNvaZ//rfGsMZ08EIz8K3NKcmo7vDCcPodJYGO0n/xbsJHorsIIukbZljNx5QtsOu@vger.kernel.org X-Gm-Message-State: AFq9FYJ9Oxi4UdrXguMIkUEq6L4EXJb/+mCyO4hBU4gby29kZvbFeXAI /gzsI0E04UjAVP1Uz0xPI4TGhBOgz0lzcPcJKW7mwX71AtBj/2uyz2PBfHTxI0rsb7I= X-Gm-Gg: AYBFou0NvQvmyzX4Qp1AyY1V0kdQKfjoNvBuhyEWDt/vpaXmr6v7FpqKLIiZVMBbwKJ hvWdu5+tlGkR9nqNxuW+BcSfKzAdVO96asPtAbvFuGtXa/+g1geUN04IHr1icZhu44GIAnaltdh xxX/N37wpngJDoNYYn5iGtu3Xs/f6G83cA0WhXo4pu38ahKxV3WHj+qx2uQIXKOQ9b0pOBrPAe+ VIKSKHcOy1wkJx4BG8JkrMX4t9W5a43LD4Bk896D/OTP7E5iOBbSZ9i1qJmXGh17RW7IvAJgyfo DkYWnxCsZn2sBY9nUL55wRc00vvgJa1Cl/nIOQAAmuQ61HgnuXWXOXW+E12xL5iN57H75VAh9ID HgZJDnvaLP5xlZ27z/s/eJ/YRJ9cl6SeZnH5KPaAE2eUObJ443Jqe5zRt3Q0W8Nb9ilWEeE6UMx hdFnZdJSJ+iRoxS/3gUvl/q1LC4Xlm1h4uBdQyNFt4aaG5h0GySQ/Dduhxz/4TGGPMMQfr4KwFo l4kS6/auI2+ejyMyZgvNyt5b84jow== X-Received: by 2002:adf:e19c:0:b0:487:799:c04a with SMTP id ffacd0b85a97d-48872a5c8dcmr29383832f8f.3.1790694375596; Tue, 29 Sep 2026 08:06:15 -0700 (PDT) Received: from localhost (82-67-6-57.subs.proxad.net. [82.67.6.57]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48af4f8edebsm4909091f8f.2.2026.09.29.08.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2026 08:06:14 -0700 (PDT) From: Jerome Brunet To: Andrew Lunn Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Richard Cochran , Maxime Ripard , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Maxime Chevallier , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Andre Przywara Subject: Re: [PATCH net-next v3 0/5] net: stmmac: Add support for Allwinner A733 GMAC210 In-Reply-To: References: <20260923-allwinner-a733-gmac-support-v3-0-15735155a789@baylibre.com> <9cc61625-47c9-4bdf-97f0-0528f661a399@lunn.ch> <1j7bkb9h5k.fsf@starbuckisacylon.baylibre.com> <5fae3b42-552a-458a-9710-927360e58c37@lunn.ch> <1jv77u8yak.fsf@starbuckisacylon.baylibre.com> <491f043e-6dc6-4936-a490-31a3362c5b6e@lunn.ch> <1jse2x91oh.fsf@starbuckisacylon.baylibre.com> Date: Tue, 29 Sep 2026 17:06:14 +0200 Message-ID: <1jecec3xnd.fsf@starbuckisacylon.baylibre.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On ven. 25 sept. 2026 at 21:45, Andrew Lunn wrote: >> > You need to differentiate between small fine tuning delays, and the >> > 2ns delay required by the RGMII standard. If the MAC is just doing >> > fine tuning, you need to still pass PHY_INTERFACE_MODE_RGMII_ID so the >> > PHY adds the 2ns delay. If the MAC is adding a big delay, you need to >> > pass PHY_INTERFACE_MODE_RGMII to the PHY. >> >> The PHY is one concern but the series here does not really address this >> topic. DTS and board specific concerns will come later. > > They are all interconnected. When phy-mode says 'rgmii-id', it is the > MAC/PHY pair which needs to decide who adds the delay. If the phy-mode > is 'na', how does the MAC know it needs to use RGMII, not MII, as you > said. > > We need to keep the big picture in mind, otherwise you could go down a > dead end, and a dead end which makes backwards compatibility really > messy. I agree with you with on all this. I understand this particular MAC/PHY combo is sparking this discussion, Let's sort this out properly, no rush. I'm merely pointing out that the problem is not introduced by the code submited here. Other MAC can set delays, Other MACs would need to handle mis-behaving PHY too. > >> It is really just the MAC. So, how does the MAC is supposed to >> make the decision to amend the PHY mode ? is there a threshold you'd >> like to recommend for this differentiation ? > > This is the first time we have had this condition. So it has not > really been thought about too much. Maybe 1ns. That is the middle of > the 2ns required by RGMII. > >> I'll try to reach out, just in case. I have the schematics but without >> the PHY doc, it does not help much. > > From that i assume you missed the other emails. Somebody from ARM give > a link to the data sheet. It documents the strapping. Search for the > patch adding the PHY driver, it is in that thread. > Thanks for the heads up. So if I'm reading the doc correctly the PHY adds 2ns * on RX if there a 4.7k pull-up on RXD0 * on TX if there a 4.7k pull-up on RXD1 The schematics for the board are available here [1] * 4.7k pull-up on RXD0: so we should have 2ns Rx from the PHY * 4.7k pull-down on RXD1: no idea what this does. Presumably no delay ? I've cross-checked the HW, the resistors are actually fitted as the schematic says they are. With the HW setup, the MAC setup that works for me remains tx-internal-delay-ps = <1620>; rx-internal-delay-ps = <1800>; I know it is not aligned with what it expected but still. I've tried with * rx-internal-delay-ps = <0>. No Rx. * tx-internal-delay-ps at 1800ps, it still works with some TCP retries here and there on iperf3. 1980ps stalls after just a few packets. [1]: https://dl.radxa.com/cubie/a7a/docs/hw/radxa_cubie_a7a_v1.10_schematic.pdf > Andrew -- Jerome