Skip to content

Commit 4935d74

Browse files
committed
mvebu: code refactoring of rb5009upr+s+in support
It fixes indentation with width 8 to match standard Linux style. It removes commented pin setting not called anywhere. It changes patch to full git am appliable. It refreshes the patches. Signed-off-by: Carlo Filippi <carlo2007@gmail.com>
1 parent ff04af1 commit 4935d74

9 files changed

Lines changed: 5 additions & 74 deletions

File tree

package/boot/uboot-mvebu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ endef
6363
define U-Boot/rb5009
6464
NAME:=MikroTik RB5009
6565
BUILD_SUBTARGET:=cortexa72
66-
BUILD_DEVICES:=mikrotik_rb5009 mikrotik_rb5009ug mikrotik_rb5009upr
66+
BUILD_DEVICES:=mikrotik_rb5009ug mikrotik_rb5009upr
6767
UBOOT_CONFIG:=mvebu_rb5009
6868
UBOOT_IMAGE:=u-boot.elf
6969
endef

package/boot/uboot-mvebu/patches/102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
2929
create mode 100644 board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
3030
create mode 100644 configs/mvebu_rb5009_defconfig
3131

32-
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
33-
index 2d931c23fc..08d0189357 100644
3432
--- a/arch/arm/dts/Makefile
3533
+++ b/arch/arm/dts/Makefile
3634
@@ -177,6 +177,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
@@ -41,9 +39,6 @@ index 2d931c23fc..08d0189357 100644
4139
armada-8040-clearfog-gt-8k.dtb \
4240
armada-8040-db.dtb \
4341
armada-8040-mcbin.dtb \
44-
diff --git a/arch/arm/dts/armada-7040-rb5009.dts b/arch/arm/dts/armada-7040-rb5009.dts
45-
new file mode 100644
46-
index 0000000000..54574bf551
4742
--- /dev/null
4843
+++ b/arch/arm/dts/armada-7040-rb5009.dts
4944
@@ -0,0 +1,241 @@
@@ -288,8 +283,6 @@ index 0000000000..54574bf551
288283
+ status = "okay";
289284
+ phy-mode = "10gbase-r";
290285
+};
291-
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
292-
index 63a12f7d77..1e9781ada9 100644
293286
--- a/arch/arm/mach-mvebu/arm64-common.c
294287
+++ b/arch/arm/mach-mvebu/arm64-common.c
295288
@@ -62,9 +62,13 @@ __weak int dram_init_banksize(void)
@@ -309,13 +302,10 @@ index 63a12f7d77..1e9781ada9 100644
309302
}
310303

311304
if (IS_ENABLED(CONFIG_ARMADA_3700))
312-
diff --git a/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env b/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
313-
new file mode 100644
314-
index 0000000000..acdc785433
315305
--- /dev/null
316306
+++ b/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
317307
@@ -0,0 +1,52 @@
318-
+openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
308+
+openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009ug-initramfs-uImage.itb
319309
+boot_devices=ubi usb net
320310
+recovery_boot_devices=usb net
321311
+
@@ -367,9 +357,6 @@ index 0000000000..acdc785433
367357
+ dhcp;
368358
+ tftpboot ${loadaddr} ${openwrt_initramfs};
369359
+ bootm ${loadaddr};
370-
diff --git a/configs/mvebu_rb5009_defconfig b/configs/mvebu_rb5009_defconfig
371-
new file mode 100644
372-
index 0000000000..6f6035cab8
373360
--- /dev/null
374361
+++ b/configs/mvebu_rb5009_defconfig
375362
@@ -0,0 +1,96 @@
@@ -469,35 +456,3 @@ index 0000000000..6f6035cab8
469456
+CONFIG_USB_ETHER_RTL8152=y
470457
+# CONFIG_SHA256 is not set
471458
+# CONFIG_EFI_LOADER is not set
472-
473-
base-commit: f919c3a889f0ec7d63a48b5d0ed064386b0980bd
474-
prerequisite-patch-id: 6b50204d7e2371480224c274f5c7c79a7764e99c
475-
--
476-
2.39.5
477-
478-
479-
From 4d23360e318ef164dbb81db81a2c56d8ea18e928 Mon Sep 17 00:00:00 2001
480-
From: Przemek Rudy <prudy@protonmail.com>
481-
Date: Mon, 23 Dec 2024 17:45:51 +0100
482-
Subject: [PATCH 4/4] arm: mvebu: rename img from generic rb5009 to rb5009ug
483-
484-
This prepares for further adaptation of different RB5009 models.
485-
486-
Signed-off-by: Przemek Rudy <prudy@protonmail.com>
487-
---
488-
board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env | 2 +-
489-
1 file changed, 1 insertion(+), 1 deletion(-)
490-
491-
diff --git a/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env b/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
492-
index acdc785433..eac4358ff7 100644
493-
--- a/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
494-
+++ b/board/Marvell/mvebu_armada-8k/mikrotik-rb5009.env
495-
@@ -1,4 +1,4 @@
496-
-openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
497-
+openwrt_initramfs=openwrt-mvebu-cortexa72-mikrotik_rb5009ug-initramfs-uImage.itb
498-
boot_devices=ubi usb net
499-
recovery_boot_devices=usb net
500-
501-
--
502-
2.39.5
503-

target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ marvell,armada7040-db)
3232
marvell,armada8040-clearfog-gt-8k)
3333
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 eth2" "eth0 eth1"
3434
;;
35-
mikrotik,rb5009|\
3635
mikrotik,rb5009ug|\
3736
mikrotik,rb5009upr)
3837
ucidef_set_interfaces_lan_wan "p2 p3 p4 p5 p6 p7 p8 sfp" "p1"

target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ platform_do_upgrade() {
3737
solidrun,clearfog-pro)
3838
legacy_sdcard_do_upgrade "$1"
3939
;;
40-
mikrotik,rb5009|\
4140
mikrotik,rb5009ug|\
4241
mikrotik,rb5009upr)
4342
nand_do_upgrade "$1"

target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
#include <dt-bindings/leds/common.h>
99

1010
/ {
11-
model = "MikroTik RB5009";
12-
compatible = "mikrotik,rb5009", "marvell,armada7040",
13-
"marvell,armada-ap806-quad", "marvell,armada-ap806";
14-
1511
chosen {
1612
stdout-path = "serial0:115200n8";
1713
};

target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009ug.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
/ {
88
model = "MikroTik RB5009UG";
99
compatible = "mikrotik,rb5009ug", "mikrotik,rb5009", "marvell,armada7040",
10-
"marvell,armada-ap806-quad", "marvell,armada-ap806";
10+
"marvell,armada-ap806-quad", "marvell,armada-ap806";
1111
};

target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009upr.dts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/ {
88
model = "MikroTik RB5009UPr";
99
compatible = "mikrotik,rb5009upr", "mikrotik,rb5009", "marvell,armada7040",
10-
"marvell,armada-ap806-quad", "marvell,armada-ap806";
10+
"marvell,armada-ap806-quad", "marvell,armada-ap806";
1111
};
1212

1313
&cp0_gpio1 {
@@ -24,12 +24,6 @@
2424
marvell,pins = "mpp47", "mpp48", "mpp49", "mpp50";
2525
marvell,function = "spi1";
2626
};
27-
28-
/* PoE already enabled by enable-poe-power hog
29-
cp0_spi1_poe_cs_pins: cp0-spi1-poe-cs-pins {
30-
marvell,pins = "mpp8";
31-
marvell,function = "gpio";
32-
}; */
3327
};
3428

3529
&cp0_spi1 {

target/linux/mvebu/image/cortexa72.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ define Device/mikrotik_rb5009ug
8181
$(call Device/mikrotik_rb5009)
8282
DEVICE_DTS := armada-7040-rb5009ug
8383
DEVICE_MODEL := RB5009UG+S+IN
84-
SUPPORTED_DEVICES += mikrotik,rb5009ug
84+
SUPPORTED_DEVICES += mikrotik,rb5009
8585
endef
8686
TARGET_DEVICES += mikrotik_rb5009ug
8787

target/linux/mvebu/patches-6.6/913-drivers_spi_add_mtpoe_device_compatible.patch

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
From 14f37a22f520f963d4fbbd0ef99c073100029ac3 Mon Sep 17 00:00:00 2001
2-
From: Przemek Rudy <prudy@protonmail.com>
3-
Date: Mon, 23 Dec 2024 17:29:32 +0100
4-
Subject: [PATCH] kernel: add compatible string for the mtpoe spi device
5-
6-
Device listed in spidev allows referring it in DT.
7-
8-
Signed-off-by: Przemek Rudy <prudy@protonmail.com>
9-
---
10-
drivers/spi/spidev.c | 2 ++
11-
1 file changed, 2 insertions(+)
12-
131
--- a/drivers/spi/spidev.c
142
+++ b/drivers/spi/spidev.c
153
@@ -711,6 +711,7 @@ static const struct spi_device_id spidev

0 commit comments

Comments
 (0)