Microsemi Ocelot Ethernet switch support
Subsystems (7)
Alexandre Belloni
maintainerv3 cover 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).
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
Alexandre Belloni
maintainerPATCH v3 1/7 dt-bindings: net: add DT bindings for Microsemi MIIM
DT bindings for the Microsemi MII Management Controller found on Microsemi SoCs
--- .../devicetree/bindings/net/mscc-miim.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/mscc-miim.txt
Documentation/devicetree/bindings/net/mscc-miim.txt new file +26 -0
@@ -0,0 +1,26 @@ +Microsemi MII Management Controller (MIIM) / MDIO +================================================= + +Properties: +- compatible: must be "mscc,ocelot-miim" +- reg: The base address of the MDIO bus controller register bank. Optionally, a + second register bank can be defined if there is an associated reset register + for internal PHYs +- #address-cells: Must be <1>. +- #size-cells: Must be <0>. MDIO addresses have no size component. +- interrupts: interrupt specifier (refer to the interrupt binding) + +Typically an MDIO bus might have several children. + +Example: + mdio@107009c { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,ocelot-miim"; + reg = <0x107009c 0x36>, <0x10700f0 0x8>; + interrupts = <14>; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + };
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 1/7] dt-bindings: net: add DT bindings for Microsemi MIIM
Quoted 6 lines · Alexandre Belloni
DT bindings for the Microsemi MII Management Controller found on Microsemi SoCs
Reviewed-by Florian Fainelli <[email protected]>Reviewed-by Rob Herring <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Andrew
Alexandre Belloni
maintainerPATCH v3 2/7 net: phy: mscc-miim: Add MDIO driver
In reply to Alexandre BelloniAdd a driver for the Microsemi MII Management controller (MIIM) found on Microsemi SoCs.
On Ocelot, there are two controllers, one is connected to the internal PHYs, the other one can communicate with external PHYs.
--- drivers/net/phy/Kconfig | 7 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-mscc-miim.c | 197 +++++++++++++++++++++++++++++++ 3 files changed, 205 insertions(+) create mode 100644 drivers/net/phy/mdio-mscc-miim.c
drivers/net/phy/Kconfig +7 -0
@@ -123,6 +123,13 @@ config MDIO_MOXART This driver supports the MDIO interface found in the network interface units of the MOXA ART SoC +config MDIO_MSCC_MIIM + tristate "Microsemi MIIM interface support" + depends on HAS_IOMEM + help + This driver supports the MIIM (MDIO) interface found in the network + switches of the Microsemi SoCs + config MDIO_OCTEON tristate "Octeon and some ThunderX SOCs MDIO buses" depends on 64BIT
drivers/net/phy/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o +obj-$(CONFIG_MDIO_MSCC_MIIM) += mdio-mscc-miim.o obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o
drivers/net/phy/mdio-mscc-miim.c new file +197 -0
197 lines not on this page · raw message
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 2/7] net: phy: mscc-miim: Add MDIO driver
Quoted 7 lines · Alexandre Belloni
Add a driver for the Microsemi MII Management controller (MIIM) found on Microsemi SoCs.
On Ocelot, there are two controllers, one is connected to the internal PHYs, the other one can communicate with external PHYs.Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Nothing critical, so:
[snip]
drivers/net/phy/mdio-mscc-miim.c line 110
Quoted 8 lines
drivers/net/phy/mdio-mscc-miim.c new file +8
-0+static int mscc_miim_reset (struct mii_bus *bus) +{ +struct mscc_miim_dev *miim = bus->priv; + +if (miim->phy_regs) { +writel (0 , miim->phy_regs +MSCC_PHY_REG_PHY_CFG ); +writel (0x1ff , miim->phy_regs +MSCC_PHY_REG_PHY_CFG ); +mdelay (500 );
Can this become an msleep() in the future?
Quoted 37 lines
drivers/net/phy/mdio-mscc-miim.c new file +37
-0+ } + +return 0 ; +} + +static int mscc_miim_probe (struct platform_device *pdev) +{ +struct resource *res; +struct mii_bus *bus; +struct mscc_miim_dev *dev; +int ret; + + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -ENODEV ; + + bus =devm_mdiobus_alloc_size (&pdev->dev,sizeof (*dev)); +if (!bus) +return -ENOMEM ; + + bus->name ="mscc_miim" ; + bus->read = mscc_miim_read; + bus->write = mscc_miim_write; + bus->reset = mscc_miim_reset; +snprintf (bus->id,MII_BUS_ID_SIZE ,"%s-mii" ,dev_name (&pdev->dev)); + bus->parent = &pdev->dev; + + dev = bus->priv; + dev->regs =devm_ioremap_resource (&pdev->dev, res); +if (IS_ERR (dev->regs)) { +dev_err (&pdev->dev,"Unable to map MIIM registers\n" ); +return PTR_ERR (dev->regs); + } + + res =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); +if (res) { + dev->phy_regs =devm_ioremap_resource (&pdev->dev, res);
drivers/net/phy/mdio-mscc-miim.c line 157
Quoted 10 lines
drivers/net/phy/mdio-mscc-miim.c new file +10
-0+if (IS_ERR (dev->phy_regs)) { +dev_err (&pdev->dev,"Unable to map internal phy registers\n" ); +return PTR_ERR (dev->phy_regs); + } + } + +if (pdev->dev.of_node) + ret =of_mdiobus_register (bus, pdev->dev.of_node); +else + ret =mdiobus_register (bus);
There are other drivers doing that, we should probably make that the standard behavior of of_mdiobus_register(), like before, candidate for another patch.
Signature · 1 line
Florian
Alexandre Belloni
maintainerPATCH v3 3/7 dt-bindings: net: add DT bindings for Microsemi Ocelot Switch
In reply to Alexandre BelloniDT bindings for the Ethernet switch found on Microsemi Ocelot platforms.
--- .../devicetree/bindings/net/mscc-ocelot.txt | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/mscc-ocelot.txt
Documentation/devicetree/bindings/net/mscc-ocelot.txt new file +82 -0
@@ -0,0 +1,82 @@ +Microsemi Ocelot network Switch +=============================== + +The Microsemi Ocelot network switch can be found on Microsemi SoCs (VSC7513, +VSC7514) + +Required properties: +- compatible: Should be "mscc,vsc7514-switch" +- reg: Must contain an (offset, length) pair of the register set for each + entry in reg-names. +- reg-names: Must include the following entries: + - "sys" + - "rew" + - "qs" + - "hsio" + - "qsys" + - "ana" + - "portX" with X from 0 to the number of last port index available on that + switch +- interrupts: Should contain the switch interrupts for frame extraction and + frame injection +- interrupt-names: should contain the interrupt names: "xtr", "inj" +- ethernet-ports: A container for child nodes representing switch ports. + +The ethernet-ports container has the following properties + +Required properties: + +- #address-cells: Must be 1 +- #size-cells: Must be 0 + +Each port node must have the following mandatory properties: +- reg: Describes the port address in the switch + +Port nodes may also contain the following optional standardised +properties, described in binding documents: + +- phy-handle: Phandle to a PHY on an MDIO bus. See + Documentation/devicetree/bindings/net/ethernet.txt for details. + +Example: + + switch@1010000 { + compatible = "mscc,vsc7514-switch"; + reg = <0x1010000 0x10000>, + <0x1030000 0x10000>, + <0x1080000 0x100>, + <0x10d0000 0x10000>, + <0x11e0000 0x100>, + <0x11f0000 0x100>, + <0x1200000 0x100>, + <0x1210000 0x100>, + <0x1220000 0x100>, + <0x1230000 0x100>, + <0x1240000 0x100>, + <0x1250000 0x100>, + <0x1260000 0x100>, + <0x1270000 0x100>, + <0x1280000 0x100>, + <0x1800000 0x80000>, + <0x1880000 0x10000>; + reg-names = "sys", "rew", "qs", "hsio", "port0", + "port1", "port2", "port3", "port4", "port5", + "port6", "port7", "port8", "port9", "port10", + "qsys", "ana"; + interrupts = <21 22>; + interrupt-names = "xtr", "inj"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port0: port@0 { + reg = <0>; + phy-handle = <&phy0>; + }; + port1: port@1 { + reg = <1>; + phy-handle = <&phy1>; + }; + }; + };
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 3/7] dt-bindings: net: add DT bindings for Microsemi Ocelot Switch
Quoted 4 lines · Alexandre Belloni
DT bindings for the Ethernet switch found on Microsemi Ocelot platforms.
Reviewed-by Rob Herring <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Andrew
Re: [PATCH net-next v3 3/7] dt-bindings: net: add DT bindings for Microsemi Ocelot Switch
In reply to Alexandre BelloniQuoted 4 lines · Alexandre Belloni
DT bindings for the Ethernet switch found on Microsemi Ocelot platforms.
Reviewed-by Rob Herring <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Signature · 1 line
Florian
Alexandre Belloni
maintainerPATCH v3 4/7 net: mscc: Add initial Ocelot switch support
In reply to Alexandre BelloniAdd a driver for Microsemi Ocelot Ethernet switch support.
This makes two modules:mscc_ocelot_common handles all the common features that doesn't depend on how the switch is integrated in the SoC. Currently, it handles offloading bridging to the hardware. ocelot_io.c handles register accesses. This is unfortunately needed because the register layout is packed and then depends on the number of ports available on the switch. The register definition files are automatically generated.
ocelot_board handles the switch integration on the SoC and on the board.
Frame injection and extraction to/from the CPU port is currently done using register accesses which is quite slow. DMA is possible but the port is not able to absorb the whole switch bandwidth.
--- 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 ++ 17 files changed, 5283 insertions(+) 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
drivers/net/ethernet/Kconfig +1 -0
@@ -114,6 +114,7 @@ source "drivers/net/ethernet/mediatek/Kconfig" source "drivers/net/ethernet/mellanox/Kconfig" source "drivers/net/ethernet/micrel/Kconfig" source "drivers/net/ethernet/microchip/Kconfig" +source "drivers/net/ethernet/mscc/Kconfig" source "drivers/net/ethernet/moxa/Kconfig" source "drivers/net/ethernet/myricom/Kconfig"
drivers/net/ethernet/Makefile +1 -0
@@ -55,6 +55,7 @@ obj-$(CONFIG_NET_VENDOR_MEDIATEK) += mediatek/ obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/ obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/ obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/ +obj-$(CONFIG_NET_VENDOR_MICROSEMI) += mscc/ obj-$(CONFIG_NET_VENDOR_MOXART) += moxa/ obj-$(CONFIG_NET_VENDOR_MYRI) += myricom/ obj-$(CONFIG_FEALNX) += fealnx.o
drivers/net/ethernet/mscc/Kconfig new file +30 -0
@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0 OR MIT) +config NET_VENDOR_MICROSEMI + bool "Microsemi devices" + default y + help + If you have a network (Ethernet) card belonging to this class, say Y. + + Note that the answer to this question doesn't directly affect the + kernel: saying N will just cause the configurator to skip all + the questions about Microsemi devices. + +if NET_VENDOR_MICROSEMI + +config MSCC_OCELOT_SWITCH + tristate "Ocelot switch driver" + depends on NET_SWITCHDEV + depends on HAS_IOMEM + select PHYLIB + select REGMAP_MMIO + help + This driver supports the Ocelot network switch device. + +config MSCC_OCELOT_SWITCH_OCELOT + tristate "Ocelot switch driver on Ocelot" + depends on MSCC_OCELOT_SWITCH + help + This driver supports the Ocelot network switch device as present on + the Ocelot SoCs. + +endif # NET_VENDOR_MICROSEMI
drivers/net/ethernet/mscc/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: (GPL-2.0 OR MIT) +obj-$(CONFIG_MSCC_OCELOT_SWITCH) += mscc_ocelot_common.o +mscc_ocelot_common-y := ocelot.o ocelot_io.o +mscc_ocelot_common-y += ocelot_regs.o +obj-$(CONFIG_MSCC_OCELOT_SWITCH_OCELOT) += ocelot_board.o
drivers/net/ethernet/mscc/ocelot.c new file +1333 -0
1,333 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot.h new file +572 -0
572 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_ana.h new file +625 -0
625 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_board.c new file +316 -0
316 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_dev.h new file +275 -0
105 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_dev_gmii.h new file +154 -0
154 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_hsio.h new file +785 -0
785 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_io.c new file +116 -0
116 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_qs.h new file +78 -0
78 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_qsys.h new file +270 -0
270 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_regs.c new file +497 -0
497 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_rew.h new file +81 -0
81 lines not on this page · raw message
drivers/net/ethernet/mscc/ocelot_sys.h new file +144 -0
144 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.0
Part of the diff is not shown here. View the raw message.
Re: [PATCH net-next v3 4/7] net: mscc: Add initial Ocelot switch support
Quoted 10 lines · Alexandre Belloni
Add a driver for Microsemi Ocelot Ethernet switch support.
This makes two modules:
mscc_ocelot_commonhandles all the common features that doesn't depend on how the switch is integrated in the SoC. Currently, it handles offloading bridging to the hardware.ocelot_io.chandles register accesses. This is unfortunately needed because the register layout is packed and then depends on the number of ports available on the switch. The register definition files are automatically generated.
Quoted 7 lines
ocelot_boardhandles the switch integration on the SoC and on the board.Frame injection and extraction to/from the CPU port is currently done using register accesses which is quite slow. DMA is possible but the port is not able to absorb the whole switch bandwidth.
Signed-off-by Alexandre Belloni <[email protected]>
Hi Alexandre
There are a few Christmas trees which are not fully reversed. DaveM might want them putting right.
But otherwise i think this is good enough to be merged.
Andrew
Alexandre Belloni
maintainerPATCH v3 5/7 MIPS: mscc: Add switch to ocelot
In reply to Alexandre BelloniOcelot has an integrated switch, add support for it.
--- arch/mips/boot/dts/mscc/ocelot.dtsi | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+)
arch/mips/boot/dts/mscc/ocelot.dtsi +88 -0
@@ -91,6 +91,72 @@ status = "disabled"; }; + switch@1010000 { + compatible = "mscc,vsc7514-switch"; + reg = <0x1010000 0x10000>, + <0x1030000 0x10000>, + <0x1080000 0x100>, + <0x10d0000 0x10000>, + <0x11e0000 0x100>, + <0x11f0000 0x100>, + <0x1200000 0x100>, + <0x1210000 0x100>, + <0x1220000 0x100>, + <0x1230000 0x100>, + <0x1240000 0x100>, + <0x1250000 0x100>, + <0x1260000 0x100>, + <0x1270000 0x100>, + <0x1280000 0x100>, + <0x1800000 0x80000>, + <0x1880000 0x10000>; + reg-names = "sys", "rew", "qs", "hsio", "port0", + "port1", "port2", "port3", "port4", "port5", + "port6", "port7", "port8", "port9", "port10", + "qsys", "ana"; + interrupts = <21 22>; + interrupt-names = "xtr", "inj"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port0: port@0 { + reg = <0>; + }; + port1: port@1 { + reg = <1>; + }; + port2: port@2 { + reg = <2>; + }; + port3: port@3 { + reg = <3>; + }; + port4: port@4 { + reg = <4>; + }; + port5: port@5 { + reg = <5>; + }; + port6: port@6 { + reg = <6>; + }; + port7: port@7 { + reg = <7>; + }; + port8: port@8 { + reg = <8>; + }; + port9: port@9 { + reg = <9>; + }; + port10: port@10 { + reg = <10>; + }; + }; + }; + reset@1070008 { compatible = "mscc,ocelot-chip-reset"; reg = <0x1070008 0x4>;
@@ -113,5 +179,27 @@ function = "uart2"; }; }; + + mdio0: mdio@107009c { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,ocelot-miim"; + reg = <0x107009c 0x36>, <0x10700f0 0x8>; + interrupts = <14>; + status = "disabled"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + phy1: ethernet-phy@1 { + reg = <1>; + }; + phy2: ethernet-phy@2 { + reg = <2>; + }; + phy3: ethernet-phy@3 { + reg = <3>; + }; + }; }; };
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 5/7] MIPS: mscc: Add switch to ocelot
Quoted 4 lines · Alexandre Belloni
Ocelot has an integrated switch, add support for it.
Cc James Hogan <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Andrew
Re: [PATCH net-next v3 5/7] MIPS: mscc: Add switch to ocelot
In reply to Alexandre BelloniQuoted 4 lines · Alexandre Belloni
Ocelot has an integrated switch, add support for it.
Cc James Hogan <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Signature · 1 line
Florian
Alexandre Belloni
maintainerPATCH v3 6/7 MIPS: mscc: connect phys to ports on ocelot_pcb123
In reply to Alexandre BelloniAdd phy to switch port connections for PCB123 for internal PHYs.
--- arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/mips/boot/dts/mscc/ocelot_pcb123.dts +20 -0
@@ -25,3 +25,23 @@ &uart2 { status = "okay"; }; + +&mdio0 { + status = "okay"; +}; + +&port0 { + phy-handle = <&phy0>; +}; + +&port1 { + phy-handle = <&phy1>; +}; + +&port2 { + phy-handle = <&phy2>; +}; + +&port3 { + phy-handle = <&phy3>; +};
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 6/7] MIPS: mscc: connect phys to ports on ocelot_pcb123
Quoted 4 lines · Alexandre Belloni
Add phy to switch port connections for PCB123 for internal PHYs.
Cc James Hogan <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Andrew
Re: [PATCH net-next v3 6/7] MIPS: mscc: connect phys to ports on ocelot_pcb123
In reply to Alexandre BelloniQuoted 4 lines · Alexandre Belloni
Add phy to switch port connections for PCB123 for internal PHYs.
Cc James Hogan <[email protected]>Signed-off-by Alexandre Belloni <[email protected]>
Signature · 1 line
Florian
Alexandre Belloni
maintainerPATCH v3 7/7 MAINTAINERS: Add entry for Microsemi Ethernet switches
In reply to Alexandre BelloniAdd myself as a maintainer for the Microsemi Ethernet switches.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -9280,6 +9280,12 @@ F: include/linux/cciss*.h F: include/uapi/linux/cciss*.h F: Documentation/scsi/smartpqi.txt +MICROSEMI ETHERNET SWITCH DRIVER +M: Alexandre Belloni <[email protected]> +L: [email protected] +S: Supported +F: drivers/net/ethernet/mscc/ + MICROSOFT SURFACE PRO 3 BUTTON DRIVER M: Chen Yu <[email protected]> L: [email protected]
Signature · 1 line
2.17.0
Re: [PATCH net-next v3 7/7] MAINTAINERS: Add entry for Microsemi Ethernet switches
Quoted 3 lines · Alexandre Belloni
Add myself as a maintainer for the Microsemi Ethernet switches.
Signed-off-by Alexandre Belloni <[email protected]>
Andrew
Quoted 24 lines
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)MAINTAINERS +6
-0@@ -9280,6 +9280,12 @@ F: include/linux/cciss*.h F: include/uapi/linux/cciss*.h F: Documentation/scsi/smartpqi.txt +MICROSEMI ETHERNET SWITCH DRIVER +M: Alexandre Belloni <[email protected]> +L: [email protected] +S: Supported +F: drivers/net/ethernet/mscc/ + MICROSOFT SURFACE PRO 3 BUTTON DRIVER M: Chen Yu <[email protected]> L: [email protected]Signature · 1 line
2.17.0
Andrew Lunn
maintainerHi Alexandre
Quoted 3 lines
The ocelot dts changes are here for reference and should probably go through the MIPS tree once the bindings are accepted.
For your next version, you probably want to drop those patches, so that David can apply the network patches to net-next.
Andrew
Quoted 7 lines · Andrew Lunn
Hi Alexandre
Quoted 3 lines
The ocelot dts changes are here for reference and should probably go through the MIPS tree once the bindings are accepted.
For your next version, you probably want to drop those patches, so that David can apply the network patches to net-next.
Since it sounds like the net patches are ready now, I'll apply the MIPS DTS ones for 4.18.
Thanks
James
Alexandre Belloni
maintainerQuoted 12 lines · James Hogan
Quoted 7 lines · Andrew Lunn
Hi Alexandre
Quoted 3 lines
The ocelot dts changes are here for reference and should probably go through the MIPS tree once the bindings are accepted.
For your next version, you probably want to drop those patches, so that David can apply the network patches to net-next.
Since it sounds like the net patches are ready now, I'll apply the MIPS DTS ones for 4.18.
They are in now, tell me if you want me to resend.
Anyway, I'll probably send another patch to enable the driver in board-ocelot.config
Signature · 3 lines
Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
David Miller
maintainerFrom: Alexandre Belloni <[email protected]>
Date: Mon, 14 May 2018 22:04:53 +0200
Quoted 2 lines
The ocelot dts changes are here for reference and should probably go through the MIPS tree once the bindings are accepted.
Ok, series applied to net-next minus patches #5 and #6.
Thank you.