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

From: Alexandre Belloni
Date: Mon May 14 2018 - 16:06:05 EST


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 <jhogan@xxxxxxxxxx>

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

--
2.17.0