From: Andrew Lunn <andrew@lunn.ch>
To: Raju Lakkaraju - I30499 <Raju.Lakkaraju@microchip.com>
Cc: Ronnie Kunin - C21729 <Ronnie.Kunin@microchip.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
Bryan Whitehead - C21958 <Bryan.Whitehead@microchip.com>,
UNGLinuxDriver <UNGLinuxDriver@microchip.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
Steen Hegelund - M31857 <Steen.Hegelund@microchip.com>,
Daniel Machon - M70577 <Daniel.Machon@microchip.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs
Date: Fri, 13 Sep 2024 15:19:39 +0200 [thread overview]
Message-ID: <4559162d-5502-4fc3-9e46-65393e28e082@lunn.ch> (raw)
In-Reply-To: <ZuP9y+5YntuUJNTe@HYD-DK-UNGSW21.microchip.com>
> It's my mistake. We don't need 2 MDIO buses.
> If SFP present, XPC's MDIO bus can use,
> If not sfp, LAN743x MDIO bus can use.
I still think this is wrong. Don't focus on 'sfp present'.
Other MAC drivers don't even know there is an SFP cage connected vs a
PHY. They just tell phylink the list of link modes they support, and
phylink tells it which one to use when the media has link.
You have a set of hardware building blocks, A MAC, a PCS, an MDIO bus.
Use the given abstractions in Linux to export them to the core, and
then let Linux combine them as needed.
Back to my question about EEPROM vs fuses. I assume it is an EEPROM,
and the PCS always exists. So always instantiate an MDIO bus and
instantiate the PCS. The MDIO bus always exists, so instantiate an
MDIO bus.
The driver itself should not really need to take any notice of the
EEPROM contents. All the EEPROM is used for is to indicate what
swnodes to create. It is a replacement of DT. Look at other drivers,
they don't parse DT to see if there is an SFP and so instantiate
different blocks.
As a silicon vendor, you want to export all the capabilities of the
device, and then sit back and watch all the weird and wonderful ways
you never even imagined it could be used come to life.
One such use case: What you can express in the EEPROM is very
limited. I would not be too surprised if somebody comes along and adds
DT overlay support. Look at what is going on with MikrotekBus and the
RPI add on chip RP1. Even microchip itself is using DT overlays with
some of its switch chips.
Andrew
next prev parent reply other threads:[~2024-09-13 13:19 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 16:10 [PATCH net-next V2 0/5] Add support to SFP for PCI11x1x chips Raju Lakkaraju
2024-09-11 16:10 ` [PATCH net-next V2 1/5] net: lan743x: Add SFP support check flag Raju Lakkaraju
2024-09-11 16:44 ` Christophe JAILLET
2024-09-12 6:12 ` Raju Lakkaraju
2024-09-11 17:06 ` Andrew Lunn
2024-09-12 6:29 ` Raju Lakkaraju
2024-09-12 14:52 ` Andrew Lunn
2024-09-12 15:36 ` Ronnie.Kunin
2024-09-12 15:58 ` Andrew Lunn
2024-09-12 16:36 ` Ronnie.Kunin
2024-09-16 18:41 ` Russell King (Oracle)
2024-09-16 18:30 ` Russell King (Oracle)
2024-09-11 16:10 ` [PATCH net-next V2 2/5] net: lan743x: Add support to software-nodes for sfp Raju Lakkaraju
2024-09-11 16:54 ` Christophe JAILLET
2024-09-12 6:32 ` Raju Lakkaraju
2024-09-16 19:31 ` Russell King (Oracle)
2024-09-16 20:37 ` Andrew Lunn
2024-09-11 17:17 ` Andrew Lunn
2024-09-12 6:38 ` Raju Lakkaraju
2024-09-12 15:19 ` Andrew Lunn
2024-09-16 19:34 ` Russell King (Oracle)
2024-09-14 17:37 ` kernel test robot
2024-09-11 16:10 ` [PATCH net-next V2 3/5] net: lan743x: Register the platform device for sfp pluggable module Raju Lakkaraju
2024-09-15 2:16 ` kernel test robot
2024-09-11 16:10 ` [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs Raju Lakkaraju
2024-09-11 17:24 ` Maxime Chevallier
2024-09-12 6:46 ` Raju Lakkaraju
2024-09-11 17:26 ` Andrew Lunn
2024-09-12 6:53 ` Raju Lakkaraju
2024-09-12 15:28 ` Andrew Lunn
2024-09-12 16:04 ` Ronnie.Kunin
2024-09-12 16:13 ` Andrew Lunn
2024-09-12 18:51 ` Ronnie.Kunin
2024-09-12 19:37 ` Andrew Lunn
2024-09-13 8:54 ` Raju Lakkaraju - I30499
2024-09-13 13:19 ` Andrew Lunn [this message]
2024-09-13 14:23 ` Ronnie.Kunin
2024-09-13 15:03 ` Andrew Lunn
2024-09-13 22:53 ` Ronnie.Kunin
2024-09-14 14:39 ` Andrew Lunn
2024-09-11 16:10 ` [PATCH net-next V2 5/5] net: lan743x: Add Support for 2.5G SFP with 2500Base-X Interface Raju Lakkaraju
2024-09-11 17:31 ` Andrew Lunn
2024-09-11 20:01 ` Maxime Chevallier
2024-09-12 7:01 ` Raju Lakkaraju
2024-09-12 11:49 ` Maxime Chevallier
2024-09-12 7:04 ` Raju Lakkaraju
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=4559162d-5502-4fc3-9e46-65393e28e082@lunn.ch \
--to=andrew@lunn.ch \
--cc=Bryan.Whitehead@microchip.com \
--cc=Daniel.Machon@microchip.com \
--cc=Raju.Lakkaraju@microchip.com \
--cc=Ronnie.Kunin@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.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: 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
all inboxes | Powered by JetHome®