aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRené van Dorst <opensource@vdorst.com>2020-04-07 23:50:31 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-04-25 23:45:16 +0200
commitec2f7a47d379c3828eec930df881b09acc6fec06 (patch)
treebb1ff7a2e97c073f3e8a966cca2c03e3f18eb055
parent6d924706a65a16f88bae7f2b3d29535df5b320ab (diff)
downloadupstream-ec2f7a47d379c3828eec930df881b09acc6fec06.tar.gz
upstream-ec2f7a47d379c3828eec930df881b09acc6fec06.tar.bz2
upstream-ec2f7a47d379c3828eec930df881b09acc6fec06.zip
kernel: add module to support SFP cages
Enables kernel SFP case support. Signed-off-by: René van Dorst <opensource@vdorst.com>
-rw-r--r--package/kernel/linux/modules/netdevices.mk20
-rw-r--r--target/linux/ramips/image/mt7621.mk2
2 files changed, 21 insertions, 1 deletions
diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index bb92447780..81b23f98df 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -1141,3 +1141,23 @@ define KernelPackage/mlx5-core/description
endef
$(eval $(call KernelPackage,mlx5-core))
+
+
+define KernelPackage/sfp
+ SUBMENU:=$(NETWORK_DEVICES_MENU)
+ TITLE:=SFP cage support
+ DEPENDS:=+kmod-i2c-core +kmod-hwmon-core
+ KCONFIG:= \
+ CONFIG_SFP=m \
+ CONFIG_MDIO_I2C=m
+ FILES:= \
+ $(LINUX_DIR)/drivers/net/phy/sfp.ko \
+ $(LINUX_DIR)/drivers/net/phy/mdio-i2c.ko
+ AUTOLOAD:=$(call AutoProbe,mdio-i2c sfp)
+endef
+
+define KernelPackage/SFP/description
+ Kernel module to support SFP cages
+endef
+
+$(eval $(call KernelPackage,sfp))
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 739655f837..d5527cd98d 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -820,7 +820,7 @@ TARGET_DEVICES += ubnt_edgerouter-x
define Device/ubnt_edgerouter-x-sfp
$(Device/ubnt_edgerouter_common)
DEVICE_MODEL := EdgeRouter X SFP
- DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x
+ DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-sfp
SUPPORTED_DEVICES += ubnt-erx-sfp ubiquiti,edgerouterx-sfp
endef
TARGET_DEVICES += ubnt_edgerouter-x-sfp