[PATCH net-next v6 0/4] net: dsa: mt7628 embedded switch initial support
From: Joris Vaisvila <hidden>
Date: 2026-07-04 10:58:05
Also in:
linux-devicetree
This patch series adds initial support for the MediaTek MT7628 Embedded Switch. The driver implements the basic functionality required to operate the switch using DSA. The hardware provides five internal Fast Ethernet user ports and one Gigabit port connected internally to the CPU MAC. Bridge offloading is not yet supported. Tested on an MT7628NN-based board. Changes since v5: - updated tag_mt7628 to kfree_skb() on error in receive path - removed Reviewed-by tags from tag_mt7628 - removed mmio base pointer from mt7628_esw since it's only used to initialize the regmap - rebased on net-next Changes since v4: mt7628 dsa driver: - updated mdiobus allocation to use ds->dev instead of esw->dev, matching other DSA drivers (no functional change) mt7628 phy driver: - replaced phy_write() with phy_modify() when setting PHY init bit (no functional change) mt7628 dt binding: - moved unevaluatedProperties after required block - removed blank line between compatible and reg in example Link: https://lore.kernel.org/netdev/20260608192948.289745-1-joey@tinyisr.com/t/#u (local) Changes since v3: - rebased on latest net-next mt7628 dsa driver: - simplified vlan_add hardware vlan slot search - fixed vlan_del not removing vid from port pvid - separated mii_read/mii_write error handling from return value parsing. Updated RD_DONE/WT_DONE bit checking with clearer logic and a comment. - moved NET_DSA_MT7628 after NET_DSA_MT7530 in Kconfig - added missing reset return value checks in probe - fixed mt7628_switch_ops missing const specifier - removed mdio node parsing from of, as there is nothing to configure mt7628 dt binding: - updated description to be more clear about port count - dropped optional mdio subnode. the switch does not expose an external MDIO bus and all integrated PHY access is handled by the driver. - removed unused switch0 label in example Link: https://lore.kernel.org/netdev/20260428185510.261521-1-joey@tinyisr.com/t/#u (local) Changes since v2: - fix binding issues found in review - fix ignored dsa_tag_8021q_register return value - add switch teardown to clean up tag_8021q - fix ordering issue where mdio probe fail would leak tag_8021q Link: https://lore.kernel.org/netdev/20260330184017.766200-1-joey@tinyisr.com/t/#u (local) Changes since v1: - changed port 6 phy-mode to internal - cleaned up tag_mt7628 rcv function and mask defines - fixed sorting error in drivers/net/dsa/ Kconfig and Makefile - fixed sorting error in net/dsa/ Kconfig and Makefile - fixed mt7628_mii_read/write return values on error Link: https://lore.kernel.org/netdev/20260326204413.3317584-1-joey@tinyisr.com/t/#u (local) Thanks, Joris Joris Vaisvila (4): dt-bindings: net: dsa: add MT7628 ESW net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYs net: dsa: initial MT7628 tagging driver net: dsa: initial support for MT7628 embedded switch .../bindings/net/dsa/mediatek,mt7628-esw.yaml | 96 +++ drivers/net/dsa/Kconfig | 8 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/mt7628.c | 649 ++++++++++++++++++ drivers/net/phy/mediatek/Kconfig | 10 +- drivers/net/phy/mediatek/Makefile | 1 + drivers/net/phy/mediatek/mtk-fe-soc.c | 50 ++ include/net/dsa.h | 2 + net/dsa/Kconfig | 6 + net/dsa/Makefile | 1 + net/dsa/tag_mt7628.c | 93 +++ 11 files changed, 916 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml create mode 100644 drivers/net/dsa/mt7628.c create mode 100644 drivers/net/phy/mediatek/mtk-fe-soc.c create mode 100644 net/dsa/tag_mt7628.c -- 2.54.0