netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next 00/23] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family
@ 2025-08-16 19:50 Daniel Golle
  2025-08-17 15:43 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Golle @ 2025-08-16 19:50 UTC (permalink / raw)
  To: Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Hauke Mehrtens, Simon Horman,
	Russell King, Florian Fainelli, Arkadi Sharshevsky, linux-kernel,
	netdev
  Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
	Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
	Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
	Livia M. Rosu, John Crispin

This patch series extends the existing lantiq_gswip DSA driver to support
the MaxLinear GSW1xx family of dedicated Ethernet switch ICs. These switches
are based on the same IP as the Lantiq/Intel GSWIP found in VR9 and xRX
MIPS router SoCs, but are connected via MDIO instead of memory-mapped I/O.

The series includes several improvements and refactoring to prepare for the
new hardware support.

The GSW1xx family includes several variants:
- GSW120: 4 ports, 2 PHYs, RGMII & SGMII/2500Base-X
- GSW125: 4 ports, 2 PHYs, RGMII & SGMII/2500Base-X, industrial temperature
- GSW140: 6 ports, 4 PHYs, RGMII & SGMII/2500Base-X  
- GSW141: 6 ports, 4 PHYs, RGMII & SGMII
- GSW145: 6 ports, 4 PHYs, RGMII & SGMII/2500Base-X, industrial temperature

Key features implemented:
- MDIO-based register access using regmap
- Support for SGMII/1000Base-X/2500Base-X SerDes interfaces
- Configurable MII delays via device tree properties
- Energy Efficient Ethernet (EEE) support
- 4096 VLAN support on newer API versions
- Assisted learning on CPU port

This is submitted as RFC to gather feedback on the approach, particularly
regarding the prefered order of things, ie. should I first introduce all
features (some are already supported on GRX3xx), then split into MDIO and
common parts, then add new hardware like I did now, or rather first split
into MDIO and common parts, then add new hardware support and then new
features would follow (maybe even in follow series)?

Basic testing has be carried out on the GSW145 reference board, confirming
everything works as fine as it does on older Lantiq GSWIP hardware.
Brief testing also showed that nothing breaks on Lantiq VR9 (VRX208),
testing on slightly newer Intel GRX330 hardware is going to follow.

As Vladimir Oltean is working on a series of patches improving lantiq_gswip
the first patch of this series is likely to be replaced by his work and can
be ignored for now. I've included it anyway for completeness as that is also
what I have been testing.

Daniel Golle (23):
  net: dsa: lantiq_gswip: honor dsa_db passed to port_fdb_{add,del}
  net: dsa: lantiq_gswip: deduplicate dsa_switch_ops
  net: dsa: lantiq_gswip: prepare for more CPU port options
  net: dsa: lantiq_gswip: move definitions to header
  net: dsa: lantiq_gswip: introduce bitmaps for port types
  net: dsa: lantiq_gswip: load model-specific microcode
  net: dsa: lantiq_gswip: make DSA tag protocol model-specific
  net: dsa: lantiq_gswip: store switch API version in priv
  net: dsa: lantiq_gswip: add support for SWAPI version 2.3
  net: dsa: lantiq_gswip: support enable/disable learning
  net: dsa: lantiq_gswip: support Energy Efficient Ethernet
  net: dsa: lantiq_gswip: support 4k VLANs on API 2.2 or later
  net: dsa: lantiq_gswip: support model-specific mac_select_pcs()
  net: dsa: lantiq_gswip: support GSW1xx offset of MII register
  net: dsa: lantiq_gswip: allow adjusting MII delays
  net: dsa: lantiq_gswip: support standard MDIO node name
  net: dsa: lantiq_gswip: move MDIO bus registration to .setup()
  net: dsa: lantiq_gswip: convert to use regmap
  net: dsa: lantiq_gswip: split into common and MMIO parts
  net: dsa: lantiq_gswip: add registers specific for MaxLinear GSW1xx
  net: dsa: add tagging driver for MaxLinear GSW1xx switch family
  net: dsa: add driver for MaxLinear GSW1xx switch family
  net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config()

 drivers/net/dsa/Kconfig               |   17 +
 drivers/net/dsa/Makefile              |    2 +
 drivers/net/dsa/lantiq_gswip.c        | 1933 ++-----------------------
 drivers/net/dsa/lantiq_gswip.h        |  408 ++++++
 drivers/net/dsa/lantiq_gswip_common.c | 1778 +++++++++++++++++++++++
 drivers/net/dsa/lantiq_pce.h          |    9 +-
 drivers/net/dsa/mxl-gsw1xx.c          |  710 +++++++++
 drivers/net/dsa/mxl-gsw1xx_pce.h      |  160 ++
 include/net/dsa.h                     |    2 +
 net/dsa/Kconfig                       |    8 +
 net/dsa/Makefile                      |    1 +
 net/dsa/tag_mxl-gsw1xx.c              |  141 ++
 12 files changed, 3331 insertions(+), 1838 deletions(-)
 create mode 100644 drivers/net/dsa/lantiq_gswip.h
 create mode 100644 drivers/net/dsa/lantiq_gswip_common.c
 create mode 100644 drivers/net/dsa/mxl-gsw1xx.c
 create mode 100644 drivers/net/dsa/mxl-gsw1xx_pce.h
 create mode 100644 net/dsa/tag_mxl-gsw1xx.c

-- 
2.50.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH RFC net-next 00/23] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family
  2025-08-16 19:50 [PATCH RFC net-next 00/23] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family Daniel Golle
@ 2025-08-17 15:43 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2025-08-17 15:43 UTC (permalink / raw)
  To: Daniel Golle
  Cc: Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Hauke Mehrtens, Simon Horman, Russell King,
	Florian Fainelli, Arkadi Sharshevsky, linux-kernel, netdev,
	Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
	Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
	Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
	Livia M. Rosu, John Crispin

> This is submitted as RFC to gather feedback on the approach, particularly
> regarding the prefered order of things, ie. should I first introduce all
> features (some are already supported on GRX3xx), then split into MDIO and
> common parts, then add new hardware like I did now, or rather first split
> into MDIO and common parts, then add new hardware support and then new
> features would follow (maybe even in follow series)?

I think the first 8 patches can be merged as a series. You can see
these are preparation for new features, but don't actually add any new
features, so make a reasonable set. 23 patches is too many for one
set.

I have not looked at the remaining patches.

	Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-17 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 19:50 [PATCH RFC net-next 00/23] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family Daniel Golle
2025-08-17 15:43 ` Andrew Lunn

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).