diff options
author | John Crispin <john@phrozen.org> | 2021-02-02 16:29:58 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-02-28 01:20:53 +0000 |
commit | aa94e34c1d7ce40684ec01b8ddc056548ecd34f0 (patch) | |
tree | a2b20a0f0efdcc891b82f51ba98db7de7ad2eec5 /target/linux/mediatek/mt7622 | |
parent | 7a6d0748247e23fe976bc400e9802db903d20b47 (diff) | |
download | upstream-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')
4 files changed, 47 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 diff --git a/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount b/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount new file mode 100755 index 0000000000..bc4eeb6530 --- /dev/null +++ b/target/linux/mediatek/mt7622/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common + +START=99 + +boot() { + case $(board_name) in + linksys,e8450) + mtd erase senv || true + ;; + esac +} diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index 8144476943..95ac8b5657 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -10,6 +10,14 @@ platform_do_upgrade() { mediatek,mt7622,ubi) nand_do_upgrade "$1" ;; + linksys,e8450) + if grep -q mtdparts=slave /proc/cmdline; then + PART_NAME=firmware2 + else + PART_NAME=firmware1 + fi + default_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; |