From: Daniel Golle Date: Fri, 10 Apr 2026 20:00:29 +0000 (+0100) Subject: mediatek: build driver for built-in 2.5GE PHY as module X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf0825a2d036295eec0cef3e8807e80a08460b63;p=thirdparty%2Fopenwrt.git mediatek: build driver for built-in 2.5GE PHY as module The by-now-upstream driver for the built-in 2.5GE PHY of the MediaTek MT7988 and MT7987 SoC loads firmware at probe time. Build the driver as a module in order to make sure the driver only attempts to load the firmware by the time the rootfs with the firmware file has become available. Signed-off-by: Daniel Golle --- diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index 54d8f118d8e..cf4803ee86e 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -97,7 +97,7 @@ define Package/mt7986-wo-firmware/install endef $(eval $(call BuildPackage,mt7986-wo-firmware)) -Package/mt7987-2p5g-phy-firmware = $(call Package/firmware-default,MT7987 built-in 2.5G Ethernet PHY firmware,,LICENCE.mediatek) +Package/mt7987-2p5g-phy-firmware = $(call Package/firmware-default,MT7987 built-in 2.5G Ethernet PHY firmware,+LINUX_6_18:kmod-phy-mediatek-2p5g,LICENCE.mediatek) define Package/mt7987-2p5g-phy-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7987 $(INSTALL_DATA) \ @@ -107,7 +107,7 @@ define Package/mt7987-2p5g-phy-firmware/install endef $(eval $(call BuildPackage,mt7987-2p5g-phy-firmware)) -Package/mt7988-2p5g-phy-firmware = $(call Package/firmware-default,MT7988 built-in 2.5G Ethernet PHY firmware,,LICENCE.mediatek) +Package/mt7988-2p5g-phy-firmware = $(call Package/firmware-default,MT7988 built-in 2.5G Ethernet PHY firmware,+LINUX_6_18:kmod-phy-mediatek-2p5g,LICENCE.mediatek) define Package/mt7988-2p5g-phy-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7988 $(INSTALL_DATA) \ diff --git a/target/linux/mediatek/modules.mk b/target/linux/mediatek/modules.mk index 3a970821117..6d09694c3d5 100644 --- a/target/linux/mediatek/modules.mk +++ b/target/linux/mediatek/modules.mk @@ -38,6 +38,25 @@ define KernelPackage/iio-mt6577-auxadc endef $(eval $(call KernelPackage,iio-mt6577-auxadc)) + +define KernelPackage/phy-mediatek-2p5g + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=MediaTek 2.5G Ethernet PHY + DEPENDS:=@TARGET_mediatek_filogic @!LINUX_6_12 +kmod-libphy + KCONFIG:=CONFIG_MEDIATEK_2P5GE_PHY + FILES:= \ + $(LINUX_DIR)/drivers/net/phy/mediatek/mtk-2p5ge.ko + AUTOLOAD:=$(call AutoLoad,18,mtk-2p5ge,1) +endef + +define KernelPackage/phy-mediatek-2p5g/description + Kernel modules for 2.5G Ethernet PHY built-into the MediaTek MT7988 + and MT7987 SoCs. +endef + +$(eval $(call KernelPackage,phy-mediatek-2p5g)) + + define KernelPackage/switch-rtl8367s SUBMENU:=Network Devices TITLE:=Realtek RTL8367S switch support