From c74f85d91168d1c28c89b4451fe6a4297e574c8a Mon Sep 17 00:00:00 2001 From: Przemek Rudy Date: Sun, 1 Dec 2024 20:52:34 +0100 Subject: [PATCH] mvebu: rename generic rb5009 to rb5009ug Models specialized for RB5009UG and RB5009UPr, use generic dtsi for both. Signed-off-by: Przemek Rudy --- package/boot/uboot-mvebu/Makefile | 2 +- ...bu-add-support-for-MikroTik-RB5009UPr-S-IN.patch | 2 +- .../cortexa72/base-files/etc/board.d/02_network | 1 + .../cortexa72/base-files/lib/upgrade/platform.sh | 1 + ...mada-7040-rb5009.dts => armada-7040-rb5009.dtsi} | 0 .../arm64/boot/dts/marvell/armada-7040-rb5009ug.dts | 11 +++++++++++ .../boot/dts/marvell/armada-7040-rb5009upr.dts | 2 +- target/linux/mvebu/image/cortexa72.mk | 13 ++++++++++--- ...13-drivers_spi_add_mtpoe_device_compatible.patch | 4 ++-- 9 files changed, 28 insertions(+), 8 deletions(-) rename target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/{armada-7040-rb5009.dts => armada-7040-rb5009.dtsi} (100%) create mode 100644 target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009ug.dts diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index e2d284c78dc..558025594b7 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -63,7 +63,7 @@ endef define U-Boot/rb5009 NAME:=MikroTik RB5009 BUILD_SUBTARGET:=cortexa72 - BUILD_DEVICES:=mikrotik_rb5009 mikrotik_rb5009upr + BUILD_DEVICES:=mikrotik_rb5009 mikrotik_rb5009ug mikrotik_rb5009upr UBOOT_CONFIG:=mvebu_rb5009 UBOOT_IMAGE:=u-boot.elf endef diff --git a/package/boot/uboot-mvebu/patches/103-arm-mvebu-add-support-for-MikroTik-RB5009UPr-S-IN.patch b/package/boot/uboot-mvebu/patches/103-arm-mvebu-add-support-for-MikroTik-RB5009UPr-S-IN.patch index 3ce2b86db1b..69b98a26f0b 100644 --- a/package/boot/uboot-mvebu/patches/103-arm-mvebu-add-support-for-MikroTik-RB5009UPr-S-IN.patch +++ b/package/boot/uboot-mvebu/patches/103-arm-mvebu-add-support-for-MikroTik-RB5009UPr-S-IN.patch @@ -2,7 +2,7 @@ +++ b/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env 2024-07-08 15:45:11.657761785 +0200 @@ -1,4 +1,4 @@ -openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb -+openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb openwrt-mvebu-cortexa72-mikrotik_rb5009upr-initramfs-uImage.itb ++openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009ug-initramfs-uImage.itb openwrt-mvebu-cortexa72-mikrotik_rb5009upr-initramfs-uImage.itb boot_devices=ubi usb net recovery_boot_devices=usb net diff --git a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network index 58f9b37f445..8175b646edc 100644 --- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network @@ -33,6 +33,7 @@ marvell,armada8040-clearfog-gt-8k) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 eth2" "eth0 eth1" ;; mikrotik,rb5009|\ +mikrotik,rb5009ug|\ mikrotik,rb5009upr) ucidef_set_interfaces_lan_wan "p2 p3 p4 p5 p6 p7 p8 sfp" "p1" ;; diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh index b84f904885c..12d5f706cc5 100755 --- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh @@ -38,6 +38,7 @@ platform_do_upgrade() { legacy_sdcard_do_upgrade "$1" ;; mikrotik,rb5009|\ + mikrotik,rb5009ug|\ mikrotik,rb5009upr) nand_do_upgrade "$1" ;; diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dtsi similarity index 100% rename from target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts rename to target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dtsi diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009ug.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009ug.dts new file mode 100644 index 00000000000..12939751cee --- /dev/null +++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009ug.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "armada-7040-rb5009.dtsi" + +/ { + model = "MikroTik RB5009UG"; + compatible = "mikrotik,rb5009ug", "mikrotik,rb5009", "marvell,armada7040", + "marvell,armada-ap806-quad", "marvell,armada-ap806"; +}; diff --git a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009upr.dts b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009upr.dts index f7b165173cb..651ec5ebd0c 100644 --- a/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009upr.dts +++ b/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009upr.dts @@ -2,7 +2,7 @@ /dts-v1/; -#include "armada-7040-rb5009.dts" +#include "armada-7040-rb5009.dtsi" / { model = "MikroTik RB5009UPr"; diff --git a/target/linux/mvebu/image/cortexa72.mk b/target/linux/mvebu/image/cortexa72.mk index 3c713bd3598..e250811b260 100644 --- a/target/linux/mvebu/image/cortexa72.mk +++ b/target/linux/mvebu/image/cortexa72.mk @@ -71,18 +71,25 @@ define Device/mikrotik_rb5009 $(call Device/FitImage) $(call Device/UbiFit) DEVICE_VENDOR := MikroTik - DEVICE_MODEL := RB5009 SOC := armada-7040 KERNEL_LOADADDR := 0x22000000 DEVICE_PACKAGES += kmod-i2c-gpio yafut - SUPPORTED_DEVICES := mikrotik,rb5009 mikrotik,rb5009upr + SUPPORTED_DEVICES := mikrotik,rb5009 endef -TARGET_DEVICES += mikrotik_rb5009 + +define Device/mikrotik_rb5009ug + $(call Device/mikrotik_rb5009) + DEVICE_DTS := armada-7040-rb5009ug + DEVICE_MODEL := RB5009UG + SUPPORTED_DEVICES += mikrotik,rb5009ug +endef +TARGET_DEVICES += mikrotik_rb5009ug define Device/mikrotik_rb5009upr $(call Device/mikrotik_rb5009) DEVICE_DTS := armada-7040-rb5009upr DEVICE_MODEL := RB5009UPr+S+IN + SUPPORTED_DEVICES += mikrotik,rb5009upr endef TARGET_DEVICES += mikrotik_rb5009upr diff --git a/target/linux/mvebu/patches-6.6/913-drivers_spi_add_mtpoe_device_compatible.patch b/target/linux/mvebu/patches-6.6/913-drivers_spi_add_mtpoe_device_compatible.patch index 2c03baa5ca6..ca800ae7ffe 100644 --- a/target/linux/mvebu/patches-6.6/913-drivers_spi_add_mtpoe_device_compatible.patch +++ b/target/linux/mvebu/patches-6.6/913-drivers_spi_add_mtpoe_device_compatible.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c -@@ -714,6 +714,7 @@ static const struct spi_device_id spidev +@@ -716,6 +716,7 @@ static const struct spi_device_id spidev { .name = "spi-authenta" }, { .name = "em3581" }, { .name = "si3210" }, @@ -8,7 +8,7 @@ {}, }; MODULE_DEVICE_TABLE(spi, spidev_spi_ids); -@@ -742,6 +743,7 @@ static const struct of_device_id spidev_ +@@ -746,6 +747,7 @@ static const struct of_device_id spidev_ { .compatible = "semtech,sx1301", .data = &spidev_of_check }, { .compatible = "silabs,em3581", .data = &spidev_of_check }, { .compatible = "silabs,si3210", .data = &spidev_of_check },