From: "Nazle Asmade, Muhammad Nazim Amirul" <muhammad.nazim.amirul.nazle.asmade@altera.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "dinguyen@kernel.org" <dinguyen@kernel.org>,
"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
"rmk+kernel@armlinux.org.uk" <rmk+kernel@armlinux.org.uk>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] arm64: dts: socfpga: agilex5: Add SoCDK TSN Config2 board
Date: Fri, 3 Jul 2026 07:04:03 +0000 [thread overview]
Message-ID: <b8ca3bd8-af8f-43e7-904c-1ac45512296b@altera.com> (raw)
In-Reply-To: <d70a6795-e1a2-43e2-b523-0fc668324674@lunn.ch>
On 1/7/2026 8:47 pm, Andrew Lunn wrote:
>>> # There are a small number of cases where the MAC has hard coded
>>> # delays which cannot be disabled. The 'phy-mode' only describes the
>>> # PCB. The inability to disable the delays in the MAC does not change
>>> # the meaning of 'phy-mode'. It does however mean that a 'phy-mode' of
>>> # 'rgmii' is now invalid, it cannot be supported, since both the PCB
>>> # and the MAC and PHY adding delays cannot result in a functional
>>> # link. Thus the MAC should report a fatal error for any modes which
>>> # cannot be supported. When the MAC implements the delay, it must
>>> # ensure that the PHY does not also implement the same delay. So it
>>> # must modify the phy-mode it passes to the PHY, removing the delay it
>>> # has added. Failure to remove the delay will result in a
>>> # non-functioning link.
>>>
>>> Andrew
>>>
>>> ---
>>> pw-bot: cr
>> Hi Andrew,
>>
>> The delays are provided by the FPGA GMII-to-RGMII converter soft IP,
>> which is hardcoded in the FPGA bitstream and cannot be disabled or
>> modified from the driver side.
>>
>> Using phy-mode = "rgmii" is intentional here — it prevents the PHY from
>> adding its own internal delays on top, since the FPGA converter already
>> provides the full required delay. This is consistent with how all other
>> Agilex5 SoCDK board variants are described, as seen in commit
>> c5637e5ceb4b ("arm64: dts: socfpga: agilex5: Fix phy-mode to rgmii as HW
>> provides clock delay") already in Dinh Nguyen's tree, which applies the
>> same rationale across all Agilex5 boards.
>
> I've become more insistent that designs get this correct. So i don't
> care too much about past systems. Many vendors are having to fix up
> their drivers and DT in order to make new boards consistent.
>
> You can look at your system as the FPGA being the MAC, and the PHY is
> the PHY. The PCB is not providing the delay, the MAC is. This exactly
> fits the description above.
>
> Andrew
Hi Andrew,
Thank you for the clarification. We agree with your framework in
principle, but would like to explain why phy-mode = "rgmii" is the
appropriate description for this specific case.
After getting more information from hw team, for Agilex specific device,
the RGMII timing delays on this board are provided by an FPGA delay
chain (Input/Output Delay Chain primitives in the FPGA fabric). The
reason for using the FPGA rather than the PHY is that the Marvell PHY on
this board only supports 0ns or 2ns delay steps — too coarse to meet the
RGMII timing requirements. The FPGA delay chain provides up to 63 steps
of ~0.1ns precision, which the hardware team has tuned at design time to
achieve correct signal timing.
This delay is fixed in the FPGA bitstream and is invisible to the Linux
driver — the driver cannot read, modify, or even detect the delay value
that was programmed. The driver has no way to know "the MAC is providing
X nanoseconds of delay."
In this situation, the only meaningful action the driver can take is to
instruct the PHY not to add its own delays — which phy-mode = "rgmii"
already achieves correctly. Changing to phy-mode = "rgmii-id" and having
the driver strip the delay before passing to the PHY would produce the
same hardware behaviour (PHY adds zero delay), but would add driver
complexity with no practical benefit, and would misrepresent the FPGA
delay as a driver-managed MAC delay when it is actually a fixed,
board-level hardware calibration.
Could you advise if you still prefer the rgmii-id approach given this
constraint?
BR,
Nazim
next prev parent reply other threads:[~2026-07-03 7:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 13:31 [PATCH 0/3] arm64: dts/net: stmmac: Add Agilex5 SoCDK TSN Config2 board support muhammad.nazim.amirul.nazle.asmade
2026-06-30 13:31 ` [PATCH 1/3] dt-bindings: arm: altera: Add Agilex5 SoCDK TSN Config2 board board muhammad.nazim.amirul.nazle.asmade
2026-07-02 7:16 ` Krzysztof Kozlowski
2026-06-30 13:31 ` [PATCH 2/3] arm64: dts: socfpga: agilex5: Add SoCDK TSN Config2 board muhammad.nazim.amirul.nazle.asmade
2026-06-30 13:58 ` Andrew Lunn
2026-06-30 14:39 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 15:25 ` Andrew Lunn
2026-07-01 1:54 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-01 12:47 ` Andrew Lunn
2026-07-03 7:04 ` Nazle Asmade, Muhammad Nazim Amirul [this message]
2026-07-03 13:12 ` Andrew Lunn
2026-07-02 7:17 ` Krzysztof Kozlowski
2026-07-03 5:28 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 13:31 ` [PATCH 3/3] net: stmmac: dwmac-socfpga: Add mac-mode DT property support muhammad.nazim.amirul.nazle.asmade
2026-06-30 14:02 ` Andrew Lunn
2026-06-30 14:04 ` Maxime Chevallier
2026-06-30 15:13 ` Nazle Asmade, Muhammad Nazim Amirul
2026-06-30 15:42 ` Maxime Chevallier
2026-07-01 1:32 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-01 6:49 ` Maxime Chevallier
2026-07-01 14:43 ` Andrew Lunn
2026-07-03 8:10 ` Nazle Asmade, Muhammad Nazim Amirul
2026-07-03 13:15 ` Andrew Lunn
2026-06-30 13:53 ` [PATCH 0/3] arm64: dts/net: stmmac: Add Agilex5 SoCDK TSN Config2 board support Maxime Chevallier
2026-07-01 2:09 ` Nazle Asmade, Muhammad Nazim Amirul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8ca3bd8-af8f-43e7-904c-1ac45512296b@altera.com \
--to=muhammad.nazim.amirul.nazle.asmade@altera.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox