Skip to content

RFC net: dsa: MT7628 embedded switch initial support

Joris Vaisvila linux-devicetree netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest4 patches 4 repliesIn review
  2. v2 RFC3 patches 6 repliesSuperseded
  3. v1 RFC2 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- 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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dt-bindings: net: dsa: add MT7628 ESWDocumentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml+136 -01 reply
2/4net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYsdrivers/net/phy/mediatek/Kconfig drivers/net/phy/mediatek/Makefile drivers/net/phy/mediatek/mtk-fe-soc.c+60 -10 replies
3/4net: dsa: initial MT7628 tagging driverinclude/net/dsa.h net/dsa/Kconfig net/dsa/Makefile +1 more+101 -00 replies
4/4net: dsa: initial support for MT7628 embedded switchdrivers/net/dsa/Kconfig drivers/net/dsa/Makefile drivers/net/dsa/mt7628.c+642 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [RFC v3 0/4] net: dsa: MT7628 embedded switch initial support

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/[email protected]
- 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/[email protected]

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
Signature · 1 line
2.53.0