-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Florian Fainelli
authored and
David S. Miller
committed
Jun 10, 2016
1 parent
409a5f2
commit 967dd82
Showing
14 changed files
with
3,397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
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 = <ð0>; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
obj-$(CONFIG_B53) += b53_common.o | ||
|
||
obj-$(CONFIG_B53_SPI_DRIVER) += b53_spi.o | ||
obj-$(CONFIG_B53_MDIO_DRIVER) += b53_mdio.o | ||
obj-$(CONFIG_B53_MMAP_DRIVER) += b53_mmap.o | ||
obj-$(CONFIG_B53_SRAB_DRIVER) += b53_srab.o |
Oops, something went wrong.