kernel: modules: netdevices: add realtek DSA modules

Uses upstream DSA switch modules (rtl8365mb, rtl8366), similar to
RTL8367C and rtl8366rb swconfig drivers.

The package dependencies exclude targets built without kernel CONFIG_OF.

It also fixes the rtl8366rb LED support.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Luiz Angelo Daros de Luca
2023-10-24 15:56:03 -03:00
committed by Robert Marko
parent c332a7d5a0
commit 62a5280b8b
19 changed files with 3324 additions and 0 deletions

View File

@@ -637,6 +637,65 @@ endef
$(eval $(call KernelPackage,dsa-qca8k))
define KernelPackage/dsa-realtek
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Realtek common module RTL83xx DSA switch family
DEPENDS:=+kmod-dsa +kmod-phy-realtek +kmod-regmap-core @!TARGET_x86 @!TARGET_bcm47xx @!TARGET_uml
KCONFIG:= \
CONFIG_NET_DSA_REALTEK \
CONFIG_NET_DSA_REALTEK_MDIO=y \
CONFIG_NET_DSA_REALTEK_SMI=y
FILES:= $(LINUX_DIR)/drivers/net/dsa/realtek/realtek_dsa.ko
endef
define KernelPackage/dsa-realtek/description
Common kernel module for Realtek RTL83xx DSA switch family
endef
$(eval $(call KernelPackage,dsa-realtek))
define KernelPackage/dsa-rtl8366rb
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Realtek RTL8365MB switch DSA support
DEPENDS:=+kmod-dsa-realtek @!TARGET_x86 @!TARGET_bcm47xx @!TARGET_uml
KCONFIG:= \
CONFIG_NET_DSA_REALTEK_RTL8366RB \
CONFIG_NET_DSA_TAG_RTL4_A
FILES:= \
$(LINUX_DIR)/drivers/net/dsa/realtek/rtl8366.ko \
$(LINUX_DIR)/net/dsa/tag_rtl4_a.ko
AUTOLOAD:=$(call AutoLoad,42,rtl8366,1)
endef
define KernelPackage/dsa-rtl8366rb/description
DSA based kernel modules for the Realtek RTL8366RB switch family
endef
$(eval $(call KernelPackage,dsa-rtl8366rb))
define KernelPackage/dsa-rtl8365mb
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Realtek RTL8365MB switch DSA support
DEPENDS:=+kmod-dsa-realtek @!TARGET_x86 @!TARGET_bcm47xx @!TARGET_uml
KCONFIG:= \
CONFIG_NET_DSA_REALTEK_RTL8365MB \
CONFIG_NET_DSA_TAG_RTL8_4
FILES:= \
$(LINUX_DIR)/drivers/net/dsa/realtek/rtl8365mb.ko \
$(LINUX_DIR)/net/dsa/tag_rtl8_4.ko
AUTOLOAD:=$(call AutoLoad,42,rtl8365mb,1)
endef
define KernelPackage/dsa-rtl8365mb/description
DSA based kernel modules for the Realtek RTL8365MB switch family
endef
$(eval $(call KernelPackage,dsa-rtl8365mb))
define KernelPackage/swconfig
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=switch configuration API