mvebu: add Methode euroDPU support
authorRobert Marko <robert.marko@sartura.hr>
Wed, 30 Mar 2022 12:04:10 +0000 (14:04 +0200)
committerChristian 'Ansuel' Marangi <ansuelsmth@gmail.com>
Wed, 29 Jun 2022 11:08:59 +0000 (13:08 +0200)
Add support for Methode euroDPU which is based on uDPU but does not
have a second SFP cage, instead of which a Maxlinear G.hn IC is used.

PHY mode is set to 1000Base-X despite Maxlinear IC being capable of
2500Base-X since until 5.15 support for mvebu is available trying to use
2500Base-X will cause buffer overruns for which the fix is not easily
backportable.

Installation instructions:
1. Boot the FIT initramfs image (openwrt-mvebu-cortexa53-methode_edpu-initramfs.itb)
2. sysupgrade using the openwrt-mvebu-cortexa53-methode_edpu-firmware.tgz

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
package/boot/uboot-envtools/files/mvebu
target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network
target/linux/mvebu/cortexa53/base-files/lib/preinit/82_uDPU
target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh
target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts [new file with mode: 0644]
target/linux/mvebu/image/cortexa53.mk

index a90f74c517d6609a1d66f96c7c1fd09ff65547d3..cc1c648f246a5c39cad9fe94056bc8d1ba59604d 100644 (file)
@@ -58,7 +58,8 @@ linksys,wrt3200acm|\
 linksys,wrt32x)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
        ;;
-methode,udpu)
+methode,udpu|\
+methode,edpu)
        idx="$(find_mtd_index u-boot-env)"
        if [ -n "$idx" ]; then
        ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
index 7da9de58c7a5b32029748ba90a1d52220af22894..489090d77ca7724c34833a5eaf2bf714317e24f5 100644 (file)
@@ -21,7 +21,8 @@ globalscale,espressobin-ultra)
        ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
        ;;
 marvell,armada-3720-db|\
-methode,udpu)
+methode,udpu|\
+methode,edpu)
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
        ;;
 *)
index 12bbfc3725818a589d32263845a55f3825bbc1e9..8d5a482b8290d8487a8d973356b3ca48d97c96e9 100644 (file)
@@ -8,7 +8,8 @@ preinit_mount_udpu() {
        . /lib/upgrade/common.sh
 
        case $(board_name) in
-       methode,udpu)
+       methode,udpu|\
+       methode,edpu)
                # Check which device is detected
                [ -b "/dev/mmcblk0" ] && mmcdev="/dev/mmcblk0" || mmcdev="/dev/mmcblk1"
 
index 0ee1d61506fbd63a851b150e0944180fc0d7e082..cd41c39d7c7ab183dc840d4830fda60ede70114e 100755 (executable)
@@ -33,7 +33,8 @@ platform_do_upgrade() {
        globalscale,espressobin-v7-emmc)
                legacy_sdcard_do_upgrade "$1"
                ;;
-       methode,udpu)
+       methode,udpu|\
+       methode,edpu)
                platform_do_upgrade_uDPU "$1"
                ;;
        *)
@@ -51,7 +52,8 @@ platform_copy_config() {
        globalscale,espressobin-v7-emmc)
                legacy_sdcard_copy_config
                ;;
-       methode,udpu)
+       methode,udpu|\
+       methode,edpu)
                platform_copy_config_uDPU
                ;;
        esac
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
new file mode 100644 (file)
index 0000000..4db8b94
--- /dev/null
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "armada-3720-uDPU.dtsi"
+
+/ {
+       model = "Methode eDPU Board";
+       compatible = "methode,edpu", "marvell,armada3720", "marvell,armada3710";
+};
+
+/* PHY mode is set to 1000Base-X despite Maxlinear IC being capable of
+ * 2500Base-X since until 5.15 support for mvebu is available trying to
+ * use 2500Base-X will cause buffer overruns for which the fix is not
+ * easily backportable.
+ */
+&eth0 {
+       phy-mode = "1000base-x";
+};
index bfaa597d9af77f66fc06b7f82eb7b0cd5a82e234..afe8d9ce21b75a670fc350f877ce5f2e074f6729 100644 (file)
@@ -92,3 +92,11 @@ define Device/methode_udpu
   BOOT_SCRIPT := udpu
 endef
 TARGET_DEVICES += methode_udpu
+
+define Device/methode_edpu
+  $(call Device/methode_udpu)
+  DEVICE_MODEL := eDPU
+  DEVICE_DTS := armada-3720-eDPU
+  KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
+endef
+TARGET_DEVICES += methode_edpu