[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e571d596-da26-4596-bf90-b858b5a2f5b4@lunn.ch>
Date: Mon, 14 Jul 2025 17:38:11 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Hau <hau@...ltek.com>
Cc: "hkallweit1@...il.com" <hkallweit1@...il.com>,
nic_swsd <nic_swsd@...ltek.com>,
"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>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] r8169: add quirk for RTL8116af SerDes
On Mon, Jul 14, 2025 at 03:28:37PM +0000, Hau wrote:
> >
> > Can you give us a few more details. What is on the other end of the SERDES?
> > An SGMII PHY? An SFP cage? An Ethernet switch chip?
> >
> > A quick search suggests it is used with an SFP cage. How is the I2C bus
> > connected? What about GPIOs? Does the RTL8116af itself have GPIOs and an
> > I2C bus?
> >
> RTL8116af 's SERDES will connect to a SFP cage. It has GPIO and a
> I2C bus. But driver did not use it to access SFP cage. Driver
> depends on mac io 0x6c (LinkStatus) to check link status.
You cannot correctly use an SFP cage without using the I2C bus and the
GPIOs. e.g. A copper SFP module likely needs SGMII, where as a fibre
module needs 1000BaseX. You need to reprogram the PCS depending on
what the SFP EEPROM says.
The kernel has all the code needed to coordinate this, phylink. All
you need to do is write a standard Linux I2C bus driver, a standard
Linux GPIO driver, and turn your PCS into a Linux PCS. You can then
instantiate an SFP device. The txgbe driver does this, you can
probably copy the code from there.
Have you licensed these parts? The txgbe hardware uses synopsys I2C
and PCS. So all that was needed was a wrapper around the existing
drivers.
Andrew
Powered by blists - more mailing lists