* Handle phys changing the interface between 2500basex & SGMII
@ 2022-09-19 14:47 Alexander 'lynxis' Couzens
2022-09-19 20:47 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Alexander 'lynxis' Couzens @ 2022-09-19 14:47 UTC (permalink / raw)
To: netdev
Hi,
I've a mediatek mt7622 SoC connected to a realtek 2.5gbit copper phy
(rtl8221) via SGMII/2500basex.
The rtl8221 is changing its phy interface depending on the link.
So 2500basex for 2.5gbit copper and for all lower speeds (down to
10mbit) it's using SGMII.
What's the best way to implement it?
Should the phy driver change the phy_interface on link up?
As a hack I've modified mac_link_up to handle the different speeds
and changed the phylink_mac_ops validate to allow advertising lower
speeds on 2500basex.
Best,
lynxis
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Handle phys changing the interface between 2500basex & SGMII
2022-09-19 14:47 Handle phys changing the interface between 2500basex & SGMII Alexander 'lynxis' Couzens
@ 2022-09-19 20:47 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2022-09-19 20:47 UTC (permalink / raw)
To: Alexander 'lynxis' Couzens; +Cc: netdev
On Mon, Sep 19, 2022 at 04:47:13PM +0200, Alexander 'lynxis' Couzens wrote:
> Hi,
>
> I've a mediatek mt7622 SoC connected to a realtek 2.5gbit copper phy
> (rtl8221) via SGMII/2500basex.
>
> The rtl8221 is changing its phy interface depending on the link.
> So 2500basex for 2.5gbit copper and for all lower speeds (down to
> 10mbit) it's using SGMII.
>
> What's the best way to implement it?
The marvel10g PHY driver is a good example to follow. It also changes
its host side interface mode as needed by whatever the copper side has
negotiated.
> Should the phy driver change the phy_interface on link up?
Yes.
> As a hack I've modified mac_link_up to handle the different speeds
> and changed the phylink_mac_ops validate to allow advertising lower
> speeds on 2500basex.
phylink should not need any changes. You just need your MAC driver to
follow what is happening in its callbacks.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-19 20:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 14:47 Handle phys changing the interface between 2500basex & SGMII Alexander 'lynxis' Couzens
2022-09-19 20:47 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).