ramips: add support for Netgear PR2000
This patch adds support for Netgear PR2000, sold as "Travel Router and
Range Extender".
Specifications:
--------------
* SoC: Mediatek MT7620N
* RAM: 64MB DDR2
* Flash: 16MB SPI NOR flash (Macronix MX25L12805D)
* WiFi 2.4GHz: builtin
* Ethernet: builtin
* LED: Power, Internet, WiFi, USB
* Buttons: Reset (GPIO 1/2)
* UART: Serial console (57600 8n1)
* USB: 1 x USB2
SPECIAL NOTES:
-------------
Problem: WiFi is super weak, but SSID beacons seems to be right.
Solve: Change 36h in factory partition (namely 0xf60036) to be 0x0.
Explain: Clearly Netgear have different ideas on how EEPROM is used. Bit 2
of 36h indicates the presence of External LNA for 11g (2.4 GHz) band,
which seems to be incorrectly set by Netgear (originally 0x04). Lifting it
solves the problem of weak RX signal.
Installation:
------------
There are two possible ways to install the firmware. Flashing via web
interface of original firmware is not tested due to a broken firmware.
1) Open the shell and use a UART2USB convert to gain TTY access (TP7: RXD,
TP9: TXD, TP10: GND). Please notice you have to remove resistance R54
next to TP7 otherwise you won't be able to input anything.
2) Use well-known Netgear debug switch. Access
http://192.168.168.1/setup.cgi?todo=debug to start telnet service
(username: root, password: <none>).
Please back up firmware if you want to go back to the original.
After you can control the device, flash the firmware as usual. Here are
some hints for that.
Option 1 (via nmrpflash):
1) Download nmrpflash from https://github.com/jclehner/nmrpflash
2) Use *-factory.img and flash:
nmrpflash -L
nmrpflash -i net* -f <your-firmware-name>
3) Turn off then turn on the device, wait it finishing flash.
Option 2 (replacing u-boot via breed):
1) Download breed-mt7620-reset1.bin from https://breed.hackpascal.net/
2) Setup HTTP server on your computer, for example:
python3 -m http.server
You can skip this step if your breed is already accessible from HTTP,
since the original wget does not support HTTPS.
3) Connect to the route and flash breed:
cd /tmp
wget http://<your-computer-host>/breed-mt7620-reset1.bin
dd if=breed-mt7620-reset1.bin of=/dev/mtdblock0 bs=64k
4) Reboot. Hold reset key or press any key in TTY to enter breed.
5) Access breed web interface (http://192.168.1.1/). Choose memory layout
to be 0x40000 and flash new firmware.
Remark:
------
As a "Range Extender", it has a switch to switch between Wired mode (GPIO
21 low) and Wireless mode (GPIO 20 low), which is not implemented in this
patch. However, the router will be turned off when it switches to the
middle, which makes this switch much less useful.
MAC addresses:
-------------
The OEM firmware uses one single MAC for all interfaces, located at
0xf700b0.
Signed-off-by: David Yang <mmyangfl@gmail.com>