[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c0195dd-50b3-4f30-a021-c5b77d39d895@lunn.ch>
Date: Tue, 18 Mar 2025 15:03:03 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jacky Chou <jacky_chou@...eedtech.com>
Cc: "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"robh@...nel.org" <robh@...nel.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"joel@....id.au" <joel@....id.au>,
"andrew@...econstruct.com.au" <andrew@...econstruct.com.au>,
"ratbert@...aday-tech.com" <ratbert@...aday-tech.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>,
BMC-SW <BMC-SW@...eedtech.com>
Subject: Re: 回覆: [net-next 2/4] ARM:
dts: ast2600-evb: add default RGMII delay
On Tue, Mar 18, 2025 at 11:00:27AM +0000, Jacky Chou wrote:
> Hi Andrew,
>
> Thank you for your reply.
>
> > > phy-mode = "rgmii";
> > > phy-handle = <ðphy2>;
> > >
> > > + 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
Powered by blists - more mailing lists