| From: |
| Joris Vaisvila <joey-AT-tinyisr.com> |
| To: |
| netdev-AT-vger.kernel.org |
| Subject: |
| [RFC v3 0/4] net: dsa: MT7628 embedded switch initial support |
| Date: |
| Sat, 21 Mar 2026 21:43:36 +0200 |
| Message-ID: |
| <20260321194340.2140783-1-joey@tinyisr.com> |
| Cc: |
| horms-AT-kernel.org, pabeni-AT-redhat.com, kuba-AT-kernel.org, edumazet-AT-google.com, davem-AT-davemloft.net, olteanv-AT-gmail.com, Andrew Lunn <andrew-AT-lunn.ch>, devicetree-AT-vger.kernel.org, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Joris Vaisvila <joey-AT-tinyisr.com> |
| Archive-link: |
| Article |
Hi all,
This RFC series adds initial support for the MT7628 Embedded Switch.
The implementation provides basic functionality required to operate the
switch using DSA. The hardware exposes 5 internal Fast Ethernet ports
and a Gigabit port which is internally connected to the CPU MAC.
This version aims to be functionally complete and attempts to address
all feedback received on the previous versions.
Tested on a MT7628NN based board.
RFC:
I would like to transition this series toward a proper PATCH submission
as it seems that the feedback on the last RFC did not point out major
issues. As this is my first driver submission, I would greatly appreciate
any guidance on what should be addressed before it is appropriate to
send this in as a PATCH.
Thank you for your time and review.
---
v3:
- add DTS bindings for mediatek,mt7628-esw
- update tagging driver to use htons instead of manual byte swapping
- remove port 5 from config as it doesn't exist in the hardware
- fix code formatting
- add helper macros for configuring packed VLAN table registers
- fix mac_capabilities for cpu port, replace supported_interfaces
with PHY_INTERFACE_INTERNAL to accurately reflect the hardware
- update MEDIATEK_GE_SOC_PHY tristate name, fix sorting
- remove unneeded PHY_PACKAGE from MEDIATEK_FE_SOC_PHY Kconfig
- remove untested features from mtk-fe-soc.c phy driver
v2: https://lore.kernel.org/netdev/20260314150845.653866-1-jo...
- Update commit messages with more relevant information
- Change all references of "special" tag to "MT7628" tag
- Fix coding style errors
- Use dsa_xmit_port_mask instead of BIT(dp->index)
- Replace phy_read/phy_write with an MDIO bus definition
- Remove PHY init from switch driver
- Fix undocumented writes to SGC2 and FCT0
- Fix missing double-tag enable required for VLAN unaware
functionality
- Fix VLAN remove logic
- Update VLAN add logic to use the first unused slot
- Add a dedicated phy driver for MT7628 FE PHYs
v1: https://lore.kernel.org/netdev/20260228185242.800836-1-jo...
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 | 136 ++++
drivers/net/dsa/Kconfig | 7 +
drivers/net/dsa/Makefile | 1 +
drivers/net/dsa/mt7628.c | 634 ++++++++++++++++++
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 | 92 +++
11 files changed, 939 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.53.0