Skip to contentSkip to conversation

net: add ethernet driver for MediaTek MT7620 SoC

PATCH New Weijie Gao 1 participant 1 message Oct 16, 2020

Subsystems (2)
lore
Share & tools
lore

Weijie Gao

author
#0 lore raw

PATCH 16/18 net: add ethernet driver for MediaTek MT7620 SoC

This patch adds ethernet driver for MediaTek MT7620 SoC.

The MT7620 SoC has a built-in ethernet (Frame Engine) and a built-in 7-port switch and two xMII interfaces (can be MII/RMII/RGMII).

The port 0-3 of the switch connects to intergrited FE PHYs. Port 4 can be configured to connect to either the intergrited FE PHY, or the xMII. Port 5 always connects to the xMII. Port 6 is the CPU port.

This driver supports MT7530 giga switch connects to port 5.

---
 drivers/net/Kconfig      |   12 +
 drivers/net/Makefile     |    1 +
 drivers/net/mt7620-eth.c | 1222 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 1235 insertions(+)
 create mode 100644 drivers/net/mt7620-eth.c
drivers/net/Kconfig +12 -0
index 2beec2da41..401dec91ce 100644
@@ -399,6 +399,18 @@ config MACB_ZYNQ
 	  The Cadence MACB ethernet interface was used on Zynq platform.
 	  Say Y to enable support for the MACB/GEM in Zynq chip.
 
+config MT7620_ETH
+	bool "MediaTek MT7620 Ethernet Interface"
+	depends on SOC_MT7620
+	select PHYLIB
+	select DM_RESET
+	select DM_GPIO
+	select CLK
+	help
+	  The MediaTek MT7620 ethernet interface is used on MT7620 based
+	  boards. It has a built-in switch with two configurable ports which
+	  can connect to external PHY/MACs.
+
 config MT7628_ETH
 	bool "MediaTek MT7628 Ethernet Interface"
 	depends on SOC_MT7628
drivers/net/Makefile +1 -0
index 9f7a79ecb1..e8056ce015 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
 obj-$(CONFIG_MDIO_MUX_I2CREG) += mdio_mux_i2creg.o
 obj-$(CONFIG_MDIO_MUX_SANDBOX) += mdio_mux_sandbox.o
 obj-$(CONFIG_MPC8XX_FEC) += mpc8xx_fec.o
+obj-$(CONFIG_MT7620_ETH) += mt7620-eth.o
 obj-$(CONFIG_MT7628_ETH) += mt7628-eth.o
 obj-$(CONFIG_MVGBE) += mvgbe.o
 obj-$(CONFIG_MVMDIO) += mvmdio.o
drivers/net/mt7620-eth.c new file +1222 -0

1,222 lines not on this page · raw message

Signature · 1 line
2.17.1