mvebu: Switch to use a module for mv88e6xxx

It's possible to add the driver for the Marvell MV88E6xxx DSA
switches using a module package rather than to compile it into
the kernel. For affected devices this saves a bit of space,
typically the DSA core is 600 KB so this and some more is saved
for devices with no DSA switch.

When adding the packages I went over both the upstream DTS files
and the OpenWrt-specific DTS files and used grep 'marvell,mv88e6'
to find the devices using these switches.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250113-mv88e6xxx-modularize-v2-1-3064419615cd@linaro.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij 2025-01-11 23:46:34 +01:00
parent b7af54d5c1
commit eaa82118ea
4 changed files with 16 additions and 17 deletions

View File

@ -288,11 +288,6 @@ CONFIG_MV_XOR=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEON=y
CONFIG_NET_DEVLINK=y
CONFIG_NET_DSA=y
CONFIG_NET_DSA_MV88E6XXX=y
CONFIG_NET_DSA_TAG_DSA=y
CONFIG_NET_DSA_TAG_DSA_COMMON=y
CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_SELFTESTS=y
CONFIG_NET_SWITCHDEV=y

View File

@ -2,6 +2,7 @@ define Device/glinet_gl-mv1000
$(call Device/Default-arm64)
DEVICE_VENDOR := GL.iNet
DEVICE_MODEL := GL-MV1000
DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SOC := armada-3720
BOOT_SCRIPT := gl-mv1000
endef
@ -38,7 +39,7 @@ define Device/globalscale_espressobin-ultra
DEVICE_VENDOR := Marvell
DEVICE_MODEL := ESPRESSObin
DEVICE_VARIANT := Ultra
DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563
DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563 kmod-dsa-mv88e6xxx
SOC := armada-3720
BOOT_SCRIPT := espressobin
endef
@ -86,7 +87,7 @@ define Device/methode_udpu
KERNEL_LOADADDR := 0x00800000
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
KERNEL_INITRAMFS_SUFFIX := .itb
DEVICE_PACKAGES += f2fs-tools fdisk kmod-i2c-pxa kmod-hwmon-lm75
DEVICE_PACKAGES += f2fs-tools fdisk kmod-i2c-pxa kmod-hwmon-lm75 kmod-dsa-mv88e6xxx
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)
IMAGES := firmware.tgz
IMAGE/firmware.tgz := boot-scr | boot-img-ext4 | uDPU-firmware | append-metadata

View File

@ -15,6 +15,7 @@ define Device/globalscale_mochabin
$(call Device/Default-arm64)
DEVICE_VENDOR := Globalscale
DEVICE_MODEL := MOCHAbin
DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SOC := armada-7040
endef
TARGET_DEVICES += globalscale_mochabin
@ -74,7 +75,7 @@ define Device/mikrotik_rb5009
DEVICE_MODEL := RB5009
SOC := armada-7040
KERNEL_LOADADDR := 0x22000000
DEVICE_PACKAGES += kmod-i2c-gpio yafut
DEVICE_PACKAGES += kmod-i2c-gpio yafut kmod-dsa-mv88e6xxx
endef
TARGET_DEVICES += mikrotik_rb5009
@ -112,7 +113,7 @@ define Device/solidrun_clearfog-pro
SOC := cn9130
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := ClearFog Pro
DEVICE_PACKAGES += kmod-i2c-mux-pca954x
DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-dsa-mv88e6xxx
BOOT_SCRIPT := clearfog-pro
endef
TARGET_DEVICES += solidrun_clearfog-pro

View File

@ -108,7 +108,7 @@ define Device/cznic_turris-omnia
wpad-basic-mbedtls kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
kmod-mt7915-firmware partx-utils kmod-i2c-mux-pca954x kmod-leds-turris-omnia \
kmod-turris-omnia-mcu kmod-gpio-button-hotplug omnia-eeprom omnia-mcu-firmware \
omnia-mcutool
omnia-mcutool kmod-dsa-mv88e6xxx
IMAGES := sysupgrade.img.gz
IMAGE/sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
SUPPORTED_DEVICES += armada-385-turris-omnia
@ -123,7 +123,7 @@ define Device/fortinet
KERNEL_SIZE := 6144k
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \
sysupgrade-tar rootfs=$$$$@ | append-metadata
DEVICE_PACKAGES := kmod-hwmon-nct7802
DEVICE_PACKAGES := kmod-hwmon-nct7802 kmod-dsa-mv88e6xxx
endef
define Device/fortinet_fg-30e
@ -202,7 +202,7 @@ define Device/iij_sa-w2
IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
append-rootfs | pad-rootfs | check-size | append-metadata
DEVICE_PACKAGES := kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
wpad-basic-mbedtls
wpad-basic-mbedtls kmod-dsa-mv88e6xxx
endef
TARGET_DEVICES += iij_sa-w2
@ -251,7 +251,7 @@ define Device/linksys_wrt1200ac
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Caiman
DEVICE_DTS := armada-385-linksys-caiman
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-caiman linksys,caiman
endef
TARGET_DEVICES += linksys_wrt1200ac
@ -267,7 +267,7 @@ define Device/linksys_wrt1900acs
DEVICE_ALT1_VENDOR := Linksys
DEVICE_ALT1_MODEL := Shelby
DEVICE_DTS := armada-385-linksys-shelby
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-shelby linksys,shelby
endef
TARGET_DEVICES += linksys_wrt1900acs
@ -280,7 +280,7 @@ define Device/linksys_wrt1900ac-v1
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Mamba
DEVICE_DTS := armada-xp-linksys-mamba
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
KERNEL_SIZE := 4096k
SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba
endef
@ -294,7 +294,7 @@ define Device/linksys_wrt1900ac-v2
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Cobra
DEVICE_DTS := armada-385-linksys-cobra
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
DEVICE_PACKAGES += mwlwifi-firmware-88w8864 kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-cobra linksys,cobra
endef
TARGET_DEVICES += linksys_wrt1900ac-v2
@ -306,7 +306,8 @@ define Device/linksys_wrt3200acm
DEVICE_ALT0_VENDOR := Linksys
DEVICE_ALT0_MODEL := Rango
DEVICE_DTS := armada-385-linksys-rango
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 \
kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-385-linksys-rango linksys,rango
endef
TARGET_DEVICES += linksys_wrt3200acm
@ -339,6 +340,7 @@ define Device/marvell_a370-rd
DEVICE_VENDOR := Marvell
DEVICE_MODEL := Armada 370 RD (RD-88F6710-A1)
DEVICE_DTS := armada-370-rd
DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SUPPORTED_DEVICES += armada-370-rd
endef
TARGET_DEVICES += marvell_a370-rd