summaryrefslogtreecommitdiff
path: root/drivers/net/mtk_eth
AgeCommit message (Collapse)Author
2025-10-22net: mediatek: move MT7531 MMIO MDIO to dedicated driverChristian Marangi
In preparation for support of MDIO on AN7581, move the MT7531 MMIO logic to a dedicated driver and permit usage of the mdio read/write function to the mtk_eth driver. This only affect MT7988 that can use MMIO operation to access the Switch register. The MT7988 code is updated to make use of the external driver. This permits Airoha driver to make use of DM_MDIO to bind for the MT7531 driver that have the same exact register. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7988: free allocated MDIO bus on cleanupChristian Marangi
Correctly free the MDIO Bus on calling cleanup function. While at it also fix a copy-paste error and rename the cleanup function name to the more specific name. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7988: restore PHY page on PHY setting exitChristian Marangi
On exiting the phy_setting function for MT7988, the PHY page is never restored to Page 0. This can cause all kind of problem with reading the status of the PHY at runtime. Correctly restore PHY page on exiting the PHY setting function. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: mediatek: mt7531/7988: fix broken PHY turn ON/OFFChristian Marangi
The PHY for MT7531/MT7988 are never actully turned ON/OFF for the affected PHY as we are read/writing to the wrong PHY address. This is caused by the fact that we use the MT753X_PHY_ADDR macro 2 times offsetting the address multiple times. One in the _setup() function and one in the mt7531_mii_read/write. Drop the additional usage of MT753X_PHY_ADDR in setup() to correctly set the PHY. Signed-off-by: Christian Marangi <[email protected]>
2025-10-22net: Tighten more driver dependenciesTom Rini
In this case, the mediatek network drivers cannot build outside of ARCH_MEDIATEK or ARCH_MTMIPS, and so express this requirement in Kconfig as well. In the case of DWC_ETH_XGMAC / DWC_ETH_XGMAC_SOCFPGA, the file controlled by the DWC_ETH_XGMAC option references a socfpga-specific array defined in the file controlled by DWC_ETH_XGMAC_SOCFPGA. Rework these options in Kconfig to handle this dependency. Signed-off-by: Tom Rini <[email protected]>
2025-09-18net: mediatek: associate PHY device with dts node specified by phy-handleWeijie Gao
Associate PHY device with its device node specified by phy-handle property. This makes it possible for PHY drivers to read dedicated information to configure the PHY device. Signed-off-by: Weijie Gao <[email protected]>
2025-08-18net: mediatek: Use correct variable for returnAndrew Goodbody
In mtk_eth_of_to_plat, the last error check has the value in 'priv->phy_addr' but returns ret. Correct to return 'priv->phy_addr' instead. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-07-15net: mediatek: correct the AN8855 TPID value in port isolation settingsWeijie Gao
The TPID value should be 0x9100 instead of 0x8100 according to the datasheet. Fixes: cedafee9ff3 (net: mediatek: add support for Airoha AN8855 ethernet switch) Signed-off-by: Weijie Gao <[email protected]>
2025-01-31net: mediatek: fix coding style of AN8855 switch driverWeijie Gao
This patch fixed the following coding style suggested by checkpatch.pl: 1. Use tab instead of space 2. Use BIT() instead of << 3. Use mdelay for long time delay 4. Remove useless parenthesises Signed-off-by: Weijie Gao <[email protected]>
2025-01-23net: mediatek: add support for Airoha AN8855 ethernet switchWeijie Gao
Airoha AN8855 is a 5-port gigabit switch with a 2.5G HSGMII CPU port Signed-off-by: Weijie Gao <[email protected]>
2025-01-23net: mediatek: add support for MediaTek MT7987 SoCWeijie Gao
This patch adds support for MediaTek MT7987. MT7987 features MediaTek NETSYS v3, similar to MT7988, features three GMACs which support 2.5Gb HSGMII. One 2.5Gb PHY is also embedded an can be connected to a dedicated GMAC. Signed-off-by: Weijie Gao <[email protected]>
2025-01-23net: mediatek: split ethernet switch code from mtk_eth.cWeijie Gao
mtk_eth.c contains not only the ethernet GMAC/DMA driver, but also some ethernet switch initialization code. As we may add more switch support in the future, it's better to move them out of mtk_eth.c to avoid increasing the code complexity. Since not all switches are supported for a particular board, Kconfig options are added to allow user to select which switch should be built into u-boot. If multiple switches are selected, auto-detecting can also be enabled. Signed-off-by: Weijie Gao <[email protected]>