drivers/phy/ hosts a growing number of MediaTek PHY drivers (T-PHY,
XS-PHY, UFS, HDMI). Other vendors already keep their PHY drivers in a
per-vendor subdirectory, so follow the same layout and move the MediaTek
ARM SoC drivers to drivers/phy/mediatek/, together with their Kconfig
symbols and Makefile rules.

The MIPS SoC drivers, mt7620-usb-phy.c and mt76x8-usb-phy.c, are left
where they are: MIPS MediaTek support is kept separate from the ARM one
elsewhere in the tree (drivers/clk/mtmips/, drivers/pinctrl/mtmips/),
and Linux does the same, keeping its drivers/phy/mediatek/ for the ARM
SoCs only.

No functional change: the files are moved verbatim and the Kconfig
symbols keep their names, so existing defconfigs are unaffected.

Signed-off-by: Julien Stephan <[email protected]>
---
 drivers/phy/Kconfig                              | 46 +-----------------------
 drivers/phy/Makefile                             |  5 +--
 drivers/phy/mediatek/Kconfig                     | 46 ++++++++++++++++++++++++
 drivers/phy/mediatek/Makefile                    |  6 ++++
 drivers/phy/{ => mediatek}/phy-mtk-hdmi-mt8195.c |  0
 drivers/phy/{ => mediatek}/phy-mtk-hdmi-mt8195.h |  0
 drivers/phy/{ => mediatek}/phy-mtk-hdmi.c        |  0
 drivers/phy/{ => mediatek}/phy-mtk-hdmi.h        |  0
 drivers/phy/{ => mediatek}/phy-mtk-io.h          |  0
 drivers/phy/{ => mediatek}/phy-mtk-tphy.c        |  0
 drivers/phy/{ => mediatek}/phy-mtk-ufs.c         |  0
 drivers/phy/{ => mediatek}/phy-mtk-xsphy.c       |  0
 12 files changed, 54 insertions(+), 49 deletions(-)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 97133304cb6..112c5aee786 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -278,51 +278,6 @@ config PHY_EXYNOS_USBDRD
        help
          Enable USB DRD PHY support for Exynos SoC series.
 
-config PHY_MTK_HDMI
-       bool "MediaTek HDMI-PHY Driver"
-       depends on PHY
-       depends on ARCH_MEDIATEK
-       depends on ARM64
-       depends on CLK
-       help
-         Support for the HDMI TX PHY found on MediaTek SoCs such as the
-         MT8188 and MT8195. The PHY provides the TMDS links and the pixel
-         clock PLL to the HDMI TX controller.
-
-config PHY_MTK_TPHY
-       bool "MediaTek T-PHY Driver"
-       depends on PHY
-       depends on ARCH_MEDIATEK || SOC_MT7621
-       select REGMAP
-       select SYSCON
-       help
-         MediaTek T-PHY driver supports usb2.0, usb3.0 ports, PCIe and
-         SATA, and meanwhile supports two version T-PHY which have
-         different banks layout, the T-PHY with shared banks between
-         multi-ports is first version, otherwise is second veriosn,
-         so you can easily distinguish them by banks layout.
-
-config PHY_MTK_UFS
-       bool "MediaTek UFS M-PHY driver"
-       depends on ARCH_MEDIATEK
-       depends on PHY
-       help
-         Support for UFS M-PHY on MediaTek chipsets.
-         Enable this to provide vendor-specific probing,
-         initialization, power on and power off flow of
-         specified M-PHYs.
-
-config PHY_MTK_XSPHY
-       bool "MediaTek XS-PHY Driver"
-       depends on PHY
-       depends on ARCH_MEDIATEK
-       select REGMAP
-       select SYSCON
-       help
-         Enable this to support the SuperSpeedPlus XS-PHY transceiver for
-         USB3.1 GEN2 controllers on MediaTek chips. The driver supports
-         multiple USB2.0, USB3.1 GEN2 ports.
-
 config PHY_NPCM_USB
        bool "Nuvoton NPCM USB PHY support"
        depends on PHY
@@ -364,6 +319,7 @@ config PHY_XILINX_ZYNQMP
          that is part of ZynqMP SoC.
 
 source "drivers/phy/cadence/Kconfig"
+source "drivers/phy/mediatek/Kconfig"
 source "drivers/phy/qcom/Kconfig"
 source "drivers/phy/renesas/Kconfig"
 source "drivers/phy/rockchip/Kconfig"
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index 02f8b495ea0..ed0279e47f2 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -6,6 +6,7 @@
 obj-y += allwinner/
 obj-y += cadence/
 obj-y += marvell/
+obj-y += mediatek/
 obj-y += qcom/
 obj-y += renesas/
 obj-y += rockchip/
@@ -42,10 +43,6 @@ obj-$(CONFIG_MT76X8_USB_PHY) += mt76x8-usb-phy.o
 obj-$(CONFIG_PHY_AXIADO_EMMC) += phy-axiado-emmc.o
 obj-$(CONFIG_PHY_DA8XX_USB) += phy-da8xx-usb.o
 obj-$(CONFIG_PHY_EXYNOS_USBDRD) += phy-exynos-usbdrd.o
-obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi.o phy-mtk-hdmi-mt8195.o
-obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o
-obj-$(CONFIG_PHY_MTK_UFS) += phy-mtk-ufs.o
-obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o
 obj-$(CONFIG_PHY_NPCM_USB) += phy-npcm-usb.o
 obj-$(CONFIG_$(PHASE_)PHY_IMX8MQ_USB) += phy-imx8mq-usb.o
 obj-$(CONFIG_PHY_IMX8M_PCIE) += phy-imx8m-pcie.o
diff --git a/drivers/phy/mediatek/Kconfig b/drivers/phy/mediatek/Kconfig
new file mode 100644
index 00000000000..29a46ea9350
--- /dev/null
+++ b/drivers/phy/mediatek/Kconfig
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+config PHY_MTK_HDMI
+       bool "MediaTek HDMI-PHY Driver"
+       depends on PHY
+       depends on ARCH_MEDIATEK
+       depends on ARM64
+       depends on CLK
+       help
+         Support for the HDMI TX PHY found on MediaTek SoCs such as the
+         MT8188 and MT8195. The PHY provides the TMDS links and the pixel
+         clock PLL to the HDMI TX controller.
+
+config PHY_MTK_TPHY
+       bool "MediaTek T-PHY Driver"
+       depends on PHY
+       depends on ARCH_MEDIATEK || SOC_MT7621
+       select REGMAP
+       select SYSCON
+       help
+         MediaTek T-PHY driver supports usb2.0, usb3.0 ports, PCIe and
+         SATA, and meanwhile supports two version T-PHY which have
+         different banks layout, the T-PHY with shared banks between
+         multi-ports is first version, otherwise is second veriosn,
+         so you can easily distinguish them by banks layout.
+
+config PHY_MTK_UFS
+       bool "MediaTek UFS M-PHY driver"
+       depends on ARCH_MEDIATEK
+       depends on PHY
+       help
+         Support for UFS M-PHY on MediaTek chipsets.
+         Enable this to provide vendor-specific probing,
+         initialization, power on and power off flow of
+         specified M-PHYs.
+
+config PHY_MTK_XSPHY
+       bool "MediaTek XS-PHY Driver"
+       depends on PHY
+       depends on ARCH_MEDIATEK
+       select REGMAP
+       select SYSCON
+       help
+         Enable this to support the SuperSpeedPlus XS-PHY transceiver for
+         USB3.1 GEN2 controllers on MediaTek chips. The driver supports
+         multiple USB2.0, USB3.1 GEN2 ports.
diff --git a/drivers/phy/mediatek/Makefile b/drivers/phy/mediatek/Makefile
new file mode 100644
index 00000000000..00ab10a238e
--- /dev/null
+++ b/drivers/phy/mediatek/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi.o phy-mtk-hdmi-mt8195.o
+obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o
+obj-$(CONFIG_PHY_MTK_UFS) += phy-mtk-ufs.o
+obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o
diff --git a/drivers/phy/phy-mtk-hdmi-mt8195.c 
b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
similarity index 100%
rename from drivers/phy/phy-mtk-hdmi-mt8195.c
rename to drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
diff --git a/drivers/phy/phy-mtk-hdmi-mt8195.h 
b/drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h
similarity index 100%
rename from drivers/phy/phy-mtk-hdmi-mt8195.h
rename to drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h
diff --git a/drivers/phy/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
similarity index 100%
rename from drivers/phy/phy-mtk-hdmi.c
rename to drivers/phy/mediatek/phy-mtk-hdmi.c
diff --git a/drivers/phy/phy-mtk-hdmi.h b/drivers/phy/mediatek/phy-mtk-hdmi.h
similarity index 100%
rename from drivers/phy/phy-mtk-hdmi.h
rename to drivers/phy/mediatek/phy-mtk-hdmi.h
diff --git a/drivers/phy/phy-mtk-io.h b/drivers/phy/mediatek/phy-mtk-io.h
similarity index 100%
rename from drivers/phy/phy-mtk-io.h
rename to drivers/phy/mediatek/phy-mtk-io.h
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
similarity index 100%
rename from drivers/phy/phy-mtk-tphy.c
rename to drivers/phy/mediatek/phy-mtk-tphy.c
diff --git a/drivers/phy/phy-mtk-ufs.c b/drivers/phy/mediatek/phy-mtk-ufs.c
similarity index 100%
rename from drivers/phy/phy-mtk-ufs.c
rename to drivers/phy/mediatek/phy-mtk-ufs.c
diff --git a/drivers/phy/phy-mtk-xsphy.c b/drivers/phy/mediatek/phy-mtk-xsphy.c
similarity index 100%
rename from drivers/phy/phy-mtk-xsphy.c
rename to drivers/phy/mediatek/phy-mtk-xsphy.c

-- 
2.55.0

Reply via email to