aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7622/base-files/etc/board.d
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2021-02-02 16:29:58 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-02-28 01:20:53 +0000
commitaa94e34c1d7ce40684ec01b8ddc056548ecd34f0 (patch)
treea2b20a0f0efdcc891b82f51ba98db7de7ad2eec5 /target/linux/mediatek/mt7622/base-files/etc/board.d
parent7a6d0748247e23fe976bc400e9802db903d20b47 (diff)
downloadupstream-aa94e34c1d7ce40684ec01b8ddc056548ecd34f0.tar.gz
upstream-aa94e34c1d7ce40684ec01b8ddc056548ecd34f0.tar.bz2
upstream-aa94e34c1d7ce40684ec01b8ddc056548ecd34f0.zip
mediatek: add Linksys E8450 support
The Linksys E8450, also known as Belkin RT3200, is a dual-band IEEE 802.11bgn/ac/ax router based on MediaTek MT7622BV and MediaTek MT7915AN chips. FCC: K7S-03571 and K7S-03572 Hardware highlights: - CPU: MediaTek MT7622BV (2x ARM Cortex-A53 @ 1350 MHz max.) - RAM: 512MB DDR3 - Flash: 128MB SPI-NAND (2k+64) - Ethernet: MT7531BE switch with 5 1000Base-T ports CPU port connected with 2500Base-X - WiFi 2.4 GHz: 802.11bgn 4T4R built-in antennas MT7622VB built-in - WiFi 5 GHz: 802.11ac/ax 4T4R built-in antennas MT7915AN chip on-board via PCIe MT7975AN front-end - Buttons: Reset and WPS - LEDS: 3 user controllable LEDs, 4 wired to switch - USB: USB2.0, single port - no Bluetooth (supported by SoC, not wired on board) - Serial: JST PH 2.0MM 6 Pin connector inside device ----_____________---- [ GND RX - TX - - ] --------------------- - JTAG: unpopulated ARM JTAG 20-pin connector (works) This commit adds support for the device in a way that is compatible with the vendor firmware's bootloader and dual-boot flash layout, the resulting image can directly be flashed using the vendor firmware. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/mediatek/mt7622/base-files/etc/board.d')
-rwxr-xr-xtarget/linux/mediatek/mt7622/base-files/etc/board.d/01_leds18
-rwxr-xr-xtarget/linux/mediatek/mt7622/base-files/etc/board.d/02_network13
2 files changed, 28 insertions, 3 deletions
diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds
new file mode 100755
index 0000000000..e74944a65f
--- /dev/null
+++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/01_leds
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. /lib/functions/leds.sh
+. /lib/functions/uci-defaults.sh
+
+board=$(board_name)
+
+board_config_update
+
+case $board in
+linksys,e8450)
+ ucidef_set_led_netdev "wan" "WAN" "inet:blue" "wan"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
index 3a409c8ec9..3d2b9ffe49 100755
--- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
@@ -10,9 +10,8 @@ mediatek_setup_interfaces()
case $board in
bananapi,bpi-r64-rootdisk|\
- bananapi,bpi-r64)
- ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" wan
- ;;
+ bananapi,bpi-r64|\
+ linksys,e8450|\
mediatek,mt7622-rfb1)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
;;
@@ -31,7 +30,15 @@ mediatek_setup_macs()
local board="$1"
case $board in
+ linksys,e8450)
+ wan_mac=$(mtd_get_mac_ascii devinfo wan_mac_addr)
+ lan_mac=$(mtd_get_mac_ascii devinfo lan_mac_addr)
+ label_mac=$wan_mac
+ ;;
esac
+ [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
+ [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+ [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update