The currently supported Double Shot variant provides dts which is not
entirely compatible with Single Shot variant. The symptoms are that SFP
ports are not working. To remedy this, add two images to distinguish both
boards, wich have proper dtb assigned.

Reported-by: Alexandra Alth <[email protected]>
Signed-off-by: Tomasz Maciej Nowak <[email protected]>
---

v1 -> v2
- Rebase onto "mvebu: fix support for Marvell 8040 MACCHIATOBin".
- Add missing cases for network, sysupgrade and U-Boot environment
  location.
- Fix Double Shot case in U-Boot evironment location.

 package/boot/uboot-envtools/files/mvebu       |  3 ++-
 .../base-files/etc/board.d/02_network         |  3 ++-
 .../base-files/lib/upgrade/platform.sh        |  9 ++++++---
 target/linux/mvebu/image/cortexa72.mk         | 20 +++++++++++++++++--
 4 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mvebu 
b/package/boot/uboot-envtools/files/mvebu
index 72e2df5d1982..8ed1f87ead46 100644
--- a/package/boot/uboot-envtools/files/mvebu
+++ b/package/boot/uboot-envtools/files/mvebu
@@ -24,7 +24,8 @@ globalscale,espressobin|\
 globalscale,espressobin-emmc|\
 globalscale,espressobin-v7|\
 globalscale,espressobin-v7-emmc|\
-marvell,armada8040-mcbin)
+marvell,armada8040-mcbin-doubleshot|\
+marvell,armada8040-mcbin-singleshot)
        ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
        ;;
 linksys,wrt1200ac|\
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 32053d74e85f..9ab3c8174d96 100755
--- a/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
@@ -11,7 +11,8 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
-marvell,armada8040-mcbin-doubleshot)
+marvell,armada8040-mcbin-doubleshot|\
+marvell,armada8040-mcbin-singleshot)
        ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
        ;;
 marvell,armada8040-db)
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 75d2933f058f..04ea634097a1 100755
--- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
@@ -9,7 +9,8 @@ REQUIRE_IMAGE_METADATA=1
 
 platform_check_image() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin-doubleshot)
+       marvell,armada8040-mcbin-doubleshot|\
+       marvell,armada8040-mcbin-singleshot)
                platform_check_image_sdcard "$1"
                ;;
        *)
@@ -20,7 +21,8 @@ platform_check_image() {
 
 platform_do_upgrade() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin-doubleshot)
+       marvell,armada8040-mcbin-doubleshot|\
+       marvell,armada8040-mcbin-singleshot)
                platform_do_upgrade_sdcard "$1"
                ;;
        *)
@@ -30,7 +32,8 @@ platform_do_upgrade() {
 }
 platform_copy_config() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin-doubleshot)
+       marvell,armada8040-mcbin-doubleshot|\
+       marvell,armada8040-mcbin-singleshot)
                platform_copy_config_sdcard
                ;;
        esac
diff --git a/target/linux/mvebu/image/cortexa72.mk 
b/target/linux/mvebu/image/cortexa72.mk
index 6e52109237cf..1440c07a0b5f 100644
--- a/target/linux/mvebu/image/cortexa72.mk
+++ b/target/linux/mvebu/image/cortexa72.mk
@@ -16,14 +16,30 @@ define Device/marvell_armada8040-db
 endef
 TARGET_DEVICES += marvell_armada8040-db
 
-define Device/marvell_macchiatobin
+define Device/marvell_macchiatobin-doubleshot
   $(call Device/Default-arm64)
   DEVICE_VENDOR := SolidRun
   DEVICE_MODEL := MACCHIATObin
+  DEVICE_VARIANT := Double Shot
   DEVICE_ALT0_VENDOR := SolidRun
   DEVICE_ALT0_MODEL := Armada 8040 Community Board
+  DEVICE_ALT0_VARIANT := Double Shot
   DEVICE_PACKAGES += kmod-i2c-mux-pca954x
   DEVICE_DTS := armada-8040-mcbin
   SUPPORTED_DEVICES := marvell,armada8040-mcbin-doubleshot 
marvell,armada8040-mcbin
 endef
-TARGET_DEVICES += marvell_macchiatobin
+TARGET_DEVICES += marvell_macchiatobin-doubleshot
+
+define Device/marvell_macchiatobin-singleshot
+  $(call Device/Default-arm64)
+  DEVICE_VENDOR := SolidRun
+  DEVICE_MODEL := MACCHIATObin
+  DEVICE_VARIANT := Single Shot
+  DEVICE_ALT0_VENDOR := SolidRun
+  DEVICE_ALT0_MODEL := Armada 8040 Community Board
+  DEVICE_ALT0_VARIANT := Single Shot
+  DEVICE_PACKAGES += kmod-i2c-mux-pca954x
+  DEVICE_DTS := armada-8040-mcbin-singleshot
+  SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot
+endef
+TARGET_DEVICES += marvell_macchiatobin-singleshot
-- 
2.27.0


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to