Skip to content

Commit 1abee69

Browse files
author
Paolo Abeni
committed
Merge branch 'net-dsa-initial-support-for-maxlinear-mxl862xx-switches'
Daniel Golle says: ==================== net: dsa: initial support for MaxLinear MxL862xx switches This series adds very basic DSA support for the MaxLinear MxL86252 (5x 2500Base-T PHYs) and MxL86282 (8x 2500Base-T PHYs) switches. In addition to the 2.5G TP ports both switches also come with two SerDes interfaces which can be used either to connect external PHYs or SFP cages, or as CPU port when using the switch with this DSA driver. MxL862xx integrates a firmware running on an embedded processor (based on Zephyr RTOS). Host interaction uses a simple netlink-like API transported over MDIO/MMD. This series includes only what's needed to pass traffic between user ports and the CPU port: relayed MDIO to internal PHYs, basic port enable/disable, and CPU-port special tagging. The SerDes interface of the CPU port is automatically configured by the switch after reset using a board-specific configuration stored together with the firmware in the flash chip attached to the switch, so no action is needed from the driver to setup the interface mode of the CPU port. Also MAC settings of the PHY ports are automatically configured, which means the driver works fine with phylink_mac_ops being all no-op stubs. Multiple follow up series will bring support for setting up the other SerDes PCS interface (ie. not used for the CPU port), bridge, VLAN, ... offloading, and support for using an 802.1Q-based special tag instead of the proprietary 8-byte tag. ==================== Link: https://patch.msgid.link/cover.1770433307.git.daniel@makrotopia.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2 parents ccb3272 + 23794be commit 1abee69

17 files changed

Lines changed: 1793 additions & 0 deletions

File tree

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/dsa/maxlinear,mxl862xx.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MaxLinear MxL862xx Ethernet Switch Family
8+
9+
maintainers:
10+
- Daniel Golle <daniel@makrotopia.org>
11+
12+
description:
13+
The MaxLinear MxL862xx switch family are multi-port Ethernet switches with
14+
integrated 2.5GE PHYs. The MxL86252 has five PHY ports and the MxL86282
15+
has eight PHY ports. Both models come with two 10 Gigabit/s SerDes
16+
interfaces to be used to connect external PHYs or SFP cages, or as CPU
17+
port.
18+
19+
allOf:
20+
- $ref: dsa.yaml#/$defs/ethernet-ports
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- maxlinear,mxl86252
26+
- maxlinear,mxl86282
27+
28+
reg:
29+
maxItems: 1
30+
description: MDIO address of the switch
31+
32+
mdio:
33+
$ref: /schemas/net/mdio.yaml#
34+
unevaluatedProperties: false
35+
36+
required:
37+
- compatible
38+
- mdio
39+
- reg
40+
41+
unevaluatedProperties: false
42+
43+
examples:
44+
- |
45+
mdio {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
49+
switch@0 {
50+
compatible = "maxlinear,mxl86282";
51+
reg = <0>;
52+
53+
ethernet-ports {
54+
#address-cells = <1>;
55+
#size-cells = <0>;
56+
57+
/* Microcontroller port */
58+
port@0 {
59+
reg = <0>;
60+
status = "disabled";
61+
};
62+
63+
port@1 {
64+
reg = <1>;
65+
phy-handle = <&phy0>;
66+
phy-mode = "internal";
67+
};
68+
69+
port@2 {
70+
reg = <2>;
71+
phy-handle = <&phy1>;
72+
phy-mode = "internal";
73+
};
74+
75+
port@3 {
76+
reg = <3>;
77+
phy-handle = <&phy2>;
78+
phy-mode = "internal";
79+
};
80+
81+
port@4 {
82+
reg = <4>;
83+
phy-handle = <&phy3>;
84+
phy-mode = "internal";
85+
};
86+
87+
port@5 {
88+
reg = <5>;
89+
phy-handle = <&phy4>;
90+
phy-mode = "internal";
91+
};
92+
93+
port@6 {
94+
reg = <6>;
95+
phy-handle = <&phy5>;
96+
phy-mode = "internal";
97+
};
98+
99+
port@7 {
100+
reg = <7>;
101+
phy-handle = <&phy6>;
102+
phy-mode = "internal";
103+
};
104+
105+
port@8 {
106+
reg = <8>;
107+
phy-handle = <&phy7>;
108+
phy-mode = "internal";
109+
};
110+
111+
port@9 {
112+
reg = <9>;
113+
label = "cpu";
114+
ethernet = <&gmac0>;
115+
phy-mode = "usxgmii";
116+
117+
fixed-link {
118+
speed = <10000>;
119+
full-duplex;
120+
};
121+
};
122+
};
123+
124+
mdio {
125+
#address-cells = <1>;
126+
#size-cells = <0>;
127+
128+
phy0: ethernet-phy@0 {
129+
reg = <0>;
130+
};
131+
132+
phy1: ethernet-phy@1 {
133+
reg = <1>;
134+
};
135+
136+
phy2: ethernet-phy@2 {
137+
reg = <2>;
138+
};
139+
140+
phy3: ethernet-phy@3 {
141+
reg = <3>;
142+
};
143+
144+
phy4: ethernet-phy@4 {
145+
reg = <4>;
146+
};
147+
148+
phy5: ethernet-phy@5 {
149+
reg = <5>;
150+
};
151+
152+
phy6: ethernet-phy@6 {
153+
reg = <6>;
154+
};
155+
156+
phy7: ethernet-phy@7 {
157+
reg = <7>;
158+
};
159+
};
160+
};
161+
};

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15626,6 +15626,14 @@ S: Supported
1562615626
F: drivers/net/phy/mxl-86110.c
1562715627
F: drivers/net/phy/mxl-gpy.c
1562815628

15629+
MAXLINEAR MXL862XX SWITCH DRIVER
15630+
M: Daniel Golle <daniel@makrotopia.org>
15631+
L: netdev@vger.kernel.org
15632+
S: Maintained
15633+
F: Documentation/devicetree/bindings/net/dsa/maxlinear,mxl862xx.yaml
15634+
F: drivers/net/dsa/mxl862xx/
15635+
F: net/dsa/tag_mxl862xx.c
15636+
1562915637
MCAN DEVICE DRIVER
1563015638
M: Markus Schneider-Pargmann <msp@baylibre.com>
1563115639
L: linux-can@vger.kernel.org

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)