From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
Vineeth Karumanchi <vineeth.karumanchi@amd.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-kernel@vger.kernel.org,
Kory Maincent <kory.maincent@bootlin.com>,
Daniel Golle <daniel@makrotopia.org>,
Simon Horman <horms@kernel.org>,
Christian Marangi <ansuelsmth@gmail.com>,
Lei Wei <quic_leiwei@quicinc.com>,
Michal Simek <michal.simek@amd.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Robert Hancock <robert.hancock@calian.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [net-next PATCH v6 06/10] net: pcs: Add Xilinx PCS driver
Date: Wed, 11 Jun 2025 07:11:14 +0200 [thread overview]
Message-ID: <20250611071114.325fb630@fedora.home> (raw)
In-Reply-To: <20250610233134.3588011-7-sean.anderson@linux.dev>
Hi Sean,
I only
On Tue, 10 Jun 2025 19:31:30 -0400
Sean Anderson <sean.anderson@linux.dev> wrote:
> This adds support for the Xilinx 1G/2.5G Ethernet PCS/PMA or SGMII device.
> This is a soft device which converts between GMII and either SGMII,
> 1000Base-X, or 2500Base-X. If configured correctly, it can also switch
> between SGMII and 1000BASE-X at runtime. Thoretically this is also possible
> for 2500Base-X, but that requires reconfiguring the serdes. The exact
> capabilities depend on synthesis parameters, so they are read from the
> devicetree.
>
> This device has a c22-compliant PHY interface, so for the most part we can
> just use the phylink helpers. This device supports an interrupt which is
> triggered on autonegotiation completion. I'm not sure how useful this is,
> since we can never detect a link down (in the PCS).
>
> This device supports sharing some logic between different implementations
> of the device. In this case, one device contains the "shared logic" and the
> clocks are connected to other devices. To coordinate this, one device
> registers a clock that the other devices can request. The clock is enabled
> in the probe function by releasing the device from reset. There are no othe
> software controls, so the clock ops are empty.
>
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
>
> Changes in v6:
> - Move axienet_pcs_fixup to AXI Ethernet commit
> - Use an empty statement for next label
>
> Changes in v5:
> - Export get_phy_c22_id when it is used
> - Expose bind attributes, since there is no issue in doing so
> - Use MDIO_BUS instead of MDIO_DEVICE
>
> Changes in v4:
> - Re-add documentation for axienet_xilinx_pcs_get that was accidentally
> removed
>
> Changes in v3:
> - Adjust axienet_xilinx_pcs_get for changes to pcs_find_fwnode API
> - Call devm_pcs_register instead of devm_pcs_register_provider
>
> Changes in v2:
> - Add support for #pcs-cells
> - Change compatible to just xlnx,pcs
> - Drop PCS_ALTERA_TSE which was accidentally added while rebasing
> - Rework xilinx_pcs_validate to just clear out half-duplex modes instead
> of constraining modes based on the interface.
>
> MAINTAINERS | 6 +
> drivers/net/pcs/Kconfig | 22 ++
> drivers/net/pcs/Makefile | 2 +
> drivers/net/pcs/pcs-xilinx.c | 427 +++++++++++++++++++++++++++++++++++
> drivers/net/phy/phy_device.c | 3 +-
> include/linux/phy.h | 1 +
> 6 files changed, 460 insertions(+), 1 deletion(-)
> create mode 100644 drivers/net/pcs/pcs-xilinx.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0ac6ba5c40cb..496513837921 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -27060,6 +27060,12 @@ L: netdev@vger.kernel.org
> S: Orphan
> F: drivers/net/ethernet/xilinx/ll_temac*
>
> +XILINX PCS DRIVER
> +M: Sean Anderson <sean.anderson@linux.dev>
> +S: Maintained
> +F: Documentation/devicetree/bindings/net/xilinx,pcs.yaml
> +F: drivers/net/pcs/pcs-xilinx.c
> +
> XILINX PWM DRIVER
> M: Sean Anderson <sean.anderson@seco.com>
> S: Maintained
> diff --git a/drivers/net/pcs/Kconfig b/drivers/net/pcs/Kconfig
> index f42839a0c332..e0223914362b 100644
> --- a/drivers/net/pcs/Kconfig
> +++ b/drivers/net/pcs/Kconfig
> @@ -52,4 +52,26 @@ config PCS_RZN1_MIIC
> on RZ/N1 SoCs. This PCS converts MII to RMII/RGMII or can be set in
> pass-through mode for MII.
>
> +config PCS_XILINX
> + tristate "Xilinx PCS driver"
> + default XILINX_AXI_EMAC
> + select COMMON_CLK
> + select GPIOLIB
> + select MDIO_BUS
> + select OF
> + select PCS
> + select PHYLINK
> + help
> + PCS driver for the Xilinx 1G/2.5G Ethernet PCS/PMA or SGMII device.
> + This device can either act as a PCS+PMA for 1000BASE-X or 2500BASE-X,
> + or as a GMII-to-SGMII bridge. It can also switch between 1000BASE-X
> + and SGMII dynamically if configured correctly when synthesized.
> + Typical applications use this device on an FPGA connected to a GEM or
> + TEMAC on the GMII side. The other side is typically connected to
> + on-device gigabit transceivers, off-device SERDES devices using TBI,
> + or LVDS IO resources directly.
> +
> + To compile this driver as a module, choose M here: the module
> + will be called pcs-xilinx.
> +
> endmenu
> diff --git a/drivers/net/pcs/Makefile b/drivers/net/pcs/Makefile
> index 35e3324fc26e..347afd91f034 100644
> --- a/drivers/net/pcs/Makefile
> +++ b/drivers/net/pcs/Makefile
> @@ -10,3 +10,5 @@ obj-$(CONFIG_PCS_XPCS) += pcs_xpcs.o
> obj-$(CONFIG_PCS_LYNX) += pcs-lynx.o
> obj-$(CONFIG_PCS_MTK_LYNXI) += pcs-mtk-lynxi.o
> obj-$(CONFIG_PCS_RZN1_MIIC) += pcs-rzn1-miic.o
> +obj-$(CONFIG_PCS_ALTERA_TSE) += pcs-altera-tse.o
There's something strange going-on here, as pcs-altera-tse was removed
in v6.4 :)
> +obj-$(CONFIG_PCS_XILINX) += pcs-xilinx.o
Maxime
next prev parent reply other threads:[~2025-06-11 5:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 23:31 [net-next PATCH v6 00/10] Add PCS core support Sean Anderson
2025-06-10 23:31 ` [net-next PATCH v6 01/10] dt-bindings: net: Add Xilinx PCS Sean Anderson
2025-06-10 23:31 ` [net-next PATCH v6 02/10] net: phylink: Support setting PCS link change callbacks Sean Anderson
2025-06-10 23:31 ` [net-next PATCH v6 03/10] net: pcs: Add subsystem Sean Anderson
2025-06-11 0:24 ` Randy Dunlap
2025-06-12 15:38 ` Sean Anderson
2025-06-10 23:31 ` [net-next PATCH v6 04/10] net: dsa: ocelot: suppress PHY device scanning on the internal MDIO bus Sean Anderson
2025-06-10 23:31 ` [net-next PATCH v6 05/10] net: pcs: lynx: Convert to an MDIO driver Sean Anderson
2025-06-13 11:27 ` kernel test robot
2025-06-10 23:31 ` [net-next PATCH v6 06/10] net: pcs: Add Xilinx PCS driver Sean Anderson
2025-06-11 5:11 ` Maxime Chevallier [this message]
2025-06-12 15:34 ` Sean Anderson
2025-06-12 0:14 ` kernel test robot
2025-06-10 23:31 ` [net-next PATCH v6 07/10] net: axienet: Convert to use PCS subsystem Sean Anderson
2025-06-11 20:56 ` kernel test robot
2025-06-11 22:19 ` kernel test robot
2025-06-10 23:31 ` [net-next PATCH v6 08/10] net: macb: Move most of mac_config to mac_prepare Sean Anderson
2025-06-10 23:35 ` Sean Anderson
2025-06-10 23:36 ` [net-next PATCH v6 09/10] net: macb: Support external PCSs Sean Anderson
2025-06-13 14:50 ` kernel test robot
2025-06-10 23:37 ` [net-next PATCH v6 10/10] of: property: Add device link support for PCS Sean Anderson
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=20250611071114.325fb630@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_leiwei@quicinc.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robert.hancock@calian.com \
--cc=sean.anderson@linux.dev \
--cc=vineeth.karumanchi@amd.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;
as well as URLs for NNTP newsgroup(s).