[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8366aa6336e268490eba5cf4aa7a8d5049185956.camel@mediatek.com>
Date: Sun, 15 May 2022 21:08:00 +0800
From: Landen Chao <landen.chao@...iatek.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>, Andrew Lunn <andrew@...n.ch>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nbd@....name" <nbd@....name>,
"john@...ozen.org" <john@...ozen.org>,
Sean Wang <Sean.Wang@...iatek.com>,
Mark-MC Lee (李明昌)
<Mark-MC.Lee@...iatek.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
Sam Shih (史碩三)
<Sam.Shih@...iatek.com>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"robh@...nel.org" <robh@...nel.org>
Subject: Re: [PATCH net-next 01/14] arm64: dts: mediatek: mt7986: introduce
ethernet nodes
On Sat, 2022-05-14 at 17:49 +0800, Lorenzo Bianconi wrote:
> > On Mon, May 09, 2022 at 06:35:42PM +0200, Lorenzo Bianconi wrote:
> > > > > +ð {
> > > > > + status = "okay";
> > > > > +
> > > > > + gmac0: mac@0 {
> > > > > + compatible = "mediatek,eth-mac";
> > > > > + reg = <0>;
> > > > > + phy-mode = "2500base-x";
> > > > > +
> > > > > + fixed-link {
> > > > > + speed = <2500>;
> > > > > + full-duplex;
> > > > > + pause;
> > > > > + };
> > > > > + };
> > > > > +
> > > > > + gmac1: mac@1 {
> > > > > + compatible = "mediatek,eth-mac";
> > > > > + reg = <1>;
> > > > > + phy-mode = "2500base-x";
> > > > > +
> > > > > + fixed-link {
> > > > > + speed = <2500>;
> > > > > + full-duplex;
> > > > > + pause;
> > > > > + };
> > > > > + };
> > > >
> > > > Are both connected to the switch? It just seems unusual two
> > > > have two
> > > > fixed-link ports.
> > >
> > > afaik mac design supports autoneg only in 10M/100M/1G mode and
> > > mt7986 gmac1
> > > is connected to a 2.5Gbps phy on mt7986-ref board.
> >
> > The MAC does not normally perform autoneg, the PHY
> > does. phylib/phylink then tells the MAC the result of the
> > negotiation. If there is a SERDES/PCS involved, and it is
> > performing
> > the autoneg, phylink should get told about the result of the
> > autoneg
> > and it will tell the MAC the result.
> >
> > So the gmac1 should just have phy-handle pointing to the PHY, not a
> > fixed link.
> >
> > Andrew
>
> adding Landen to the discussion to provide more hw details.
> @Landen: any inputs on it?
The 2.5Gbps phy on mt7986-ref board enables the HW "rate adaption"
function which phy fixes 2.5Gbps to MAC as well. If the link rate of
Ethernet phy side is less than 2.5G, the 2.5Gbps phy HW will send pause
frame to MAC to adapt the real Tx rate. By the way, the 2.5Gbps phy
advertise all rates to link partner in HW default setting.
Regards,
Landen
>
> Regards,
> Lorenzo
Powered by blists - more mailing lists