Skip to content

Commit 31a1f87

Browse files
committed
Merge branch 'phy-mediatek-reorg'
Sky Huang says: ==================== Re-organize MediaTek ethernet phy drivers and propose mtk-phy-lib This patchset comes from patch 1/9, 3/9, 4/9, 5/9 and 7/9 of: https://lore.kernel.org/netdev/20241004102413.5838-1-SkyLake.Huang@mediatek.com/ This patchset changes MediaTek's ethernet phy's folder structure and integrates helper functions, including LED & token ring manipulation, into mtk-phy-lib. --- Change in v2: - Add correct Reviewed-by tag in each patch. Change in v3: [patch 4/5] - Fix kernel test robot error by adding missing MTK_NET_PHYLIB. ==================== Signed-off-by: Sky Huang <skylake.huang@mediatek.com>
2 parents 8545b75 + 219cecb commit 31a1f87

File tree

9 files changed

+438
-307
lines changed

9 files changed

+438
-307
lines changed

MAINTAINERS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14439,8 +14439,10 @@ M: Qingfang Deng <dqfext@gmail.com>
1443914439
M: SkyLake Huang <SkyLake.Huang@mediatek.com>
1444014440
L: netdev@vger.kernel.org
1444114441
S: Maintained
14442-
F: drivers/net/phy/mediatek-ge-soc.c
14443-
F: drivers/net/phy/mediatek-ge.c
14442+
F: drivers/net/phy/mediatek/mtk-ge-soc.c
14443+
F: drivers/net/phy/mediatek/mtk-phy-lib.c
14444+
F: drivers/net/phy/mediatek/mtk-ge.c
14445+
F: drivers/net/phy/mediatek/mtk.h
1444414446
F: drivers/phy/mediatek/phy-mtk-xfi-tphy.c
1444514447

1444614448
MEDIATEK I2C CONTROLLER DRIVER

drivers/net/phy/Kconfig

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -266,22 +266,7 @@ config MAXLINEAR_GPHY
266266
Support for the Maxlinear GPY115, GPY211, GPY212, GPY215,
267267
GPY241, GPY245 PHYs.
268268

269-
config MEDIATEK_GE_PHY
270-
tristate "MediaTek Gigabit Ethernet PHYs"
271-
help
272-
Supports the MediaTek Gigabit Ethernet PHYs.
273-
274-
config MEDIATEK_GE_SOC_PHY
275-
tristate "MediaTek SoC Ethernet PHYs"
276-
depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
277-
depends on NVMEM_MTK_EFUSE
278-
help
279-
Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
280-
281-
Include support for built-in Ethernet PHYs which are present in
282-
the MT7981 and MT7988 SoCs. These PHYs need calibration data
283-
present in the SoCs efuse and will dynamically calibrate VCM
284-
(common-mode voltage) during startup.
269+
source "drivers/net/phy/mediatek/Kconfig"
285270

286271
config MICREL_PHY
287272
tristate "Micrel PHYs"

drivers/net/phy/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ obj-$(CONFIG_MARVELL_PHY) += marvell.o
7474
obj-$(CONFIG_MARVELL_88Q2XXX_PHY) += marvell-88q2xxx.o
7575
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
7676
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
77-
obj-$(CONFIG_MEDIATEK_GE_PHY) += mediatek-ge.o
78-
obj-$(CONFIG_MEDIATEK_GE_SOC_PHY) += mediatek-ge-soc.o
77+
obj-y += mediatek/
7978
obj-$(CONFIG_MESON_GXL_PHY) += meson-gxl.o
8079
obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o
8180
obj-$(CONFIG_MICREL_PHY) += micrel.o

drivers/net/phy/mediatek/Kconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
config MTK_NET_PHYLIB
3+
tristate
4+
5+
config MEDIATEK_GE_PHY
6+
tristate "MediaTek Gigabit Ethernet PHYs"
7+
select MTK_NET_PHYLIB
8+
help
9+
Supports the MediaTek non-built-in Gigabit Ethernet PHYs.
10+
11+
Non-built-in Gigabit Ethernet PHYs include mt7530/mt7531.
12+
You may find mt7530 inside mt7621. This driver shares some
13+
common operations with MediaTek SoC built-in Gigabit
14+
Ethernet PHYs.
15+
16+
config MEDIATEK_GE_SOC_PHY
17+
tristate "MediaTek SoC Ethernet PHYs"
18+
depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
19+
depends on NVMEM_MTK_EFUSE
20+
select MTK_NET_PHYLIB
21+
help
22+
Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
23+
24+
Include support for built-in Ethernet PHYs which are present in
25+
the MT7981 and MT7988 SoCs. These PHYs need calibration data
26+
present in the SoCs efuse and will dynamically calibrate VCM
27+
(common-mode voltage) during startup.

drivers/net/phy/mediatek/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_MTK_NET_PHYLIB) += mtk-phy-lib.o
3+
obj-$(CONFIG_MEDIATEK_GE_PHY) += mtk-ge.o
4+
obj-$(CONFIG_MEDIATEK_GE_SOC_PHY) += mtk-ge-soc.o

0 commit comments

Comments
 (0)