From: Landen Chao <landen.chao@mediatek.com> To: Lorenzo Bianconi <lorenzo@kernel.org>, Andrew Lunn <andrew@lunn.ch> Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "nbd@nbd.name" <nbd@nbd.name>, "john@phrozen.org" <john@phrozen.org>, "Sean Wang" <Sean.Wang@mediatek.com>, "Mark-MC Lee (李明昌)" <Mark-MC.Lee@mediatek.com>, "davem@davemloft.net" <davem@davemloft.net>, "edumazet@google.com" <edumazet@google.com>, "kuba@kernel.org" <kuba@kernel.org>, "pabeni@redhat.com" <pabeni@redhat.com>, "Sam Shih (史碩三)" <Sam.Shih@mediatek.com>, "linux-mediatek@lists.infradead.org" <linux-mediatek@lists.infradead.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "robh@kernel.org" <robh@kernel.org> Subject: Re: [PATCH net-next 01/14] arm64: dts: mediatek: mt7986: introduce ethernet nodes Date: Sun, 15 May 2022 21:08:00 +0800 [thread overview] Message-ID: <8366aa6336e268490eba5cf4aa7a8d5049185956.camel@mediatek.com> (raw) In-Reply-To: <Yn97GqujwYlljkdH@lore-desk> 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
WARNING: multiple messages have this Message-ID (diff)
From: Landen Chao <landen.chao@mediatek.com> To: Lorenzo Bianconi <lorenzo@kernel.org>, Andrew Lunn <andrew@lunn.ch> Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "nbd@nbd.name" <nbd@nbd.name>, "john@phrozen.org" <john@phrozen.org>, "Sean Wang" <Sean.Wang@mediatek.com>, "Mark-MC Lee (李明昌)" <Mark-MC.Lee@mediatek.com>, "davem@davemloft.net" <davem@davemloft.net>, "edumazet@google.com" <edumazet@google.com>, "kuba@kernel.org" <kuba@kernel.org>, "pabeni@redhat.com" <pabeni@redhat.com>, "Sam Shih (史碩三)" <Sam.Shih@mediatek.com>, "linux-mediatek@lists.infradead.org" <linux-mediatek@lists.infradead.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "robh@kernel.org" <robh@kernel.org> Subject: Re: [PATCH net-next 01/14] arm64: dts: mediatek: mt7986: introduce ethernet nodes Date: Sun, 15 May 2022 21:08:00 +0800 [thread overview] Message-ID: <8366aa6336e268490eba5cf4aa7a8d5049185956.camel@mediatek.com> (raw) In-Reply-To: <Yn97GqujwYlljkdH@lore-desk> 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 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2022-05-15 13:08 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-06 12:30 [PATCH net-next 00/14] introduce mt7986 ethernet support Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 01/14] arm64: dts: mediatek: mt7986: introduce ethernet nodes Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-07 14:05 ` Andrew Lunn 2022-05-07 14:05 ` Andrew Lunn 2022-05-09 16:35 ` Lorenzo Bianconi 2022-05-09 16:35 ` Lorenzo Bianconi 2022-05-09 16:44 ` Andrew Lunn 2022-05-09 16:44 ` Andrew Lunn 2022-05-14 9:49 ` Lorenzo Bianconi 2022-05-14 9:49 ` Lorenzo Bianconi 2022-05-15 13:08 ` Landen Chao [this message] 2022-05-15 13:08 ` Landen Chao 2022-05-06 12:30 ` [PATCH net-next 02/14] dt-bindings: net: mediatek,net: add mt7986-eth binding Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 02/14] dt-bindings: net: mediatek, net: " Lorenzo Bianconi 2022-05-10 16:23 ` [PATCH net-next 02/14] dt-bindings: net: mediatek,net: " Rob Herring 2022-05-10 16:23 ` Rob Herring 2022-05-13 10:26 ` Lorenzo Bianconi 2022-05-13 10:26 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 03/14] net: ethernet: mtk_eth_soc: move tx dma desc configuration in mtk_tx_set_dma_desc Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 04/14] net: ethernet: mtk_eth_soc: add txd_size to mtk_soc_data Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 05/14] net: ethernet: mtk_eth_soc: rely on txd_size in mtk_tx_alloc/mtk_tx_clean Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 06/14] net: ethernet: mtk_eth_soc: rely on txd_size in mtk_desc_to_tx_buf Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 07/14] net: ethernet: mtk_eth_soc: rely on txd_size in txd_to_idx Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 08/14] net: ethernet: mtk_eth_soc: add rxd_size to mtk_soc_data Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 09/14] net: ethernet: mtk_eth_soc: rely on txd_size field in mtk_poll_tx/mtk_poll_rx Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 10/14] net: ethernet: mtk_eth_soc: rely on rxd_size field in mtk_rx_alloc/mtk_rx_clean Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 11/14] net: ethernet: mtk_eth_soc: add SRAM soc capability Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 17:41 ` Jakub Kicinski 2022-05-06 17:41 ` Jakub Kicinski 2022-05-06 20:21 ` Lorenzo Bianconi 2022-05-06 20:21 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 12/14] net: ethernet: mtk_eth_soc: introduce device register map Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 13/14] net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi 2022-05-06 12:30 ` [PATCH net-next 14/14] net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset Lorenzo Bianconi 2022-05-06 12:30 ` Lorenzo Bianconi
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=8366aa6336e268490eba5cf4aa7a8d5049185956.camel@mediatek.com \ --to=landen.chao@mediatek.com \ --cc=Mark-MC.Lee@mediatek.com \ --cc=Sam.Shih@mediatek.com \ --cc=Sean.Wang@mediatek.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=devicetree@vger.kernel.org \ --cc=edumazet@google.com \ --cc=john@phrozen.org \ --cc=kuba@kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=lorenzo@kernel.org \ --cc=nbd@nbd.name \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.