Skip to content

net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family

Daniel Golle linux-devicetree lkml netdev 7 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest12 patches 11 repliesApplied 12/12
  2. v612 patches 3 repliesSuperseded
  3. v512 patches 8 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v412 patches2 repliesSuperseded
v312 patches22 repliesSuperseded
v213 patches5 repliesSuperseded
v113 patches2 repliesSuperseded

Changes in v7 from the cover letter

* improve cover letter
* complete documentation of series history, add lore links
* dt-bindings: put patternProperties: after properties: to follow standardized order
* dt-bindings: drop the addition of 'reg-names' to the list of required properties and also don't add it to the existing example

Patches in v7 All 12 applied

#Subject and filesSizeRepliesApplied
1/12net: dsa: lantiq_gswip: split into common and MMIO partsdrivers/net/dsa/lantiq/Kconfig drivers/net/dsa/lantiq/Makefile drivers/net/dsa/lantiq/lantiq_gswip.c +2 more+1658 -15920 repliesApplied
2/12net: dsa: lantiq_gswip: support enable/disable learningdrivers/net/dsa/lantiq/lantiq_gswip.h drivers/net/dsa/lantiq/lantiq_gswip_common.c+46 -00 repliesApplied
3/12net: dsa: lantiq_gswip: support Energy Efficient Ethernetdrivers/net/dsa/lantiq/lantiq_gswip.h drivers/net/dsa/lantiq/lantiq_gswip_common.c+54 -00 repliesApplied
4/12net: dsa: lantiq_gswip: set link parameters also for CPU portdrivers/net/dsa/lantiq/lantiq_gswip_common.c+1 -10 repliesApplied
5/12net: dsa: lantiq_gswip: define and use GSWIP_TABLE_MAC_BRIDGE_VAL1_VALIDdrivers/net/dsa/lantiq/lantiq_gswip.h drivers/net/dsa/lantiq/lantiq_gswip_common.c+7 -10 repliesApplied
6/12dt-bindings: net: dsa: lantiq,gswip: add MaxLinear RMII refclk output propertyDocumentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml+16 -21 replyApplied
7/12net: dsa: lantiq_gswip: add vendor property to setup MII refclk outputdrivers/net/dsa/lantiq/lantiq_gswip_common.c+2 -00 repliesApplied
8/12dt-bindings: net: dsa: lantiq,gswip: add support for MII delay propertiesDocumentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml+17 -10 repliesApplied
9/12net: dsa: lantiq_gswip: allow adjusting MII delaysdrivers/net/dsa/lantiq/lantiq_gswip.h drivers/net/dsa/lantiq/lantiq_gswip_common.c+60 -380 repliesApplied
10/12dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx switchesDocumentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml+123 -51 replyApplied
11/12net: dsa: add tagging driver for MaxLinear GSW1xx switch familyMAINTAINERS include/net/dsa.h include/uapi/linux/if_ether.h +3 more+130 -10 repliesApplied
12/12net: dsa: add driver for MaxLinear GSW1xx switch familydrivers/net/dsa/lantiq/Kconfig drivers/net/dsa/lantiq/Makefile drivers/net/dsa/lantiq/lantiq_gswip.h +3 more+1027 -09 repliesApplied

Reviews trailers per patch

9 of 12 patches have a Reviewed-by or Acked-by.

PatchAlexander SverdlinVladimir OlteanRussell King (Oracle)Krzysztof Kozlowski
1/12T-b R-b
2/12R-b
3/12R-b
4/12R-b T-b R-b
5/12
6/12R-b R-b
7/12R-b T-b
8/12R-b
9/12
10/12R-b
11/12R-b T-b
12/12T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v7 thread

Cover letter [PATCH net-next v7 00/12] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family

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 which are currently supported by the lantiq_gswip driver, but they are dedicated ICs connected via MDIO rather than built-in components of a SoC accessible via memory-mapped I/O.

The series includes several improvements and refactoring to implement support for GSW1xx switch ICs by reusing the existing lantiq_gswip driver.

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 RGMII delays via device tree properties
- Configurable RMII clock direction
- Energy Efficient Ethernet (EEE) support
- enabling/disabling learning
---
Series history:
v7:
* improve cover letter
* complete documentation of series history, add lore links
* dt-bindings: put patternProperties: after properties: to follow standardized order
* dt-bindings: drop the addition of 'reg-names' to the list of required properties and also don't add it to the existing example

v6: https://lore.kernel.org/all/[email protected]/
* keep properties on top level and use allOf for
conditional constraints
* switch order of patches, move deviation from dsa.yaml#/$defs/ethernet-ports to this patch which actually needs it

v5: https://lore.kernel.org/all/[email protected]/
* dt-bindings: drop maxlinear,rx-inverted from example

v4: https://lore.kernel.org/all/[email protected]/
* break out PCS reset into dedicated function
* drop hacky support for reverse-SGMII
* remove again the custom properties for TX and RX inverted SerDes PCS in favor of waiting for generic properties to land
* use __be16 to access tag fields
* define ETH_P_MXLGSW in if_ether.h
* drop *_SHIFT macros, get rid of _MASK suffix, use FIELD helpers
* print tag using %8ph
* drop maxlinear,rx-inverted and maxlinear,tx-inverted properties for now in favor of upcoming generic properties
* rework to use legacy codepath as fallback for RGMII delays
* set GSWIP_MII_CFG_RMII_CLK bit in RMII case inside the switch statement instead of a (wrong) if-clause just below
* keep previous behavior regarding GSWIP_TABLE_MAC_BRIDGE_VAL1_VALID for GSWIP 2.1 and earlier, this has been clarified by MaxLinear engineers
* remove misleading default delays

v3: https://lore.kernel.org/all/[email protected]/
* avoid disrupting link when calling .pcs_config()
* sort functions and phylink_pcs_ops instance in same order as struct definition
* always set bootstrap override bits and add explanatory comment
* move definitions to separate header file
* add custom properties for TX and RX inverted data on the SerDes interface
* dt-bindings: redefine ports node so properties which are defined actually apply
* dt-bindings: describe RGMII port with 2ps delay as 'rgmii-id' in example

v2: https://lore.kernel.org/all/[email protected]/
* removed left-overs of 4k VLAN support
* fix use of uninitialized variable
* remove git conflict left-overs which has somehow creeped into dt-bindings
* indent dt-bindings example with 4 spaces instead of tabs

v1: https://lore.kernel.org/all/[email protected]/
* preparations have been merged in several separate series:

    https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=f0a24b2547cfdd5ec85a131e386a2ce4ff9179cb

    https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=88224095b4e512b027289183f432c0e84925d648

    https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=764a47a639c73e8d941cbbb10696a0eb98d10d7b

    https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=1d8f0059091e757973324ae76253c2c059e0810f

    https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=6e8e6baf16ce7d2310959ae81d0194a56874e0d2

* comments received for the tag_max-gsw.c driver have been addressed

RFC: https://lore.kernel.org/all/[email protected]/

Daniel Golle (12):
net: dsa: lantiq_gswip: split into common and MMIO parts
net: dsa: lantiq_gswip: support enable/disable learning
net: dsa: lantiq_gswip: support Energy Efficient Ethernet
net: dsa: lantiq_gswip: set link parameters also for CPU port
net: dsa: lantiq_gswip: define and use
GSWIP_TABLE_MAC_BRIDGE_VAL1_VALID
dt-bindings: net: dsa: lantiq,gswip: add MaxLinear RMII refclk output
property
net: dsa: lantiq_gswip: add vendor property to setup MII refclk output
dt-bindings: net: dsa: lantiq,gswip: add support for MII delay
properties
net: dsa: lantiq_gswip: allow adjusting MII delays
dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx
switches
net: dsa: add tagging driver for MaxLinear GSW1xx switch family
net: dsa: add driver for MaxLinear GSW1xx switch family

 .../bindings/net/dsa/lantiq,gswip.yaml        |  164 +-
 MAINTAINERS                                   |    3 +-
 drivers/net/dsa/lantiq/Kconfig                |   18 +-
 drivers/net/dsa/lantiq/Makefile               |    2 +
 drivers/net/dsa/lantiq/lantiq_gswip.c         | 1617 +--------------
 drivers/net/dsa/lantiq/lantiq_gswip.h         |   20 +
 drivers/net/dsa/lantiq/lantiq_gswip_common.c  | 1737 +++++++++++++++++
 drivers/net/dsa/lantiq/mxl-gsw1xx.c           |  733 +++++++
 drivers/net/dsa/lantiq/mxl-gsw1xx.h           |  126 ++
 drivers/net/dsa/lantiq/mxl-gsw1xx_pce.h       |  154 ++
 include/net/dsa.h                             |    2 +
 include/uapi/linux/if_ether.h                 |    1 +
 net/dsa/Kconfig                               |    8 +
 net/dsa/Makefile                              |    1 +
 net/dsa/tag_mxl-gsw1xx.c                      |  116 ++
 15 files changed, 3101 insertions(+), 1601 deletions(-)
 create mode 100644 drivers/net/dsa/lantiq/lantiq_gswip_common.c
 create mode 100644 drivers/net/dsa/lantiq/mxl-gsw1xx.c
 create mode 100644 drivers/net/dsa/lantiq/mxl-gsw1xx.h
 create mode 100644 drivers/net/dsa/lantiq/mxl-gsw1xx_pce.h
 create mode 100644 net/dsa/tag_mxl-gsw1xx.c
Signature · 1 line
2.51.2