aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/mtk_eth.h
AgeCommit message (Collapse)AuthorFilesLines
2023-08-03net: mediatek: add support for MediaTek MT7988 SoCWeijie Gao1-0/+20
This patch adds support for MediaTek MT7988. MT7988 features MediaTek NETSYS v3, including three GMACs, and two of them supports 10Gbps USXGMII. MT7988 embeds a MT7531 switch (not MCM) which supports accessing internal registers through MMIO instead of MDIO. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03net: mediatek: add support for NETSYS v3Weijie Gao1-0/+7
This patch adds support for NETSYS v3 hardware. Comparing to NETSYS v2, NETSYS v3 has three GMACs. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03net: mediatek: add USXGMII supportWeijie Gao1-0/+24
This patch adds support for USXGMII of SoC. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03net: mediatek: add support for GMAC/USB3 PHY mux mode for MT7981Weijie Gao1-0/+16
MT7981 has its GMAC2 PHY shared with USB3. To enable GMAC2, mux register must be set to connect the SGMII phy to GMAC2. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03net: mediatek: add support for SGMII 1Gbps auto-negotiation modeWeijie Gao1-0/+2
Existing SGMII support of mtk-eth is actually a MediaTek-specific 2.5Gbps high-speed SGMII (HSGMII) which does not support auto-negotiation mode. This patch adds SGMII 1Gbps auto-negotiation mode and rename the existing HSGMII to 2500basex. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: add support for MediaTek MT7981/MT7986Weijie Gao1-0/+5
This patch adds support for MediaTek MT7981 and MT7986. Both chips uses PDMA v2. Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: add support for PDMA v2Weijie Gao1-8/+45
This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the DMA descriptor to 8-words, and some of its fields have changed comparing to the v1 hardware. Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: stop using bitfileds for DMA descriptorsWeijie Gao1-0/+32
This patch is a preparation for adding a new version of PDMA of which the DMA descriptor fields has changed. Using bitfields will result in a complex modification. Convert bitfields to u32 units can solve this problem easily. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-09-23net: mediatek: use a struct to cover variations of all SoCsWeijie Gao1-1/+24
Using a single soc id to control different initialization and TX/RX flow for all SoCs is not extensible if more hardware variations are added in the future. This patch introduces a struct to replace the original mtk_soc to allow the driver be able handle newer hardwares. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2020-07-28eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driverMarkLee1-0/+1
The sgmii mode init flow is almost the same for all mediatek SoC, the only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028 in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629 and the following chips). Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-24eth: mtk-eth: add mt7531 switch support in mediatek eth driverLanden Chao1-6/+118
mt7531 is a 7-ports switch with 5 embedded giga phys, and uses the same MAC design of mt7530. The cpu port6 supports SGMII only. The cpu port5 supports RGMII or SGMII in different model. mt7531 is connected to mt7622 via both RGMII and SGMII interfaces. In this patch, mt7531 cpu port5 or port6 is configured to maximum capability to align CPU MAC setting. The dts has been committed in the commit 6efa450565cdc ("arm: dts: mediatek: add ethernet and sgmii dts node for mt7622") Signed-off-by: Landen Chao <landen.chao@mediatek.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2020-02-07eth: mtk-eth: add sgmii mode support in mediatek eth driverMarkLee1-0/+15
This patch add sgmii init part for the mediatek SoC that support sgmii mode. It is a must for mt7622. Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
2019-01-14ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCsWeijie Gao1-0/+286
This patch adds ethernet support for Mediatek ARM-based SoCs, including a minimum setup of the integrated switch. Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Tested-By: "Frank Wunderlich" <frank-w@public-files.de>