mvebu: fix support for Marvell 8040 MACCHIATOBin
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Fri, 10 Jul 2020 08:28:13 +0000 (10:28 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 11 Jul 2020 16:38:42 +0000 (18:38 +0200)
Between kernels 4.20 and 5.0, a new variant of this board has been
introduced ("Single Shot"), and the existing one has been renamed
with the appendix "Double Shot". [1]
This also adjusted the first compatible in the list:

marvell,armada8040-mcbin -> marvell,armada8040-mcbin-doubleshot

This patch updates the OpenWrt implementation of this device by
adjusting the relevant references to that compatible (i.e., our
board name).

To still provide support for 4.19 with our setup, this adds a
small patch to change the compatible there as well.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b1f0bbe2700051886b954192b6c1751233fe0f52

Cc: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
package/boot/uboot-envtools/files/mvebu
target/linux/mvebu/cortexa72/base-files/etc/board.d/02_network
target/linux/mvebu/cortexa72/base-files/lib/upgrade/platform.sh
target/linux/mvebu/image/cortexa72.mk
target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch [new file with mode: 0644]

index 72e2df5d198200608028639c9f367fc587f8672d..590000aae75e8bcf3ff7b98d5f15a5b781f383fb 100644 (file)
@@ -24,7 +24,7 @@ globalscale,espressobin|\
 globalscale,espressobin-emmc|\
 globalscale,espressobin-v7|\
 globalscale,espressobin-v7-emmc|\
-marvell,armada8040-mcbin)
+marvell,armada8040-mcbin-doubleshot)
        ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
        ;;
 linksys,wrt1200ac|\
index 080e32ada3968bfe9471e5a37fdfd7afdb762eee..32053d74e85fa680f498eb4bc05c266bfac050a3 100755 (executable)
@@ -11,7 +11,7 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
-marvell,armada8040-mcbin)
+marvell,armada8040-mcbin-doubleshot)
        ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2"
        ;;
 marvell,armada8040-db)
index 2428de08c4df28b5c3ac772bb15544f0078f35f5..75d2933f058f4a11a3ec8557ab85aaeaa246ebc1 100755 (executable)
@@ -9,7 +9,7 @@ REQUIRE_IMAGE_METADATA=1
 
 platform_check_image() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin)
+       marvell,armada8040-mcbin-doubleshot)
                platform_check_image_sdcard "$1"
                ;;
        *)
@@ -20,7 +20,7 @@ platform_check_image() {
 
 platform_do_upgrade() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin)
+       marvell,armada8040-mcbin-doubleshot)
                platform_do_upgrade_sdcard "$1"
                ;;
        *)
@@ -30,7 +30,7 @@ platform_do_upgrade() {
 }
 platform_copy_config() {
        case "$(board_name)" in
-       marvell,armada8040-mcbin)
+       marvell,armada8040-mcbin-doubleshot)
                platform_copy_config_sdcard
                ;;
        esac
index 50233540ed2e77948c8675ab9cc9352c4593540e..6e52109237cfb2ca9e3304cbaeb0cf44502389f4 100644 (file)
@@ -24,6 +24,6 @@ define Device/marvell_macchiatobin
   DEVICE_ALT0_MODEL := Armada 8040 Community Board
   DEVICE_PACKAGES += kmod-i2c-mux-pca954x
   DEVICE_DTS := armada-8040-mcbin
-  SUPPORTED_DEVICES := marvell,armada8040-mcbin
+  SUPPORTED_DEVICES := marvell,armada8040-mcbin-doubleshot marvell,armada8040-mcbin
 endef
 TARGET_DEVICES += marvell_macchiatobin
diff --git a/target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch b/target/linux/mvebu/patches-4.19/260-align-mcbin-compatible-with-5.4.patch
new file mode 100644 (file)
index 0000000..53e3430
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+@@ -10,8 +10,9 @@
+ #include <dt-bindings/gpio/gpio.h>
+ / {
+-      model = "Marvell 8040 MACCHIATOBin";
+-      compatible = "marvell,armada8040-mcbin", "marvell,armada8040",
++      model = "Marvell 8040 MACCHIATOBin Double-shot";
++      compatible = "marvell,armada8040-mcbin-doubleshot",
++                      "marvell,armada8040-mcbin", "marvell,armada8040",
+                       "marvell,armada-ap806-quad", "marvell,armada-ap806";
+       chosen {