Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 967dd82f authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: dsa: b53: Add support for Broadcom RoboSwitch



This patch adds support for Broadcom's BCM53xx switch family, also known
as RoboSwitch. Some of these switches are ubiquituous, found in home
routers, Wi-Fi routers, DSL and cable modem gateways and other
networking related products.

This drivers adds the library driver (b53_common.c) as well as a few bus
glue drivers for MDIO, SPI, Switch Register Access Block (SRAB) and
memory-mapped I/O into a SoC's address space (Broadcom BCM63xx/33xx).

Basic operations are supported to bring the Layer 1/2 up and running,
but not much more at this point, subsequent patches add the remaining
features.

Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 409a5f27
Loading
Loading
Loading
Loading
+88 −0
Original line number Diff line number Diff line
Broadcom BCM53xx Ethernet switches
==================================

Required properties:

- compatible: For external switch chips, compatible string must be exactly one
  of: "brcm,bcm5325"
      "brcm,bcm53115"
      "brcm,bcm53125"
      "brcm,bcm53128"
      "brcm,bcm5365"
      "brcm,bcm5395"
      "brcm,bcm5397"
      "brcm,bcm5398"

  For the BCM5310x SoCs with an integrated switch, must be one of:
      "brcm,bcm53010-srab"
      "brcm,bcm53011-srab"
      "brcm,bcm53012-srab"
      "brcm,bcm53018-srab"
      "brcm,bcm53019-srab" and the mandatory "brcm,bcm5301x-srab" string

  For the BCM63xx/33xx SoCs with an integrated switch, must be one of:
      "brcm,bcm3384-switch"
      "brcm,bcm6328-switch"
      "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"

See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
required and optional properties.

Examples:

Ethernet switch connected via MDIO to the host, CPU port wired to eth0:

	eth0: ethernet@10001000 {
		compatible = "brcm,unimac";
		reg = <0x10001000 0x1000>;

		fixed-link {
			speed = <1000>;
			duplex-full;
		};
	};

	mdio0: mdio@10000000 {
		compatible = "brcm,unimac-mdio";
		#address-cells = <1>;
		#size-cells = <0>;

		switch0: ethernet-switch@30 {
			compatible = "brcm,bcm53125";
			#address-cells = <1>;
			#size-cells = <0>;

			ports {
				port0@0 {
					reg = <0>;
					label = "lan1";
				};

				port1@1 {
					reg = <1>;
					label = "lan2";
				};

				port5@5 {
					reg = <5>;
					label = "cable-modem";
					fixed-link {
						speed = <1000>;
						duplex-full;
					};
					phy-mode = "rgmii-txid";
				};

				port8@8 {
					reg = <8>;
					label = "cpu";
					fixed-link {
						speed = <1000>;
						duplex-full;
					};
					phy-mode = "rgmii-txid";
					ethernet = <&eth0>;
				};
			};
		};
	};
+8 −0
Original line number Diff line number Diff line
@@ -2454,6 +2454,14 @@ L: netdev@vger.kernel.org
S:	Supported
F:	drivers/net/ethernet/broadcom/b44.*

BROADCOM B53 ETHERNET SWITCH DRIVER
M:	Florian Fainelli <f.fainelli@gmail.com>
L:	netdev@vger.kernel.org
L:	openwrt-devel@lists.openwrt.org (subscribers-only)
S:	Supported
F:	drivers/net/dsa/b53/*
F:	include/linux/platform_data/b53.h

BROADCOM GENET ETHERNET DRIVER
M:	Florian Fainelli <f.fainelli@gmail.com>
L:	netdev@vger.kernel.org
+2 −0
Original line number Diff line number Diff line
@@ -28,4 +28,6 @@ config NET_DSA_BCM_SF2
	  This enables support for the Broadcom Starfighter 2 Ethernet
	  switch chips.

source "drivers/net/dsa/b53/Kconfig"

endmenu
+2 −0
Original line number Diff line number Diff line
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
obj-$(CONFIG_NET_DSA_BCM_SF2)	+= bcm_sf2.o

obj-y				+= b53/
+33 −0
Original line number Diff line number Diff line
menuconfig B53
	tristate "Broadcom BCM53xx managed switch support"
	depends on NET_DSA
	help
	  This driver adds support for Broadcom managed switch chips. It supports
	  BCM5325E, BCM5365, BCM539x, BCM53115 and BCM53125 as well as BCM63XX
	  integrated switches.

config B53_SPI_DRIVER
	tristate "B53 SPI connected switch driver"
	depends on B53 && SPI
	help
	  Select to enable support for registering switches configured through SPI.

config B53_MDIO_DRIVER
	tristate "B53 MDIO connected switch driver"
	depends on B53
	help
	  Select to enable support for registering switches configured through MDIO.

config B53_MMAP_DRIVER
	tristate "B53 MMAP connected switch driver"
	depends on B53 && HAS_IOMEM
	help
	  Select to enable support for memory-mapped switches like the BCM63XX
	  integrated switches.

config B53_SRAB_DRIVER
	tristate "B53 SRAB connected switch driver"
	depends on B53 && HAS_IOMEM
	help
	  Select to enable support for memory-mapped Switch Register Access
	  Bridge Registers (SRAB) like it is found on the BCM53010
Loading