mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Arkadi Sharshevsky <arkadis@mellanox.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Andreas Schirm <andreas.schirm@siemens.com>,
	Lukas Stockmann <lukas.stockmann@siemens.com>,
	Alexander Sverdlin <alexander.sverdlin@siemens.com>,
	Peter Christen <peter.christen@siemens.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
	Juraj Povazanec <jpovazanec@maxlinear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	"Livia M. Rosu" <lrosu@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: [PATCH RFC net-next 00/23] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family
Date: Sat, 16 Aug 2025 20:50:44 +0100	[thread overview]
Message-ID: <aKDhFCNwjDDwRKsI@pidgin.makrotopia.org> (raw)

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

             reply	other threads:[~2025-08-16 19:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-16 19:50 Daniel Golle [this message]
2025-08-17 15:43 ` Andrew Lunn

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=aKDhFCNwjDDwRKsI@pidgin.makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=ajayaraman@maxlinear.com \
    --cc=alexander.sverdlin@siemens.com \
    --cc=andreas.schirm@siemens.com \
    --cc=andrew@lunn.ch \
    --cc=arkadis@mellanox.com \
    --cc=bxu@maxlinear.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=fchan@maxlinear.com \
    --cc=hauke@hauke-m.de \
    --cc=horms@kernel.org \
    --cc=john@phrozen.org \
    --cc=jpovazanec@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lrosu@maxlinear.com \
    --cc=lukas.stockmann@siemens.com \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=peter.christen@siemens.com \
    --cc=yweng@maxlinear.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®