Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Hau <hau@realtek.com>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	nic_swsd <nic_swsd@realtek.com>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] r8169: add quirk for RTL8116af SerDes
Date: Mon, 14 Jul 2025 17:38:11 +0200	[thread overview]
Message-ID: <e571d596-da26-4596-bf90-b858b5a2f5b4@lunn.ch> (raw)
In-Reply-To: <50df9352e81e4688b917072949b2ee4c@realtek.com>

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

  reply	other threads:[~2025-07-14 15:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  3:44 [PATCH net-next] r8169: add quirk for RTL8116af SerDes ChunHao Lin
2025-07-13 17:05 ` Andrew Lunn
2025-07-14 15:28   ` Hau
2025-07-14 15:38     ` Andrew Lunn [this message]
2025-07-17 17:45       ` Hau

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=e571d596-da26-4596-bf90-b858b5a2f5b4@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hau@realtek.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox