Skip to content

Commit 23794be

Browse files
dangowrtPaolo Abeni
authored andcommitted
net: dsa: add basic initial driver for MxL862xx switches
Add very basic DSA driver for MaxLinear's MxL862xx switches. In contrast to previous MaxLinear switches the MxL862xx has a built-in processor that runs a sophisticated firmware based on Zephyr RTOS. Interaction between the host and the switch hence is organized using a software API of that firmware rather than accessing hardware registers directly. Add descriptions of the most basic firmware API calls to access the built-in MDIO bus hosting the 2.5GE PHYs, basic port control as well as setting up the CPU port. Implement a very basic DSA driver using that API which is sufficient to get packets flowing between the user ports and the CPU port. The firmware offers all features one would expect from a modern switch hardware, they are going to be added one by one in follow-up patch series. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/ccde07e8cf33d8ae243000013b57cfaa2695e0a9.1770433307.git.daniel@makrotopia.org Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent b405b26 commit 23794be

11 files changed

Lines changed: 1492 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15631,6 +15631,7 @@ M: Daniel Golle <daniel@makrotopia.org>
1563115631
L: netdev@vger.kernel.org
1563215632
S: Maintained
1563315633
F: Documentation/devicetree/bindings/net/dsa/maxlinear,mxl862xx.yaml
15634+
F: drivers/net/dsa/mxl862xx/
1563415635
F: net/dsa/tag_mxl862xx.c
1563515636

1563615637
MCAN DEVICE DRIVER

drivers/net/dsa/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ source "drivers/net/dsa/microchip/Kconfig"
7474

7575
source "drivers/net/dsa/mv88e6xxx/Kconfig"
7676

77+
source "drivers/net/dsa/mxl862xx/Kconfig"
78+
7779
source "drivers/net/dsa/ocelot/Kconfig"
7880

7981
source "drivers/net/dsa/qca/Kconfig"

drivers/net/dsa/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-y += hirschmann/
2020
obj-y += lantiq/
2121
obj-y += microchip/
2222
obj-y += mv88e6xxx/
23+
obj-y += mxl862xx/
2324
obj-y += ocelot/
2425
obj-y += qca/
2526
obj-y += realtek/

drivers/net/dsa/mxl862xx/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
config NET_DSA_MXL862
3+
tristate "MaxLinear MxL862xx"
4+
depends on NET_DSA
5+
select MAXLINEAR_GPHY
6+
select NET_DSA_TAG_MXL_862XX
7+
help
8+
This enables support for the MaxLinear MxL862xx switch family.
9+
These switches have two 10GE SerDes interfaces, one typically
10+
used as CPU port.
11+
- MxL86282 has eight 2.5 Gigabit PHYs
12+
- MxL86252 has five 2.5 Gigabit PHYs

drivers/net/dsa/mxl862xx/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_NET_DSA_MXL862) += mxl862xx_dsa.o
3+
mxl862xx_dsa-y := mxl862xx.o mxl862xx-host.o

0 commit comments

Comments
 (0)