[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230725095712.24771-1-ante.knezic@helmholz.de>
Date: Tue, 25 Jul 2023 11:57:12 +0200
From: Ante Knezic <ante.knezic@...mholz.de>
To: <andrew@...n.ch>
CC: <ante.knezic@...mholz.de>, <davem@...emloft.net>,
<edumazet@...gle.com>, <f.fainelli@...il.com>, <kuba@...nel.org>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<olteanv@...il.com>, <pabeni@...hat.com>
Subject: [PATCH net-next] net: dsa: mv88e6xxx: enable automedia on 6190x and 6390x devices
On Mon, 24 Jul 2023 20:34:27 +0200 Anrew Lunn wrote:
>By auto-media, you mean both a copper PHY and an SFP? And whichever
>gets link first wins the MAC?
>
Yes, that is correct.
On Mon, 24 Jul 2023 20:34:27 +0200 Anrew Lunn wrote:
>auto-media has been discussed a few times, and rejected, since Linux
>has no concept of multiple 'phy like devices' connected to one MAC.
>
>How are you representing this in DT? I assume you have both an SFP
>socket, and a phy-handle pointing to a PHY? phylink will not drive
>both at the same time. So you cannot have them admin up at the same
>time? How do you get the SFP out of TX disable, when phylink sees a
>PHY? What does ethtool return? What the PHY is advertising as its link
>modes? Or nothing since an SFP does not advertise speeds?
Patch simply covers the automedia aspect of the device while the
exact mode is specified by the DT. So for example if you would like
to connect an SFP to port 3 of the device you would create a "regular"
sfp node just like for ports 9/10 along the lines of:
port@3 {
reg = <3>;
label = "SFP";
phy-mode = "1000base-x";
managed = "in-band-status";
sfp = <&sfp1>;
};
>From then on, phylink will handle the sfp just as if it was connected
to ports 9/10 - the ethtool reports advertised and supported link mode
as 1000baseX, "Port" is "FIBRE", etc.
Patch looks for "1000base-x" phy-mode in the dt node so in case it
is not found the device can be linked only against a copper PHY.
The "real" automedia you are refering to is of course not covered here
and maybe the commit message is a "bit" misleading.
Powered by blists - more mailing lists