1 .. SPDX-License-Identifier: GPL-2.0
3 ==========================================
4 Broadcom RoboSwitch Ethernet switch driver
5 ==========================================
7 The Broadcom RoboSwitch Ethernet switch family is used in quite a range of
8 xDSL router, cable modems and other multimedia devices.
10 The actual implementation supports the devices BCM5325E, BCM5365, BCM539x,
11 BCM53115 and BCM53125 as well as BCM63XX.
13 Implementation details
14 ======================
16 The driver is located in ``drivers/net/dsa/b53/`` and is implemented as a
17 DSA driver; see ``Documentation/networking/dsa/dsa.rst`` for details on the
18 subsystem and what it provides.
20 The switch is, if possible, configured to enable a Broadcom specific 4-bytes
21 switch tag which gets inserted by the switch for every packet forwarded to the
22 CPU interface, conversely, the CPU network interface should insert a similar
23 tag for packets entering the CPU port. The tag format is described in
24 ``net/dsa/tag_brcm.c``.
26 The configuration of the device depends on whether or not tagging is
29 The interface names and example network configuration are used according the
30 configuration described in the :ref:`dsa-config-showcases`.
32 Configuration with tagging support
33 ----------------------------------
35 The tagging based configuration is desired. It is not specific to the b53
36 DSA driver and will work like all DSA drivers which supports tagging.
38 See :ref:`dsa-tagged-configuration`.
40 Configuration without tagging support
41 -------------------------------------
43 Older models (5325, 5365) support a different tag format that is not supported
44 yet. 539x and 531x5 require managed mode and some special handling, which is
45 also not yet supported. The tagging support is disabled in these cases and the
46 switch need a different configuration.
48 The configuration slightly differ from the :ref:`dsa-vlan-configuration`.
50 The b53 tags the CPU port in all VLANs, since otherwise any PVID untagged
51 VLAN programming would basically change the CPU port's default PVID and make
52 it untagged, undesirable.
54 In difference to the configuration described in :ref:`dsa-vlan-configuration`
55 the default VLAN 1 has to be removed from the slave interface configuration in
56 single port and gateway configuration, while there is no need to add an extra
57 VLAN configuration in the bridge showcase.
61 The configuration can only be set up via VLAN tagging and bridge setup.
62 By default packages are tagged with vid 1:
66 # tag traffic on CPU port
67 ip link add link eth0 name eth0.1 type vlan id 1
68 ip link add link eth0 name eth0.2 type vlan id 2
69 ip link add link eth0 name eth0.3 type vlan id 3
71 # The master interface needs to be brought up before the slave ports.
77 # bring up the slave interfaces
83 ip link add name br0 type bridge
85 # activate VLAN filtering
86 ip link set dev br0 type bridge vlan_filtering 1
88 # add ports to bridges
89 ip link set dev wan master br0
90 ip link set dev lan1 master br0
91 ip link set dev lan2 master br0
93 # tag traffic on ports
94 bridge vlan add dev lan1 vid 2 pvid untagged
95 bridge vlan del dev lan1 vid 1
96 bridge vlan add dev lan2 vid 3 pvid untagged
97 bridge vlan del dev lan2 vid 1
100 ip addr add 192.0.2.1/30 dev eth0.1
101 ip addr add 192.0.2.5/30 dev eth0.2
102 ip addr add 192.0.2.9/30 dev eth0.3
104 # bring up the bridge devices
113 # tag traffic on CPU port
114 ip link add link eth0 name eth0.1 type vlan id 1
116 # The master interface needs to be brought up before the slave ports.
118 ip link set eth0.1 up
120 # bring up the slave interfaces
126 ip link add name br0 type bridge
128 # activate VLAN filtering
129 ip link set dev br0 type bridge vlan_filtering 1
131 # add ports to bridge
132 ip link set dev wan master br0
133 ip link set dev lan1 master br0
134 ip link set dev lan2 master br0
135 ip link set eth0.1 master br0
137 # configure the bridge
138 ip addr add 192.0.2.129/25 dev br0
140 # bring up the bridge
141 ip link set dev br0 up
148 # tag traffic on CPU port
149 ip link add link eth0 name eth0.1 type vlan id 1
150 ip link add link eth0 name eth0.2 type vlan id 2
152 # The master interface needs to be brought up before the slave ports.
154 ip link set eth0.1 up
155 ip link set eth0.2 up
157 # bring up the slave interfaces
163 ip link add name br0 type bridge
165 # activate VLAN filtering
166 ip link set dev br0 type bridge vlan_filtering 1
168 # add ports to bridges
169 ip link set dev wan master br0
170 ip link set eth0.1 master br0
171 ip link set dev lan1 master br0
172 ip link set dev lan2 master br0
174 # tag traffic on ports
175 bridge vlan add dev wan vid 2 pvid untagged
176 bridge vlan del dev wan vid 1
178 # configure the VLANs
179 ip addr add 192.0.2.1/30 dev eth0.2
180 ip addr add 192.0.2.129/25 dev br0
182 # bring up the bridge devices