[OpenWrt-Devel] [PATCH v3] ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2
mail at adrianschmutzler.de
mail at adrianschmutzler.de
Sat Aug 31 17:32:33 EDT 2019
Hi,
additional comments below.
> -----Original Message-----
> From: Paul Fertser [mailto:fercerpav at gmail.com]
> Sent: Mittwoch, 28. August 2019 11:09
> To: John Crispin <john at phrozen.org>
> Cc: openwrt-devel at lists.openwrt.org; Adrian Schmutzler
> <mail at adrianschmutzler.de>; Roger Pueyo Centelles
> <roger.pueyo at guifi.net>; Paul Fertser <fercerpav at gmail.com>
> Subject: [PATCH v3] 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 <fercerpav at gmail.com>
> ---
> Changes for v2:
>
> - Addressed all Adrian Schmutzl's comments
>
> Changes for v3:
>
> - Add SPDX license header
> - Use new ALT variables to support R4AG model name
>
>
> .../linux/ramips/base-files/etc/board.d/02_network | 7 +
> target/linux/ramips/dts/mt7621_xiaomi_mir3g-v2.dts | 147
> +++++++++++++++++++++
> target/linux/ramips/image/mt7621.mk | 12 ++
> 3 files changed, 166 insertions(+)
> create mode 100644 target/linux/ramips/dts/mt7621_xiaomi_mir3g-v2.dts
>
> 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 27f85d7458..2b166dd944 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -469,6 +469,10 @@ ramips_setup_interfaces()
> ucidef_add_switch "switch0" \
> "2:lan:2" "3:lan:1" "1:wan" "6t at eth0"
> ;;
> + xiaomi,mir3g-v2)
> + ucidef_add_switch "switch0" \
> + "2:lan:2" "3:lan:1" "4:wan" "6t at eth0"
> + ;;
"6t at eth0" and "6 at eth0" should be the same, so this can be merged with cudy,wr1000.
> xiaomi,mir3p)
> ucidef_add_switch "switch0" \
> "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6 at eth0"
> @@ -683,6 +687,9 @@ ramips_setup_macs()
> xiaomi,mir3p)
> lan_mac=$(mtd_get_mac_binary factory 0xe006)
> ;;
> + xiaomi,mir3g-v2)
> + wan_mac=$(mtd_get_mac_binary factory 0xe006)
> + ;;
This can be merged with elecom,wrc-1167ghbk2-s|\ etc.
Best
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190831/58c1497c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list