kernel: modules: support Maxlinear GPHY
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Thu, 15 May 2025 04:51:59 +0000 (23:51 -0500)
committerRobert Marko <robimarko@gmail.com>
Wed, 25 Jun 2025 08:20:37 +0000 (10:20 +0200)
Add support for Maxlinear GPHY module. Also add support for
kmod-polynomial, which is a dependency for this module.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18435
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/linux/modules/hwmon.mk
package/kernel/linux/modules/netdevices.mk

index 3e19a36cb00fb6e5f2485691955748c7b39255e3..a765976aac86850256262b51fc092410cf4566a6 100644 (file)
@@ -746,3 +746,12 @@ endef
 $(eval $(call KernelPackage,hwmon-adcxx))
 
 
+define KernelPackage/polynomial
+  TITLE:=polynomial support
+  KCONFIG:=CONFIG_POLYNOMIAL
+  HIDDEN:=1
+  FILES:=$(LINUX_DIR)/lib/polynomial.ko
+  AUTOLOAD:=$(call AutoProbe, polynomial)
+endef
+
+$(eval $(call KernelPackage,polynomial))
index 3a3e21116e94a6a9e4b5568dcdf350e8f4263e96..1ec1d449ed83053603484d0279125887d6b79ca1 100644 (file)
@@ -255,6 +255,21 @@ endef
 
 $(eval $(call KernelPackage,et131x))
 
+define KernelPackage/phy-maxlinear
+   SUBMENU:=$(NETWORK_DEVICES_MENU)
+   TITLE:=Maxlinear Ethernet PHY driver
+   KCONFIG:=CONFIG_MAXLINEAR_GPHY
+   DEPENDS:=+kmod-libphy +kmod-hwmon-core +kmod-polynomial
+   FILES:=$(LINUX_DIR)/drivers/net/phy/mxl-gpy.ko
+   AUTOLOAD:=$(call AutoLoad,18,mxl-gpy,1)
+endef
+
+define KernelPackage/phy-maxlinear/description
+   Support Maxlinear Ethernet PHYs.
+endef
+
+$(eval $(call KernelPackage,phy-maxlinear))
+
 define KernelPackage/phy-microchip
    SUBMENU:=$(NETWORK_DEVICES_MENU)
    TITLE:=Microchip Ethernet PHY driver