Commit 22335939 authored by Daniel Golle's avatar Daniel Golle Committed by Jakub Kicinski
Browse files

net: dsa: add driver for MaxLinear GSW1xx switch family



Add driver for the MaxLinear GSW1xx family of Ethernet switch ICs which
are based on the same IP as the Lantiq/Intel GSWIP found in the Lantiq VR9
and Intel GRX MIPS router SoCs. The main difference is that instead of
using memory-mapped I/O to communicate with the host CPU these ICs are
connected via MDIO (or SPI, which isn't supported by this driver).
Implement the regmap API to access the switch registers over MDIO to allow
reusing lantiq_gswip_common for all core functionality.

The GSW1xx also comes with a SerDes port capable of 1000Base-X, SGMII and
2500Base-X, which can either be used to connect an external PHY or SFP
cage, or as the CPU port. Support for the SerDes interface is implemented
in this driver using the phylink_pcs interface.

Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
Tested-by: default avatarAlexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/b567ec1b4beb08fd37abf18b280c56d5d8253c26.1762170107.git.daniel@makrotopia.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c6230446
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -10,3 +10,15 @@ config NET_DSA_LANTIQ_GSWIP
	help
	  This enables support for the Lantiq / Intel GSWIP 2.1 found in
	  the xrx200 / VR9 SoC.

config NET_DSA_MXL_GSW1XX
	tristate "MaxLinear GSW1xx Ethernet switch support"
	select NET_DSA_TAG_MXL_GSW1XX
	select NET_DSA_LANTIQ_COMMON
	help
	  This enables support for the MaxLinear GSW1xx family of 1GE switches
	    GSW120 4 port, 2 PHYs, RGMII & SGMII/2500Base-X
	    GSW125 4 port, 2 PHYs, RGMII & SGMII/2500Base-X, industrial temperature
	    GSW140 6 port, 4 PHYs, RGMII & SGMII/2500Base-X
	    GSW141 6 port, 4 PHYs, RGMII & SGMII
	    GSW145 6 port, 4 PHYs, RGMII & SGMII/2500Base-X, industrial temperature
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_NET_DSA_LANTIQ_GSWIP) += lantiq_gswip.o
obj-$(CONFIG_NET_DSA_LANTIQ_COMMON) += lantiq_gswip_common.o
obj-$(CONFIG_NET_DSA_MXL_GSW1XX) += mxl-gsw1xx.o
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ struct gswip_hw_info {
	unsigned int allowed_cpu_ports;
	unsigned int mii_ports;
	int mii_port_reg_offset;
	bool supports_2500m;
	const struct gswip_pce_microcode (*pce_microcode)[];
	size_t pce_microcode_size;
	enum dsa_tag_protocol tag_protocol;
+733 −0

File added.

Preview size limit exceeded, changes collapsed.

+126 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading