ramips: add support for Linksys EA6350 v4
authorNick McKinney <nick@ndmckinney.net>
Fri, 10 Dec 2021 13:23:01 +0000 (08:23 -0500)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 7 Jan 2022 23:49:59 +0000 (00:49 +0100)
Specifications:
- SoC: MT7621DAT (880MHz, 2 Cores)
- RAM: 128 MB
- Flash: 128 MB NAND
- Ethernet: 5x 1GiE MT7530
- WiFi: MT7603/MT7613
- USB: 1x USB 3.0

This is another MT7621 device, very similar to other Linksys EA7300
series devices.

Installation:

Upload the generated factory.bin image via the stock web firmware
updater.

Reverting to factory firmware:

Like other EA7300 devices, this device has an A/B router configuration
to prevent bricking.  Hard-resetting this device three (3) times will
put the device in failsafe (default) mode.  At this point, flash the
OEM image to itself and reboot.  This puts the router back into the 'B'
image and allows for a firmware upgrade.

Troubleshooting:

If the firmware will not boot, first restore the factory as described
above.  This will then allow the factory.bin update to be applied
properly.

Signed-off-by: Nick McKinney <nick@ndmckinney.net>
package/boot/uboot-envtools/files/ramips
target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
target/linux/ramips/mt7621/base-files/etc/board.d/02_network
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh

index 9ad4d64ed92dbd6d3bbe7b39a47d024684392dc9..d4c842457154b3cd6c8a5b60d0855f8513d0bcef 100644 (file)
@@ -52,6 +52,7 @@ ravpower,rp-wd03)
 jcg,q20)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
        ;;
 jcg,q20)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
        ;;
+linksys,ea6350-v4|\
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
new file mode 100644 (file)
index 0000000..272b01a
--- /dev/null
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+       compatible = "linksys,ea6350-v4", "mediatek,mt7621-soc";
+       model = "Linksys EA6350 v4";
+};
+
+&switch0 {
+       ports {
+               port@0 {
+                       status = "okay";
+                       label = "lan1";
+               };
+
+               port@1 {
+                       status = "okay";
+                       label = "lan2";
+               };
+
+               port@2 {
+                       status = "okay";
+                       label = "lan3";
+               };
+
+               port@3 {
+                       status = "okay";
+                       label = "lan4";
+               };
+
+               port@4 {
+                       status = "okay";
+                       label = "wan";
+               };
+       };
+};
index 46097f231eac2864c09de4cc68ebecc582cd60a1..7755fbef81ca55dd73a8c19c920bff39caef66ca 100644 (file)
@@ -912,6 +912,15 @@ define Device/linksys_ea7xxx
        append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
 endef
 
        append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
 endef
 
+define Device/linksys_ea6350-v4
+       $(Device/linksys_ea7xxx)
+       DEVICE_MODEL := EA6350
+       DEVICE_VARIANT := v4
+       LINKSYS_HWNAME := EA6350
+       DEVICE_PACKAGES += kmod-mt7603 kmod-mt7663-firmware-ap
+endef
+TARGET_DEVICES += linksys_ea6350-v4
+
 define Device/linksys_ea7300-v1
   $(Device/linksys_ea7xxx)
   DEVICE_MODEL := EA7300
 define Device/linksys_ea7300-v1
   $(Device/linksys_ea7xxx)
   DEVICE_MODEL := EA7300
index 6e6cd747c40958ee58eb48cb510efeef12e88a74..29962f41d7788cd0d9b83edd0b07b1a039f9f521 100644 (file)
@@ -55,6 +55,7 @@ gnubee,gb-pc2)
 linksys,e5600)
        ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link"
        ;;
 linksys,e5600)
        ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link"
        ;;
+linksys,ea6350-v4|\
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
index b2bca0f3cded18aac85ac7cfc339c6f8b52dede1..52e0b6b572eb3e8757e168281faf43d944d961b4 100644 (file)
@@ -148,6 +148,7 @@ ramips_setup_macs()
                label_mac=$(mtd_get_mac_binary factory 0x4)
                ;;
        linksys,e5600|\
                label_mac=$(mtd_get_mac_binary factory 0x4)
                ;;
        linksys,e5600|\
+       linksys,ea6350-v4|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
index 6ef44138cc47409570cae5006175f196fa1b2fd0..3c3b1e62e74718577d73367792875d931c4bb349 100644 (file)
@@ -30,6 +30,7 @@ case "$board" in
                        macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
                ;;
        linksys,e5600|\
                        macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
                ;;
        linksys,e5600|\
+       linksys,ea6350-v4|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
index 7b4a63d663524eb64025fd5fccf5a5e30c95d358..8382bdf0c52b3f5fbb52d9db80a0a1f64717cb36 100755 (executable)
@@ -9,6 +9,7 @@ boot() {
                        echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
                ;;
        linksys,e5600|\
                        echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
                ;;
        linksys,e5600|\
+       linksys,ea6350-v4|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
index 52c334e05e238961f3e3cf99b23e8c500a33ecf9..8e1bdc157f76cd2b5bfadfd515be4686f41f1929 100755 (executable)
@@ -62,6 +62,7 @@ platform_do_upgrade() {
        iptime,t5004|\
        jcg,q20|\
        linksys,e5600|\
        iptime,t5004|\
        jcg,q20|\
        linksys,e5600|\
+       linksys,ea6350-v4|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\
        linksys,ea7300-v1|\
        linksys,ea7300-v2|\
        linksys,ea7500-v2|\