]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: mediatek: Re-organize MediaTek ethernet phy drivers
authorSkyLake.Huang <skylake.huang@mediatek.com>
Fri, 8 Nov 2024 16:34:51 +0000 (00:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Nov 2024 13:06:04 +0000 (13:06 +0000)
Re-organize MediaTek ethernet phy driver files and get ready to integrate
some common functions and add new 2.5G phy driver.
mtk-ge.c: MT7530 Gphy on MT7621 & MT7531 Gphy
mtk-ge-soc.c: Built-in Gphy on MT7981 & Built-in switch Gphy on MT7988
mtk-2p5ge.c: Planned for built-in 2.5G phy on MT7988

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS
drivers/net/phy/Kconfig
drivers/net/phy/Makefile
drivers/net/phy/mediatek/Kconfig [new file with mode: 0644]
drivers/net/phy/mediatek/Makefile [new file with mode: 0644]
drivers/net/phy/mediatek/mtk-ge-soc.c [moved from drivers/net/phy/mediatek-ge-soc.c with 100% similarity]
drivers/net/phy/mediatek/mtk-ge.c [moved from drivers/net/phy/mediatek-ge.c with 100% similarity]

index a4855581d62c7e97b38b15835fd0e67544634c02..16c37c8d7cc142137fd8f11cbe485046d0dfe8e3 100644 (file)
@@ -14439,8 +14439,8 @@ M:      Qingfang Deng <dqfext@gmail.com>
 M:     SkyLake Huang <SkyLake.Huang@mediatek.com>
 L:     netdev@vger.kernel.org
 S:     Maintained
-F:     drivers/net/phy/mediatek-ge-soc.c
-F:     drivers/net/phy/mediatek-ge.c
+F:     drivers/net/phy/mediatek/mtk-ge-soc.c
+F:     drivers/net/phy/mediatek/mtk-ge.c
 F:     drivers/phy/mediatek/phy-mtk-xfi-tphy.c
 
 MEDIATEK I2C CONTROLLER DRIVER
index ee3ea0b56d482bdb2318411ee2a2944c3c21bf6b..15828f4710a94452ef6117ce0e62422199388b3f 100644 (file)
@@ -266,22 +266,7 @@ config MAXLINEAR_GPHY
          Support for the Maxlinear GPY115, GPY211, GPY212, GPY215,
          GPY241, GPY245 PHYs.
 
-config MEDIATEK_GE_PHY
-       tristate "MediaTek Gigabit Ethernet PHYs"
-       help
-         Supports the MediaTek Gigabit Ethernet PHYs.
-
-config MEDIATEK_GE_SOC_PHY
-       tristate "MediaTek SoC Ethernet PHYs"
-       depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
-       depends on NVMEM_MTK_EFUSE
-       help
-         Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
-
-         Include support for built-in Ethernet PHYs which are present in
-         the MT7981 and MT7988 SoCs. These PHYs need calibration data
-         present in the SoCs efuse and will dynamically calibrate VCM
-         (common-mode voltage) during startup.
+source "drivers/net/phy/mediatek/Kconfig"
 
 config MICREL_PHY
        tristate "Micrel PHYs"
index 90f886844381d0269d8bbf94f3577f878cbeda92..e6145153e837fb4496511084330789dcc5d93d7a 100644 (file)
@@ -74,8 +74,7 @@ obj-$(CONFIG_MARVELL_PHY)     += marvell.o
 obj-$(CONFIG_MARVELL_88Q2XXX_PHY)      += marvell-88q2xxx.o
 obj-$(CONFIG_MARVELL_88X2222_PHY)      += marvell-88x2222.o
 obj-$(CONFIG_MAXLINEAR_GPHY)   += mxl-gpy.o
-obj-$(CONFIG_MEDIATEK_GE_PHY)  += mediatek-ge.o
-obj-$(CONFIG_MEDIATEK_GE_SOC_PHY)      += mediatek-ge-soc.o
+obj-y                          += mediatek/
 obj-$(CONFIG_MESON_GXL_PHY)    += meson-gxl.o
 obj-$(CONFIG_MICREL_KS8995MA)  += spi_ks8995.o
 obj-$(CONFIG_MICREL_PHY)       += micrel.o
diff --git a/drivers/net/phy/mediatek/Kconfig b/drivers/net/phy/mediatek/Kconfig
new file mode 100644 (file)
index 0000000..112d9c0
--- /dev/null
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config MEDIATEK_GE_PHY
+       tristate "MediaTek Gigabit Ethernet PHYs"
+       help
+         Supports the MediaTek non-built-in Gigabit Ethernet PHYs.
+
+         Non-built-in Gigabit Ethernet PHYs include mt7530/mt7531.
+         You may find mt7530 inside mt7621. This driver shares some
+         common operations with MediaTek SoC built-in Gigabit
+         Ethernet PHYs.
+
+config MEDIATEK_GE_SOC_PHY
+       tristate "MediaTek SoC Ethernet PHYs"
+       depends on (ARM64 && ARCH_MEDIATEK) || COMPILE_TEST
+       depends on NVMEM_MTK_EFUSE
+       help
+         Supports MediaTek SoC built-in Gigabit Ethernet PHYs.
+
+         Include support for built-in Ethernet PHYs which are present in
+         the MT7981 and MT7988 SoCs. These PHYs need calibration data
+         present in the SoCs efuse and will dynamically calibrate VCM
+         (common-mode voltage) during startup.
diff --git a/drivers/net/phy/mediatek/Makefile b/drivers/net/phy/mediatek/Makefile
new file mode 100644 (file)
index 0000000..005bde2
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_MEDIATEK_GE_PHY)          += mtk-ge.o
+obj-$(CONFIG_MEDIATEK_GE_SOC_PHY)      += mtk-ge-soc.o