Re: 回覆: [net-next 2/4] ARM: dts: ast2600-evb: add default RGMII delay

From
Andrew Lunn <andrew@lunn.ch>
Date
2025-03-18 14:03:17
Also in
linux-arm-kernel, linux-aspeed, linux-devicetree, lkml
Reply to
Jacky Chou, 2025-03-18
On Tue, Mar 18, 2025 at 11:00:27AM +0000, Jacky Chou wrote:
Hi Andrew,

Thank you for your reply.
quoted
quoted
 	phy-mode = "rgmii";
 	phy-handle = <&ethphy2>;

+	tx-internal-delay-ps = <8>;
+	rx-internal-delay-ps = <4>;
+
Ideally you want:

	phy-mode = "rgmii-id";
	tx-internal-delay-ps = <0>;
	rx-internal-delay-ps = <0>;

Since 'rgmii-id' correctly describes the hardware.
I still confuse about ethernet-controller.yaml.
It lists 'rgmi', 'rgmii-rxid', 'rgmii-txid' and 'rgmii-id'.
DT describes the board. Does the board add the 2ns delay via extra
long clock lines? If yes, use rgmii. If the MAC/PHY pair need to add
the 2ns delay, use rgmii-id.

If the MAC/PHY pair is adding the delay, the DT says nothing about how
they add the delay.

The general rule is the PHY adds the delay. If you look at
drivers/net/phy/*.c, every PHY that implements RGMII support both
PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII. There is no
reason not to follow ever other MAC/PHY pair and have the PHY add the
delay. The MAC can then do fine tuning if needed, adding small delays.

	Andrew
Thread (28 messages) 28 messages, 6 authors, last reply 2025-03-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help