Skip to content

Microsemi Ocelot Ethernet switch support

Alexandre Belloni linux-mips lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 14 repliesIn review
  2. v27 patches 7 repliesSuperseded
  3. v18 patches 33 repliesSuperseded

Changes in v3 from the cover letter

- Collected Reviewed-by
* Switchdev driver:
- Fixed two issues reported by kbuild
- Modified ethtool statistics to support different layoiut on different chips and take care of counter overflow

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7dt-bindings: net: add DT bindings for Microsemi MIIMDocumentation/devicetree/bindings/net/mscc-miim.txt+26 -01 reply
2/7net: phy: mscc-miim: Add MDIO driverdrivers/net/phy/Kconfig drivers/net/phy/Makefile drivers/net/phy/mdio-mscc-miim.c+205 -01 reply
3/7dt-bindings: net: add DT bindings for Microsemi Ocelot SwitchDocumentation/devicetree/bindings/net/mscc-ocelot.txt+82 -02 replies
4/7net: mscc: Add initial Ocelot switch supportdrivers/net/ethernet/Kconfig drivers/net/ethernet/Makefile drivers/net/ethernet/mscc/Kconfig +14 more+5283 -01 reply
5/7MIPS: mscc: Add switch to ocelotarch/mips/boot/dts/mscc/ocelot.dtsi+88 -02 replies
6/7MIPS: mscc: connect phys to ports on ocelot_pcb123arch/mips/boot/dts/mscc/ocelot_pcb123.dts+20 -02 replies
7/7MAINTAINERS: Add entry for Microsemi Ethernet switchesMAINTAINERS+6 -01 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchAndrew LunnRob HerringFlorian Fainelli
1/7R-b R-b R-b
2/7R-b R-b
3/7R-b R-b R-b
4/7R-b
5/7R-b R-b
6/7R-b R-b
7/7R-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 3 reviewers.

Read the v3 thread

Cover letter [PATCH net-next v3 0/7] Microsemi Ocelot Ethernet switch support

Hi,

This series adds initial support for the Microsemi Ethernet switch present on Ocelot SoCs.

This only has bridging (and STP) support for now and it uses the switchdev framework.
Coming features are VLAN filtering, link aggregation, IGMP snooping.

The switch can also be connected to an external CPU using PCIe.

Also, support for integration on other SoCs will be submitted.

The ocelot dts changes are here for reference and should probably go through the MIPS tree once the bindings are accepted.

Changes in v3:
- Collected Reviewed-by
* Switchdev driver:
- Fixed two issues reported by kbuild
- Modified ethtool statistics to support different layoiut on different chips and take care of counter overflow

Changes in v2:
- Dropped Microsemi Ocelot PHY support
* MIIM driver:
- Documented interrupts bindings
- Moved the driver to drivers/net/phy/
- Removed unused mutex
- Removed MDIO bus scanning
* Switchdev driver:
- Changed compatible to mscc,vsc7514-switch
- Removed unused header inclusion
- Factorized MAC table selection in ocelot_mact_select()
- Disable the port in ocelot_port_stop()
- Fixed the smatch endianness warnings
- int to unsinged int where necessary
- Removed VID handling for the FDB it has been reworked anyway and will be submitted with VLAN support
- Fixed up unused cases in ocelot_port_attr_set()
- Added a loop to register all the IO register spaces
- the ports are now in an ethernet-ports node

I've tried switching to NAPI but this is not working well, mainly because the only way to disable interrupts is to actually mask them in the interrupt controller (it is not possible to tell the switch to stop generating interrupts).

Cc James Hogan <[email protected]>

Alexandre Belloni (7):
dt-bindings: net: add DT bindings for Microsemi MIIM
net: phy: mscc-miim: Add MDIO driver
dt-bindings: net: add DT bindings for Microsemi Ocelot Switch
net: mscc: Add initial Ocelot switch support
MIPS: mscc: Add switch to ocelot
MIPS: mscc: connect phys to ports on ocelot_pcb123
MAINTAINERS: Add entry for Microsemi Ethernet switches

 .../devicetree/bindings/net/mscc-miim.txt     |   26 +
 .../devicetree/bindings/net/mscc-ocelot.txt   |   82 +
 MAINTAINERS                                   |    6 +
 arch/mips/boot/dts/mscc/ocelot.dtsi           |   88 ++
 arch/mips/boot/dts/mscc/ocelot_pcb123.dts     |   20 +
 drivers/net/ethernet/Kconfig                  |    1 +
 drivers/net/ethernet/Makefile                 |    1 +
 drivers/net/ethernet/mscc/Kconfig             |   30 +
 drivers/net/ethernet/mscc/Makefile            |    5 +
 drivers/net/ethernet/mscc/ocelot.c            | 1333 +++++++++++++++++
 drivers/net/ethernet/mscc/ocelot.h            |  572 +++++++
 drivers/net/ethernet/mscc/ocelot_ana.h        |  625 ++++++++
 drivers/net/ethernet/mscc/ocelot_board.c      |  316 ++++
 drivers/net/ethernet/mscc/ocelot_dev.h        |  275 ++++
 drivers/net/ethernet/mscc/ocelot_dev_gmii.h   |  154 ++
 drivers/net/ethernet/mscc/ocelot_hsio.h       |  785 ++++++++++
 drivers/net/ethernet/mscc/ocelot_io.c         |  116 ++
 drivers/net/ethernet/mscc/ocelot_qs.h         |   78 +
 drivers/net/ethernet/mscc/ocelot_qsys.h       |  270 ++++
 drivers/net/ethernet/mscc/ocelot_regs.c       |  497 ++++++
 drivers/net/ethernet/mscc/ocelot_rew.h        |   81 +
 drivers/net/ethernet/mscc/ocelot_sys.h        |  144 ++
 drivers/net/phy/Kconfig                       |    7 +
 drivers/net/phy/Makefile                      |    1 +
 drivers/net/phy/mdio-mscc-miim.c              |  197 +++
 25 files changed, 5710 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/mscc-miim.txt
 create mode 100644 Documentation/devicetree/bindings/net/mscc-ocelot.txt
 create mode 100644 drivers/net/ethernet/mscc/Kconfig
 create mode 100644 drivers/net/ethernet/mscc/Makefile
 create mode 100644 drivers/net/ethernet/mscc/ocelot.c
 create mode 100644 drivers/net/ethernet/mscc/ocelot.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_ana.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_board.c
 create mode 100644 drivers/net/ethernet/mscc/ocelot_dev.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_dev_gmii.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_hsio.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_io.c
 create mode 100644 drivers/net/ethernet/mscc/ocelot_qs.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_qsys.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_regs.c
 create mode 100644 drivers/net/ethernet/mscc/ocelot_rew.h
 create mode 100644 drivers/net/ethernet/mscc/ocelot_sys.h
 create mode 100644 drivers/net/phy/mdio-mscc-miim.c
Signature · 1 line
2.17.0