From 522d5ff42835f7ad01c090b9ea1863f5d56b91d3 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Fri, 25 Oct 2019 13:18:43 +0300 Subject: ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2 - CMIIT ID: 2019AP2581 - SoC: MediaTek MT7621 - Flash: 16MiB NOR SPI (GigaDevice GD25Q128B) - RAM: 128MiB DDR3 (ESMT M15T1G1664A) - Serial: As marked on PCB, 3V3 logic, baudrate is 115200, 8n1 - Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN) - WIFI0: MT7603E 2.4GHz 802.11b/g/n - WIFI1: MT7612E 5GHz 802.11ac - Antennas: 4x external (2 per radio), non-detachable - LEDs: Programmable "power" LED (two-coloured, yellow/blue) Non-programmable "internet" LED (shows WAN activity) - Buttons: Reset INSTALLATION: Bootloader won't accept any serial input unless "boot_wait" u-boot environment variable is changed to "on". Vendor firmware (looks like an illegal OpenWrt fork) won't accept any serial input unless "uart_en" is set to "1". Tricks to force u-boot to use default environment do not help as it's restricted in the same way. With bootloader unlocked the easiest way would be to TFTP the sysupgrade image or to sysupgrade after loading an initramfs one. For porting the flash contents were changed externally with an SPI programmer (after lifting Vcc flash IC pin away from the PCB). Forum thread [0] indicates that this device is identical to "Xiaomi Mi Router 4A Gigabit Edition". [0] https://forum.openwrt.org/t/xiaomi-mi-router-4a-gigabit-edition-r4ag-r4a-gigabit-fully-supported-but-requires-overwriting-spi-flash-with-programmer/36685 Signed-off-by: Paul Fertser --- target/linux/ramips/base-files/etc/board.d/02_network | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'target/linux/ramips/base-files/etc') diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c73a63aae..480726a870 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -297,7 +297,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "4:lan" "6@eth0" ;; - cudy,wr1000) + cudy,wr1000|\ + xiaomi,mir3g-v2) ucidef_add_switch "switch0" \ "2:lan:2" "3:lan:1" "4:wan" "6@eth0" ;; @@ -720,6 +721,10 @@ ramips_setup_macs() xiaomi,mir3g) lan_mac=$(mtd_get_mac_binary factory 0xe006) ;; + xiaomi,mir3g-v2) + wan_mac=$(mtd_get_mac_binary factory 0xe006) + label_mac=$wan_mac + ;; xiaomi,mir3p) lan_mac=$(mtd_get_mac_binary factory 0xe006) label_mac=$lan_mac -- cgit v1.2.3