From: "Clément Léger" <clement.leger@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: "Horatiu Vultur" <horatiu.vultur@microchip.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Allan Nielsen" <allan.nielsen@microchip.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Clément Léger" <clement.leger@bootlin.com>
Subject: [RFC PATCH net-next v2 00/11] add fwnode based mdiobus registration
Date: Thu, 31 Mar 2022 11:25:22 +0200 [thread overview]
Message-ID: <20220331092533.348626-1-clement.leger@bootlin.com> (raw)
In order to allow the mdiobus to be used completely with fwnode and
continue to add fwnode support. This series adds
fwnode_mdiobus_register() which allows to register a MDIO bus with a
fwnode_handle. This support also works with device-tree and thus allows
to integrate of_mdobus_register on top of fwnode support.
ACPI acpi_mdiobus_register() function seems similar enough with
fwnode_mdiobus_register() to be integrated into that later one and thus
remove ACPI specific registration, keeping only the fwnode one for all
types of node. I'm not able to test that specific part so I did not do
it in this series.
This series is a subset of the one that was first submitted as a larger
series to add swnode support [1]. In this one, it will be focused on
fwnode support only since it seems to have reach a consensus that
adding fwnode to subsystems makes sense.
Additional information:
The device I'm trying to support is a PCIe card that uses a lan9662
SoC. This card is meant to be used an ethernet switch with 2 x RJ45
ports and 2 x 10G SFPs. The lan966x SoCs can be used in two different
ways:
- It can run Linux by itself, on ARM64 cores included in the SoC. This
use-case of the lan966x is currently being upstreamed, using a
traditional Device Tree representation of the lan996x HW blocks [1]
A number of drivers for the different IPs of the SoC have already
been merged in upstream Linux.
- It can be used as a PCIe endpoint, connected to a separate platform
that acts as the PCIe root complex. In this case, all the devices
that are embedded on this SoC are exposed through PCIe BARs and the
ARM64 cores of the SoC are not used. Since this is a PCIe card, it
can be plugged on any platform, of any architecture supporting PCIe.
The goal if this work is to allow OF based drivers to be reused with
software nodes by supporting fwnode in multiple subsystems.
[1] https://lore.kernel.org/netdev/YhPSkz8+BIcdb72R@smile.fi.intel.com/T/
---
Changes in V2:
- Split legacy phy compatible checking in of as preliminary work
- Fix missing static inline in fwnode_mdio.h file
- Split fwnode conversion into multiple patches
- Split OF conversion in multiple patches
- Remove legacy OF handling from fwnode_mdiobus_* variants
- Switch to RFC since net-next is closed
Clément Léger (11):
net: mdio: fwnode: import of_mdiobus_register() and needed functions
net: mdio: fwnode: remove legacy compatible checking for phy child
net: mdio: fwnode: remove legacy phy scanning
net: mdio: fwnode: convert fwnode_mdiobus_register() for fwnode
net: mdio: fwnode: add fwnode_mdiobus_register()
net: mdio: of: wrap fwnode_mdio_parse_addr() in of_mdio_parse_addr()
net: mdio: fwnode: avoid calling of_* functions with non OF nodes
net: mdio: fwnode: allow phy device registration with non OF nodes
net: mdio: of: use fwnode_mdiobus_child_is_phy()
net: mdio: of: use fwnode_mdiobus_register() in of_mdiobus_register()
net: mdio: mscc-miim: use fwnode_mdiobus_register()
drivers/net/mdio/fwnode_mdio.c | 157 +++++++++++++++++++++++++++++-
drivers/net/mdio/mdio-mscc-miim.c | 4 +-
drivers/net/mdio/of_mdio.c | 100 +------------------
include/linux/fwnode_mdio.h | 28 +++++-
include/linux/of_mdio.h | 23 +----
5 files changed, 188 insertions(+), 124 deletions(-)
--
2.34.1
next reply other threads:[~2022-03-31 9:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 9:25 Clément Léger [this message]
2022-03-31 9:25 ` [RFC PATCH net-next v2 01/11] net: mdio: fwnode: import of_mdiobus_register() and needed functions Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 02/11] net: mdio: fwnode: remove legacy compatible checking for phy child Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 03/11] net: mdio: fwnode: remove legacy phy scanning Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 04/11] net: mdio: fwnode: convert fwnode_mdiobus_register() for fwnode Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 05/11] net: mdio: fwnode: add fwnode_mdiobus_register() Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 06/11] net: mdio: of: wrap fwnode_mdio_parse_addr() in of_mdio_parse_addr() Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 07/11] net: mdio: fwnode: avoid calling of_* functions with non OF nodes Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 08/11] net: mdio: fwnode: allow phy device registration " Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 09/11] net: mdio: of: use fwnode_mdiobus_child_is_phy() Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 10/11] net: mdio: of: use fwnode_mdiobus_register() in of_mdiobus_register() Clément Léger
2022-03-31 9:25 ` [RFC PATCH net-next v2 11/11] net: mdio: mscc-miim: use fwnode_mdiobus_register() Clément Léger
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=20220331092533.348626-1-clement.leger@bootlin.com \
--to=clement.leger@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®