]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: mt7621: build MediaTek T-PHY driver
authorShiji Yang <yangshiji66@outlook.com>
Thu, 19 Feb 2026 11:56:55 +0000 (19:56 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 5 Apr 2026 23:05:51 +0000 (01:05 +0200)
MT7621 USB phys are compatible with the MediaTek T-PHY controller.
The vendor SDK also enabled this driver for MT7621.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22094
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/mt7621/config-6.12
target/linux/ramips/patches-6.12/130-phy-mediatek-allow-building-T-PHY-driver-for-MT7621-.patch [new file with mode: 0644]

index dac61e6ba184a04c05c8686915e1dbd15b2f2476..b59d25420d6c959e06d4e5852bc96afbbf8db8da 100644 (file)
@@ -229,6 +229,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PHY_MT7621_PCI=y
+# CONFIG_PHY_MTK_TPHY is not set
 # CONFIG_PHY_RALINK_USB is not set
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AW9523=y
diff --git a/target/linux/ramips/patches-6.12/130-phy-mediatek-allow-building-T-PHY-driver-for-MT7621-.patch b/target/linux/ramips/patches-6.12/130-phy-mediatek-allow-building-T-PHY-driver-for-MT7621-.patch
new file mode 100644 (file)
index 0000000..8dc5a39
--- /dev/null
@@ -0,0 +1,24 @@
+From 939c662ec8a221aedde213583e07e8c0cac810af Mon Sep 17 00:00:00 2001
+From: Shiji Yang <yangshiji66@outlook.com>
+Date: Thu, 19 Feb 2026 14:23:56 +0800
+Subject: [PATCH] phy: mediatek: allow building T-PHY driver for MT7621 MIPS
+ SoC
+
+MT7621 also has compatible T-PHY which attached to the XHCI interface.
+
+Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
+---
+ drivers/phy/mediatek/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/phy/mediatek/Kconfig
++++ b/drivers/phy/mediatek/Kconfig
+@@ -26,7 +26,7 @@ config PHY_MTK_XFI_TPHY
+ config PHY_MTK_TPHY
+       tristate "MediaTek T-PHY Driver"
+-      depends on ARCH_MEDIATEK || COMPILE_TEST
++      depends on ARCH_MEDIATEK || SOC_MT7621 || COMPILE_TEST
+       depends on OF && OF_ADDRESS
+       depends on HAS_IOMEM
+       select GENERIC_PHY