Skip to content

Commit b8f126a

Browse files
moore-brosdavem330
authored andcommitted
net-next: dsa: add dsa support for Mediatek MT7530 switch
MT7530 is a 7-ports Gigabit Ethernet Switch that could be found on Mediatek router platforms such as MT7623A or MT7623N platform which includes 7-port Gigabit Ethernet MAC and 5-port Gigabit Ethernet PHY. Among these ports, The port from 0 to 4 are the user ports connecting with the remote devices while the port 5 and 6 are the CPU ports connecting into Mediatek Ethernet GMAC. For port 6, it can communicate with the CPU via Mediatek Ethernet GMAC through either the TRGMII or RGMII which could be controlled by phy-mode in the dt-bindings to specify which mode is preferred to use. And for port 5, only RGMII can be specified. However, currently, only port 6 is being supported in this DSA driver. The driver is made with the reference to qca8k and other existing DSA driver. The most of the essential callbacks of the DSA are already support in the driver, including tag insert for user port distinguishing, port control, bridge offloading, STP setup and ethtool operation to allow DSA to model each user port into a standalone netdevice as the other DSA driver had done. Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Landen Chao <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3174b3b commit b8f126a

File tree

4 files changed

+1536
-0
lines changed

4 files changed

+1536
-0
lines changed

drivers/net/dsa/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,12 @@ config NET_DSA_LOOP
4242
This enables support for a fake mock-up switch chip which
4343
exercises the DSA APIs.
4444

45+
config NET_DSA_MT7530
46+
tristate "Mediatek MT7530 Ethernet switch support"
47+
depends on NET_DSA
48+
select NET_DSA_TAG_MTK
49+
---help---
50+
This enables support for the Mediatek MT7530 Ethernet switch
51+
chip.
52+
4553
endmenu

drivers/net/dsa/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
22
obj-$(CONFIG_NET_DSA_BCM_SF2) += bcm-sf2.o
33
bcm-sf2-objs := bcm_sf2.o bcm_sf2_cfp.o
44
obj-$(CONFIG_NET_DSA_QCA8K) += qca8k.o
5+
obj-$(CONFIG_NET_DSA_MT7530) += mt7530.o
56
obj-y += b53/
67
obj-y += mv88e6xxx/
78
obj-$(CONFIG_NET_DSA_LOOP) += dsa_loop.o dsa_loop_bdinfo.o

0 commit comments

Comments
 (0)