openwrt/target/linux
Eduardo Santos 3c97fb4346 ramips: add support for Xiaomi MiWifi 3C
This commit adds support for Xiaomi MiWiFi 3C device.

Xiaomi MiWifi 3C has almost the same system architecture
as the Xiaomi Mi WiFi Nano, which is already officially
supported by OpenWrt.

The differences are:

 - Numbers of antennas (4 instead of 2). The antenna management
   is done via the µC. There is no configuration needed in the
   software code.
 - LAN port assignments are different. LAN1 and WAN are
   interchanged.

OpenWrt Wiki: https://openwrt.org/toh/xiaomi/mir3c

OpenWrt developers forum page:
https://forum.openwrt.org/t/support-for-xiaomi-mi-3c

Specifications:

 - CPU: MediaTek MT7628AN (575MHz)
 - Flash: 16MB
 - RAM: 64MB DDR2
 - 2.4 GHz: IEEE 802.11b/g/n with Integrated LNA and PA
 - Antennas: 4x external single band antennas
 - WAN: 1x 10/100M
 - LAN: 2x 10/100M
 - LED: 1x amber/blue/red. Programmable
 - Button: Reset

MAC addresses as verified by OEM firmware:

use address source
LAN *:92 factory 0x28
WAN *:92 factory 0x28
2g *:93 factory 0x4

OEM firmware uses VLAN's to create the network interface for WAN and LAN.

Bootloader info:
The stock bootloader uses a "Dual ROM Partition System".
OS1 is a deep copy of OS2.
The bootloader start OS2 by default.
To force start OS1 it is needed to set "flag_try_sys2_failed=1".

How to install:
1- Use OpenWRTInvasion to gain telnet, ssh and ftp access.
   https://github.com/acecilia/OpenWRTInvasion
   (IP: 192.168.31.1 - Username: root - Password: root)
2- Connect to router using telnet or ssh.
3- Backup all partitions. Use command  "dd if=/dev/mtd0 of=/tmp/mtd0".
   Copy /tmp/mtd0 to computer using ftp.
4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin
   to /tmp in router using ftp.
5- Enable UART access and change start image for OS1.
```
nvram set uart_en=1
nvram set flag_last_success=1
nvram set boot_wait=on
nvram set flag_try_sys2_failed=1
nvram commit
```
6- Installing Openwrt on OS1 and free OS2.
```
mtd erase OS1
mtd erase OS2
mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin OS1
```

Limitations: For the first install the image size needs to be less
than 7733248 bits.

Thanks for all community and especially for this device:
minax007, earth08, S.Farid

Signed-off-by: Eduardo Santos <edu.2000.kill@gmail.com>
[wrap lines, remove whitespace errors, add mediatek,mtd-eeprom to
 &wmac, convert to nvmem]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-10-31 21:24:47 +01:00
..
apm821xx kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
arc770 kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
archs38 kernel: Add missing kernel config options 2021-09-13 13:04:21 +02:00
armvirt armvirt: enable MMIO_CMDLINE_DEVICES for firecracker support 2021-10-12 19:22:08 -10:00
at91 at91: add support for sam9x60-ek board 2021-10-24 18:52:29 +02:00
ath25 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
ath79 ath79: mikrotik: enable SFP on RB921GS-5HPacD (mANTBox 15s) 2021-10-31 21:24:47 +01:00
bcm27xx kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
bcm47xx bcm47xx: add kernel 5.10 support 2021-10-21 17:38:17 +02:00
bcm53xx kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
bcm63xx kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
bcm4908 kernel: bump 5.4 to 5.4.154 2021-10-21 00:17:36 +02:00
bmips kernel: bump 5.10 to 5.10.74 2021-10-21 00:17:36 +02:00
gemini gemini: splash banner on framebuffer console 2021-10-10 16:44:15 +02:00
generic rockchip: move r8152 related patches to generic 2021-10-30 21:17:20 +02:00
imx6 kernel: 5.10: add missing symbols 2021-10-05 23:54:18 +02:00
ipq40xx ipq40xx: detangle ath10k-board-qca4019 from ath10k-firmware-qca4019* 2021-10-30 16:32:59 +02:00
ipq806x ipq806x: consolidate 11-ath10k-caldata 2021-10-30 22:11:23 +02:00
ipq807x kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21 2021-09-09 20:24:12 +02:00
kirkwood kirkwood: switch to kernel 5.10 2021-10-09 18:44:55 +02:00
lantiq ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit 2021-10-30 16:32:59 +02:00
layerscape layerscape: Fix build in dtb 2021-10-22 22:12:24 +02:00
malta malta: remove obsolete Kernel 5.4 2021-10-02 18:13:46 +02:00
mediatek kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
mpc85xx mpc85xx: switch to Kernel 5.10 2021-10-05 23:54:48 +02:00
mvebu kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
mxs treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
octeon kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
octeontx kernel: Deactivate some ARM64 errata workarounds 2021-10-03 01:13:18 +02:00
omap kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
oxnas kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
pistachio kernel: move two symbols to the generic kconfigs 2021-08-29 17:07:19 +02:00
ramips ramips: add support for Xiaomi MiWifi 3C 2021-10-31 21:24:47 +01:00
realtek kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
rockchip rockchip: move r8152 related patches to generic 2021-10-30 21:17:20 +02:00
sunxi sunxi: Nanopi R1S H5: enable LAN LED configuration 2021-10-30 21:17:20 +02:00
tegra tegra: switch to kernel 5.10 2021-10-18 21:32:36 +02:00
uml treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
x86 kernel: bump 5.10 to 5.10.73 2021-10-21 00:17:36 +02:00
zynq zynq: switch to kernel 5.10 2021-10-17 14:13:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00