Commit Graph

187 Commits (5580a9dd314be953fdac9827d7819058af9bea20)

Author SHA1 Message Date
Deng Qingfang 5580a9dd31 ramips: add support for GeHua GHL-R-001
Specs
	SoC: MT7621AT
	RAM: 512MiB
	Flash: 32MiB MX25L25635F SPI NOR
	2.4G: MT7603EN
	5G: MT7612EN
	Ethernet: 4x GE ports (1x WAN, 3x LAN) with link status LEDs
	USB 3.0
	LEDs: POWER, 5G WIFI, 2.4G WIFI, USB, Internet.
	      The last two ones are controlled by GPIO
	UART: There are 2 UARTs (UARTLITE1/ttyS0 and UARTLITE3/ttyS1) on board.
	      UARTLITE1 is close to LEDs, and UARTLITE3 is close to flash chip.
	      The stock u-boot uses UARTLITE1 by default. Baud rate is 57600

Flash instruction
	1. telnet 192.168.9.1 2317, username is "root" and password is "admin"
	   One can alternatively use UART to log in
	2. Put OpenWrt firmware in a FAT32 USB drive, and connect it to the router
	   One can alternatively download the firmware via wget through Internet
	3. mtd write /path/to/openwrt.bin firmware
	4. reboot

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Simon Quigley 9f0e233576 ramips: add support for DLINK DWR-922-E2
Very similar to the DWR-921-C1, except has a telephony/RJ11 port (not
sure if supported, I didn't try), wireless router with QMI LTE embedded
modem is based on the MT7620N SoC.

Specification:

  * MediaTek MT7620N (580 Mhz)
  * 64 MB of RAM
  * 16 MB of FLASH
  * 802.11bgn radio
  * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
  * 2x external, detachable (LTE) antennas
  * UART header on PCB (57600 8n1)
  * 6x LED (GPIO-controlled)
  * 1x bi-color Signal Strength LED (GPIO-controlled)
  * 2x button
  * JBOOT bootloader

The status led has been assigned to the dwr-922-e2:green:signalstrength
(lte signal strength) led. At the end of the boot it is switched off and
is available for lte operation. Works correctly also during sysupgrade
operation.

Installation:
Apply factory image via d-link http web-gui, or via recovery interface:

How to recover/revert to OEM firmware:
1.) Push and hold the reset button and turn on the power. Wait until all
    LEDs start rapidly blinking (~10sec.)
2.) DHCP should give you an IP in the 192.168.123.0/24 subnet, or set
    one manually
3.) Upload original factory image via JBOOT http interface at IP
    192.168.123.254
4.) If http doesn't work, it can be done with curl command:
      curl -F FN=@XXXXX.bin http://192.168.123.254/upg
    where XXXXX.bin is name of firmware file.
5.) You can optionally telnet to 192.168.123.254 before or during the
    upload and it will report the flashing status, memory address etc.
6.) Once web UI and/or telnet says "Success", power cycle the router, or
    type "reboot" into the telnet session.

Signed-off-by: Simon Quigley <squigley@squigley.net>
[squashed commits, word wrap commit message, rename signal strenght led
name to match what is used for the DWR-921-C1 since they share the led
configuration, add label referenced in the aliases node]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Weijie Gao 74af8a833a ramips: add support for CreativeBox v1
Hardware:
SoC: MT7621
DRAM: 512MB DDR3
Flash: 32MB SPI-NOR
WiFi 2.4GHz: MT7603 @ PCIe0
WiFi 5.8GHz: MT7612 @ PCIe1
SATA: ASM1061 @ PCIe2

Interfaces:
GBE RJ45 x5
USB3.0 x1
eSATA (with USB2.0) x1
SATA x1
UART x1
I2C x1
JTAG x1

Flash instructions:
Through factory bootloader or firmware web interface

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
5 years ago
NOGUCHI Hiroshi 83a97c53fa ramips: add support for Netgear R6350
Netgear R6350 is a wireless router, aka Netgear AC1750.

Specification:
- SoC: Mediatek MT7621AT (2 CPU cores, 4 threads)
- RAM: 128MiB (Nanya NT5CC64M16GP-DI)
- ROM: 128MiB NAND Flash (Macronix MX30LF1G18AC-TI)
- Wireless:
   for 11b/g/n (upto 300Mbps): MT7603
   for 11a/ac  (upto 1450Mbps) : MT7615, is not avaliable now
- Ethernet LAN speed: up to 1000Mbps
- Ethernet LAN ports: 4
- Ethernet WAN speed: up to 1000Mbps
- Ethernet WAN ports: 1
- USB ports: 1 (USB 2.0)
- LEDs: 4 (all can be controlled by SoC's GPIO)
- buttons: 2
- serial ports: unknown

Installation through telnet:
  - Copy kernel.bin and rootfs.bin to a USB flash disk,
    plug to usb port on the router.
  - Enable telnet with link: http://192.168.1.1/setup.cgi?todo=debug
    (login if required, default: admin password)
  - You will see "Debug Enabled!"
  - Telnet 192.168.1.1 and login with "root"
  - ls /mnt/shares/ to find out path of your USB disk.
    'myUdisk' for example.
  - cd /mnt/shares/myUdisk
  - mtd_write write rootfs.bin Rootfs
  - mtd_write write kernel.bin Kernel
  - reboot

recovery when bricked:
  nmrpflash can be used to recover to the netgear firmware
  if a broken image was flashed.

The SC_PART_MAP partition suggests that an on flash partition table
exists. After implementing a partition parser/builder for the sercom
partition format, the definitions don't match the flash layout used by
the stock firmware.

It either means the partition format has not yet been completely
understood or it isn't used by the stock firmware. For now, use fixed
partitions instead.

Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[apply latest ramips changes and document the on flash partition map
issues]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Deng Qingfang 47381aadd5 ramips: several fixes for HC5x61
- Mark other partitions as read-only for HC5x61

 - Only enable USB and PCIe for HC5761/HC5861
   HC5661 doesn't have a USB port, and there is nothing attached to its PCIe.

 - Fix HC5761 switch ports
   HC5761 has only 3 ethernet ports (1x WAN + 2x LAN). Remove unused ports.

 - Fix HC5861 5GHz radio
   HC5861 has MT7612EN 5GHz WiFi chip, not MT7610EN.

 - Fix HC5761/HC5861 WiFi LEDs
   After 5GHz is enabled, it becomes wlan0. And 2.4GHz would be wlan1.

 - Fix HC5x61 image size
   It should be 15872k (0xf80000)

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Pawel Dembicki e9a9b7d1ed ramips: add support for D-Link DWR-118-A1
The DWR-118-A1 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 3x 10/100 Mbps Ethernet (3 LAN)
- 2x 10/100/1000 Mbps ICPlus IP1001 Ethernet PHY (1 WAN AND 1 LAN)
- 1x internal, non-detachable antenna
- 2x external, non-detachable antennas
- 1x USB 2.0
- UART (J1) header on PCB (57600 8n1)
- 7x LED (5x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- WIFI 5G LED not working
- flash is very slow

The status led has been assigned to the dwr-118-a1:green:internet led.
At the end of the boot it is switched off and is available for other
operation. Work correctly also during sysupgrade operation.

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Valentín Kivachuk 30a7ab8f61 ramips: add support for MTC Wireless Router WR1201
MTC Wireless Router WR1201 is the OEM name of the board. It is also sold
rebranded as STRONG Dual Band Gigabit Router 1200.

Specification:
- SoC: MediaTek MT7621A (880 MHz)
- Flash: 16 MiB
- RAM: 128 MiB
- Wireless: 2.4Ghz(MT7602EN) and 5Ghz (MT7612EN)
- Ethernet speed: 10/100/1000
- Ethernet ports: 4+1
- 1x USB 3.0
- 1x microSD reader
- Serial baud rate of Bootloader and factory firmware: 57600

The OEM webinterface writes only as much bytes as listed in the
uImage header field to the flash. Also, the OEM webinterface
evaluates the name field of uImage header before flashing (the
string "WR1201_8_128")

To flash via webinterface, is mandatory to use first initramfs.bin
and after (from the OpenWrt) the sysupgrade.bin

Some notes:
- Some microSD will not work:

  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: card claims to support voltages below defined range
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising SDIO card
  mtk-sd 1e130000.sdhci: no support for card's volts
  mmc0: error -22 whilst initialising MMC card

Signed-off-by: Valentín Kivachuk <vk18496@gmail.com>
6 years ago
Thomas Vincent-Cross a160f50d4f ramips: add support for Wavlink WL-WN570HA1
This commit adds support for the Wavlink WL-WN570HA1, a dual-band PoE
wireless router with the following specifications:

 - CPU: MediaTek MT7688AN 580MHz
 - Flash: 8MB
 - RAM: 64MB
 - Ethernet: 1x 10/100Mbps
 - 2.4 GHz: 802.11b/g/n SoC, 1T1R, 27 dBm
 - 5 GHz: 802.11a/n/ac MT7610E, 1T1R, 25 dBm
 - Antennas: 2x external (1 per radio), detachable
 - LEDs: 3 programmable + Wi-Fi, WAN/LAN, Power
 - Buttons: Reset

Flashing instructions:

Factory U-boot launches a TFTP client if reset button is pressed during power-on.
Rename the sysupgrade file and configure TFTP as follows:

 - Client (WL-WN570HA1) IP: 192.168.10.101
 - Server IP: 192.168.10.100
 - Filename: firmware.bin

Signed-off-by: Thomas Vincent-Cross <me@tvc.id.au>
[use generic board detection, add firmware partition compatible]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin e4d9217fe5 ramips: improve BDCOM WAP2100-SK support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Setup the USB led via devicetree (a58535771f) and include the required
driver by default. Merge the led userspace setting with an existing
identical case.

Use the wps led for boot status indication.

Move the partitions into a partition table node (6031ab345d) and drop
needless labels. Drop misplaced cells properties (53624c1702).

Cleanup the pinmux and only switch pins to gpio functions which a
referenced as gpio in the dts.

Match the maximum image size with the size of the firmware partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 8ec1a66c34 ramips: improve Skylab SKW92A support
Use the generic board detection instead of the target specific one as
all recent additions are doing.

Add the wireless led according the gpio number from the datasheet.
Rename the board part of the leds to match the name used for the
compatible string. Finally, do not hijack the wps led for boot status
indication longer than necessary.

Merge userspace config into existing cases.

Include the manufacture Name in the dts model string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Pawel Dembicki 20b09a2125 ramips: add support for Lava LR-25G001
The Lava LR-25G001 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610EN)
- 5x 10/100/1000 Mbps AR8337 Switch (1 WAN AND 4 LAN)
- 2x external, detachable antennas
- 1x USB 2.0
- UART (J3) header on PCB (57600 8n1)
- 8x LED (3x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- Work only three Gigabit ports (3/5, 1 WAN and 2LAN)

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Petr Štetiar 16b950c981 ramips: Add support for ZTE ZXECS EBG3130 aka BDCOM WAP2100-SK
On the bottom sticker it's branded as ZTE ZXECS EBG3130 device, but in factory
OpenWrt image it's referenced as BDCOM WAP2100-SK device.

Specifications:

- SoC: MediaTek MT7620A
- RAM: 128 MB
- Flash: 16 MB
- Ethernet: 5 FE ports
- Wireless radio: 2T2R 2.4 GHz and 1T1R 5 GHz (MT7610EN, unsupported)
- UART: 1 x UART on PCB marked as J2 (R=RX, T=TX, G=GND) with 115200 8N1 config
- LEDs: Power, FE ports 1-5, WPS, USB, RF 2.4G, RF 5G
- Other: USB port, SD card slot and 2x external antennas (non-detachable)

Flashing instructions:

A) The U-Boot has HTTP based firmware upgrade

  A1) Flashing notes

  We've identified so far two different batches of units, unfortunately
  each batch has different U-Boot bootloader flashed with different
  default environment variables, thus each batch has different IP address
  for accessing web based firmware updater.

  * First batch has web based bootloader IP address 1.1.1.1
  * Second batch has web based bootloader IP address 192.168.1.250

  In case you can't connect to either of those IPs, you can try to get
  the default IP address via two methods:

  A1.1) Serial console, then the IP address is visible during the boot

   ...
   HTTP server is starting at IP: 1.1.1.1
   raspi_read: from:40004 len:6
   HTTP server is ready!
   ...

  A1.2) Over telnet/SSH using this command:

   root@bdcom:/# grep ipaddr= /dev/mtd0
   ipaddr=1.1.1.1

  A2) Flashing with browser

  * Change IP address of PC to 1.1.1.2 with 255.255.255.0 netmask
  * Reboot the device and try to reach web based bootloader in the
    browser with the following URL http://1.1.1.1

  * Quickly select the firmware sysupgrade file and click on the
    `Update firmware` button, this all has to be done within 10 seconds,
    bootloader doesn't wait any longer

   If done correctly, the web page should show UPDATE IN PROGRESS page
   with progress indicator. Once the flashing completes (it takes roughly
   around 1 minute), the device will reboot to the OpenWrt firmware

  A3) Flashing with curl

   sudo ip addr add 1.1.1.2/24 dev eth0
   curl \
      --verbose \
      --retry 3 \
      --retry-delay 1 \
      --retry-max-time 30 \
      --connect-timeout 30 \
      --form "firmware=@openwrt-ramips-mt7620-BDCOM-WAP2100-SK-squashfs-sysupgrade.bin" \
      http://1.1.1.1

   Now power on the router.

B) The U-boot is based on Ralink SDK so we can flash the firmware using UART.

   1. Configure PC with a static IP address and setup an TFTP server.
   2. Put the firmware into the tftp directory.
   3. Connect the UART line as described on the PCB (G=GND, R=RX, T=TX)
   4. Power up the device and press 2, follow the instruction to set device and
      tftp server IP address and input the firmware file name. U-boot will then load
      the firmware and write it into the flash.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
6 years ago
Russell Senior e42327aa89 ramips: add support for Skylab SKW92A in EVB
Specifically, SKW92A_E16, described here:

  http://www.skylabmodule.com/wp-content/uploads/SkyLab_SKW92A_V1.04_datasheet.pdf

Specification:
- MediaTek MT7628N/N (580 Mhz)
- 64 MB of RAM
- 16 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x u.FL
- Power by micro-USB connector at USB1 on EVB
- UART via micro-USB connector at USB3 on EVB (57600 8n1)
- 5x Ethernet LEDs
- 1x WLAN LEDs
- 1x WPS LED connected by jumper wire from I2S_CK on J20 to WPS_LED pin hole next
  to daughter board on EVB
- WPS/Reset button (S2 on EVB)
- RESET button (S1 on EVB) is *not* connected to RST hole next to daughter board

Flash instruction:

>From Skylab firmware:

1. Associate with SKYLAP_AP
2. In a browser, load: http://10.10.10.254/
3. Username/password: admin/admin
4. In web admin interface: Administration / Upload Firmware, browse to
   sysupgrade image, apply, flash will fail with a message:
   Not a valid firmware. *** Warning: "/var/tmpFW" has corrupted data!
5. Telnet to 10.10.10.254, drops you into a root shell with no credentials
6. # cd /var
7. # mtd_write -r write tmpFW mtd4
   Unlocking mtd4 ...
   Writing from tmpFW to mtd4 ... [e]
8. When flash has completed, you will have booted into your firmware.

>From U-boot via TFTP and initramfs:

1. Place openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin on a TFTP server
2. Connect to serial console at USB3 on EVB
3. Connect ethernet between port 1 (not WAN) and your TFTP server (e.g.
   192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "1"
7. At u-boot prompts:
   Input device IP (10.10.10.123) ==:192.168.11.21
   Input server IP (10.10.10.3) ==:192.168.11.20
   Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-initramfs-kernel.bin
8. Move ethernet to port 0 (WAN) on EVB
9. At new OpenWrt console shell, fetch squashfs-sysupgrade image and flash
   with sysupgrade.

>From U-boot via TFTP direct flash:

1. Place openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin on a TFTP server
2. Connect to serial console at USB3 on EVB (57600 8N1)
3. Connect ethernet between port 1 (not WAN) an your TFTP server (e.g.
   192.168.11.20)
4. Start terminal software (e.g. screen /dev/ttyUSB0 57600) on PC
5. Apply power to EVB
6. Interrupt u-boot with keypress of "2"
7. At u-boot prompts:
   Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N) Y
   Input device IP (10.10.10.123) ==:192.168.11.21
   Input server IP (10.10.10.3) ==:192.168.11.20
   Input Linux Kernel filename (root_uImage) ==:openwrt-ramips-mt76x8-skw92a-squashfs-sysupgrade.bin
8. When transfer is complete or as OpenWrt begins booting, move ethernet to
   port 0 (WAN).

Signed-off-by: Russell Senior <russell@personaltelco.net>
6 years ago
Martin Weinelt 0411813c6f
ramips: fix leds on GL.iNet GL-MT300N-V2
The WAN LED now shows the link state. It's color is green,
not blue.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
6 years ago
Mathias Kresin b07b3ddaad ramips: don't hijack the status led
Don't hijack the status led to indicate the wireless state. If we don't
have a dedicated wireless led, it's as simply as the wireless status
can't be indicated.

Such a led misuse should be set by the user and not shipped by default.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin c074239c79 ramips: move status led unset to devicetree
Release the led used for boot status indication via devicetree instead
of setting a default off trigger in userspace.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 772b27c207 ramips: set F5D8235 v1 usb led trigger via devicetree
Assign the usbdev trigger via devicetree and drop the userspace
handling of the usb leds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin a58535771f ramips: set usb led trigger via devicetree
Assign the usbdev trigger via devicetree for all subtargets and drop
the userspace handling of the usb leds.

With the change all usb ports are triggering the usb led instead of
only usb 1.1 XOR usb 2.0 XOR usb 3.0 as it was before.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Carlo Nel 6bbb220255 ramips: add support for TP-Link TL-MR3020 v3
TP-Link TL-MR3020 v3 is a pocket-size router based on MediaTek MT7628N.

This PR is based on the work of @meyergru[1], with his permission.

Specification:
- MediaTek MT7628N/N (575 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 1x 10/100 Mbps Ethernet

Flash instruction:

The only way to flash the image in TL-MR3020 v3 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.225/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-tplink_tl-mr3020-v3-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with the LAN port, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

[1] https://github.com/meyergru/lede-source/commits/TL-MR3020-V3

Signed-off-by: Carlo Nel <carlojnel@gmail.com>
6 years ago
Mathias Kresin c134210b8f ramips: drop pointless default led definitions
The LEDs should be triggered/lit by any kind of state change instead of
turned on/off unconditional.

If LEDs really need to be turned off by default, it should be done via
the default-state devicetree led property.

The handling of the wndr3700v5 and wt3020 power led is at least
strange. Something is for sure wrong with them. Either the leds are
misnamed, the default off trigger is a typo or the polarity of the
gpios is wrong. Drop the power led from userspace and wait for someone
with access to the hardware to fix it properly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 99045dfc59 ramips: express diag led handling via devicetree
Use the default-state property to express the desired led handling in
the devicetree source file instead of the userspace.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 111907e8d3 ramips: remove default on userspace trigger for diag leds
All the LEDs are turned on by diag.sh at the end of the boot process.
No need to do the same via userspace configuration again.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 56e6ebdea4 ramips: fix multi colour led handling
All boards either have a multi colour led or a single lightpipe. It
makes it impossible to handle the LEDs individual. Change the LED
config for these boards to take it into account.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin fe1e90deb4 ramips: rt-n12p: use the boardname helper variable
Use the helper variable for the Asus RT-N12P as it is done by all
boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Cezary Jackiewicz 37af596593 ramips: add support for D-Link DWR-118-A2
The DWR-118-A2 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 128 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7612EN)
- 4x 10/100 Mbps Ethernet (1 WAN and 3 LAN)
- 1x 10/100/1000 Mbps Marvell Ethernet PHY (1 LAN)
- 2x external, non-detachable antennas
- 1x USB 2.0
- UART (J1) header on PCB (57600 8n1)
- 7x LED (5x GPIO-controlled), 2x button
- JBOOT bootloader

Known issues:
- GELAN not working
- flash is very slow

The status led has been assigned to the dwr-118-a2:green:internet led.
At the end of the boot it is switched off and is available for other
operation. Work correctly also during sysupgrade operation.

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Deng Qingfang d20f4fc628 ramips: add support for HiWiFi HC5861B
HiWiFi "Gee Enjoy1200" HC5861B is a dual-band router based on MediaTek MT7628AN
https://www.hiwifi.com/enjoy-view

Specifications:
- MediaTek MT7628AN 580MHz
- 128 MB DDR2 RAM
- 16 MB SPI Flash
- 2.4G MT7628AN 802.11bgn 2T2R 300Mbps
- 5G MT7612EN 802.11ac 2T2R 867Mbps
- 5x 10/100 Mbps Ethernet

Flash instruction:
1. Get SSH access to the router
2. SSH to router with `ssh -p 1022 root@192.168.199.1`, The SSH password is the same as the webconfig one
3. Upload OpenWrt sysupgrade firmware into the router's `/tmp` folder with SCP
4. Run `mtd write /tmp/<filename> firmware`
5. reboot

Everything is working

Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
6 years ago
Daniel Gimpelevich 1d3ea7874d ramips: fix BR-6478ACv2 support
The wholesale changes introduced in commit f9b8328 missed this DTS file
because it hadn't been merged yet. This patch brings it in line to match
the other mt7620a devices' DTS files.

Additionally, the Internet LED is now labeled correctly and set to unused
by default, since the WAN interface is not known in every configuration.

Using sysupgrade between images before and after this commit will require
the -F flag.

Tested-by: Rohan Murch <rohan.murch@gmail.com>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[drop internet led default setting]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Ludwig Thomeczek 5543d63fc8 ramips: add support for Netgear R6120
This patch adds support for the Netgear R6120, aka Netgear AC1200.

Specification:
- SoC: MediaTek MT7628 (580 MHz)
- Flash: 16 MiB
- RAM: 64 MiB
- Wireless: 2.4Ghz(builtin) and 5Ghz (MT7612E)
- LAN speed: 10/100
- LAN ports: 4
- WAN speed: 10/100
- WAN ports: 1
- Serial baud rate of Bootloader and factory firmware: 57600

To flash use nmrpflash with the provided factory.img.
Flashing via webinterface will not work, for now.

Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
6 years ago
Daniel Gimpelevich f72fa883b3 ramips: add support for Edimax BR-6478AC v2
Roll-up of patches by Rohan Murch, Hans Ulli Kroll, and James McKenzie.
Taken from https://forum.openwrt.org/viewtopic.php?id=67192 and updated.

Specification:
- System-On-Chip: MT7620A
- CPU/Speed: 580 MHz
- Flash-Chip: Macronix MX25L6405D
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7620A 2.4GHz 802.11bgn
- Wireless No2: On-board chip: MT7612E 5GHz 802.11ac
- Switch: Mediatek MT7530W Gigabit Switch
- USB: Yes 1 x 2.0

Installation:
1. Download sysupgrade.bin
2. Open vendor web interface
3. Choose to upgrade firmware
4. After reboot connect via ethernet at 192.168.1.1

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
6 years ago
Ademar Arvati Filho 16d6a63f85 ramips: add support for Blueendless Kimax U35WF
Blueendless Kimax U35WF is a 3,5" HDD Enclosure with Wi-Fi and Ethernet

Patch rewritten from: https://forum.openwrt.org/viewtopic.php?id=66908
Based on: https://github.com/lede-project/source/pull/965

Specification:
- SoC: MediaTek MT7620N
- CPU/Speed: 580 MHz
- Flash-Chip: KH25L12835F Spi Flash
- Flash size: 16 MiB
- RAM: 64 MiB
- LAN: 1x 100 Mbps Ethernet
- WiFi SoC-integrated: 802.11bgn
- 1x USB 2.0
- UART: for serial console

Installation:
1. Download sysupgrade.bin
2. Open vendor web interface
3. Choose to upgrade firmware
3. After reboot connect via ethernet at 192.168.1.1

Signed-off-by: Ademar Arvati Filho <arvati@hotmail.com>
6 years ago
INAGAKI Hiroshi 0b83a23560 ramips: add support for I-O DATA WN-AX1167GR
I-O DATA WN-AX1167GR is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Cores, 4-Threads)
- 64 MB of RAM (DDR2)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 115200 bps (U-Boot, OpenWrt)

Stock firmware:

In the stock firmware, WN-AX1167GR has two os images each composed of
Linux kernel and rootfs.
These images are stored in "Kernel" and "app" partition of the
following partitions, respectively.

(excerpt from dmesg):

MX25L12805D(c2 2018c220) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 10 MTD partitions on "raspi":
0x000000000000-0x000001000000 : "ALL"
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config "
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000060000 : "iNIC_rf"
0x000000060000-0x0000007e0000 : "Kernel"
0x000000800000-0x000000f80000 : "app"
0x000000f90000-0x000000fa0000 : "Key"
0x000000fa0000-0x000000fb0000 : "backup"
0x000000fb0000-0x000001000000 : "storage"

The flag for boot partition is stored in "Key" partition, and U-Boot
reads this and determines the partition to boot.

If the image that U-Boot first reads according to the flag is
"Bad Magic Number", U-Boot then tries to boot from the other image.
If the second image is correct, change the flag to the number
corresponding to that image and boot from that image.

(example):

## Booting image at bc800000 ...
Bad Magic Number,FFFFFFFF
Boot from KERNEL 1  !!
## Booting image at bc060000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.50
   Image Type:   MIPS Linux kernel Image (lzma compressed)
   Data Size:    1865917 Bytes = 1.8 MB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
raspi_erase_write: offs:f90000, count:34
.
.
Done!

Starting kernel ...

Flash instruction using factory image:

1. Connect the computer to the LAN port of WN-AX1167GR
2. Connect power cable to WN-AX1167GR and turn on it
3. Access to "192.168.0.1" on the web browser and open firmware
update page ("ファームウェア")
4. Select the OpenWrt factory image and perform firmware update
5. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-AX1167GR
6. Wait ~180 seconds to complete flasing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Romain MARIADASSOU ce31bdc20c ramips: add support for TL-WA801ND v5
Specification:

- System-On-Chip: MediaTek MT7628NN
- CPU/Speed: 580 MHz
- Flash-Chip: ELM Technology GD25Q64
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7628N 2.4GHz 802.11bgn

Currently the only method to install openwrt for the first time is via
TFTP recovery. After first install you can use regular updates.

Flash instructions:

1) To flash the recovery image, start a TFTP server with IP address
   192.168.0.66 and serve the recovery image named tp_recovery.bin.
2) Connect your device to the LAN port, then press the WPS and Reset
   button and power it up. Keep pressing the WPS/Reset button for
   10 seconds or until the lock LED is lighting up.
   It will try to download the recovery image and flash it.

It can take up to 2-3 minutes to finish. When it reaches 100%, the
router will reboot itself.

Signed-off-by: Romain MARIADASSOU <roms2000@free.fr>
6 years ago
Maxim Anisimov 7d07bc96b7 ramips: add support for ZyXEL Keenetic Extra II
Specification:
- System-On-Chip: MT7628N/N
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond w25q256
- Flash size: 32768 KiB
- RAM: 128 MiB
- 5x 10/100 Mbps Ethernet
- 4x external, non-detachable antennas
- UART (J1) header on PCB (57600 8n1)
- Wireless No1 (2T2R): SoC-integrated: MT7628N 2.4GHz 802.11bgn
- Wireless No2 (2T2R): On-board chip: MT7612EN 5GHz 802.11ac
- USB: Yes 1 x 2.0
- 4x LED, 3x button

The device supports dual boot mode. So we use only first half of flash.

Flash instruction:

The only way to flash OpenWrt image is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-zyxel_keenetic-extra-ii-squashfs-factory.bin"
   to "kextra2_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed until power led start blinking.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
6 years ago
Tobias Schramm faf64056dd ramips: add support for MikroTik RouterBOARD RBM11g
This commit adds support for the MikroTik RouterBOARD RBM11g.

=Hardware=

The RBM11g is a mt7621 based device featuring one GbE port and one
miniPCIe slot with a sim card socket and USB 2.0.

==Switch==

The single onboard Ethernet port is connected the CPU directly.
The internal switch of the mt7621 SoC is disabled.

==Flash==

The device has one spi nor flash chip. It is a 128 Mbit winbond 25Q128FVS
connected to CS0.

==PCIe==

The board features a single miniPCIe slot. It has a dedicated mini SIM
socket and a USB 2.0 port. Power to the miniPCIe slot is controlled via
GPIO9.

==USB==

There are no external USB ports.

==Power==

The board can accept both, passive PoE and external power via a 2.1 mm
barrel jack (center-positive). The input voltage range is 11-32 V.

==Serial port==

The device does have an onboard UART on an unpopulated header next to the
flash chip:

GND: pin 2
 TX: pin 7
 RX: pin 6

Settings: 115200, 8N1

See below illustration for positioning of the header.

0 = screw hole
* = some pin
T = TX  pin
R = RX  pin
G = GND pin

Pinout:
+---------------
|O
|             __
|            /  \
|            \__/
|
|
|
|               +---+
|               |RAM|
| +--+          |   |
| |**|  <- unpopulated header with UART
| |*T|          +---+
| |R*|        +--------+
| |**|        |        |
| |G*|        |  CPU   |
| +--+        |        |
|    +--+     |        |
|    |  |     +--------+
|    +--+  <- flash chip
|O
|       +-----+
|       |     |
|+--+   |     |
||  |   |     |
+---------------------

=Installation=

To install an OpenWRT image to the device two components must be built:

1. A openwrt initramfs image
2. A openwrt sysupgrade image

===initramfs & sysupgrade image===

Select target devices "Mikrotik RBM11G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin" in the
output directory.

==Installing==

**Make sure to back up your RouterOS license in case you do ever want to
go back to RouterOS using "/system license output" and back up the
created license file.**

When rebooted the board will try booting via ethernet first. If your
board does not boot via ethernet automatically you will have to attach
to the serial port and set ethernet as boot device within RouterBOOT.

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm11g-initramfs-kernel.bin"
   initramfs image
2. Connect to ethernet port on board
3. Power on the board
4. Wait for OpenWrt to boot

Right now OpenWrt will be running with a SSH server listening. Now
OpenWrt must be flashed to the devices flash:

1. Copy "openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin"
   to the device using scp.
2. Write openwrt to flash using "sysupgrade
   openwrt-ramips-mt7621-mikrotik_rbm11g-squashfs-sysupgrade.bin"

Once the flashing completes the board will reboot. Disconnect from the
devices ethernet port or stop the DHCP/TFTP server to prevent the device
from booting via ethernet again.
The device should now boot straight to OpenWrt.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
6 years ago
Franz Flasch 8375623a06 ramips: add support for TP-Link Archer C2
Specification:

- System-On-Chip: MT7620A
- CPU/Speed: 580 MHz
- Flash-Chip: Winbond 25Q64BVSIG
- Flash size: 8192 KiB
- RAM: 64 MiB
- Wireless No1: SoC-integrated: MT7620A 2.4GHz 802.11bgn
- Wireless No2: On-board chip: MT7610EN 5GHz 802.11ac
- Switch: RTL8367RB Gigabit Switch
- USB: Yes 1 x 2.0

Preparing a TFTP recovery image for initial flashing:

Currently the only method to install openwrt for the first time is via
TFTP download in u-boot. After first install you can use regular updates.
WARNING: This method also overwrites the bootloader partition!

Create a TFTP recovery image:

1) Download a stock TP-Link Firmware file here:
     https://www.tp-link.com/en/download/Archer-C2_V1.html#Firmware
2) Extract u-boot from the binary file:
     #> dd if=c2v1_stock_firmware.bin of=c2v1_uboot.bin bs=1 skip=512 count=131072
3) Now merge the sysupgrade image and the u-boot into one binary:
     #> cat c2v1_uboot.bin openwrt-squashfs-sysupgrade.bin > ArcherC2V1_tp_recovery.bin

The resulting image can be flashed via TFTP recovery mode.

Flash instructions:

1) To flash the recovery image, start a TFTP server from IP address
   192.168.0.66 and serve the recovery image named
   ArcherC2V1_tp_recovery.bin.
2) Connect your device to the LAN port, then press the WPS/Reset button
   and power it up. Keep pressing the WPS/Reset button for 10 seconds.
   It will try to download the recovery image and flash it.

It can take up to 20-25 minutes to finish. When it reaches 100%, the
router will reboot itself.

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
6 years ago
INAGAKI Hiroshi 189815462c ramips: add support for ELECOM WRC-1167GHBK2-S
ELECOM WRC-1167GHBK2-S is a 2.4/5 GHz band 11ac router, based on
MediaTek MT7621A.

Specification:

- MT7621A (2-Cores, 4-Threads)
- 128 MB of RAM (DDR3)
- 16 MB of Flash (SPI)
- 2T2R 2.4/5 GHz
  - MediaTek MT7615D
- 5x 10/100/1000 Mbps Ethernet
- 6x LEDs, 2x keys
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 57600 bps

Flash instruction using factory image:

1. Rename the factory image to "wrc-1167ghbk2-s_v0.00.bin"
2. Connect the computer to the LAN port of WRC-1167GHBK2-S
3. Connect power cable to WRC-1167GHBK2-S and turn on it
4. Access to "http://192.168.2.1/details.html" and open firmware
update page ("手動更新(アップデート)")
5. Select the factory image and click apply ("適用") button
6. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Maxim Anisimov 8956eb502d ramips: add support for TP-Link TL-WR842N v5
TP-Link TL-WR842N v5 are simple N300 router with 5-port FE switch and
non-detachable antennas. Its very similar to TP-Link TL-MR3420 V5.

Specification:

- MT7628N/N (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH
- 2T2R 2.4 GHz
- 5x 10/100 Mbps Ethernet
- 2x external, non-detachable antennas
- USB 2.0 Port
- UART (J1) header on PCB (115200 8n1)
- 7x LED, 2x button, power input switch

Flash instruction:

The only way to flash OpenWrt image in wr842nv5 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.225/24 and tftp server.
2. Rename "lede-ramips-mt7628-tplink_tl-wr842n-v5-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
6 years ago
David Bauer 82fa7b9d78 ramips: use phytpt trigger for mt76 wireless
With this change, the LED trigger is independent from the (wireless)
netdev name. The (wireless) netdev name can be easiliy changed in
OpenWrt and would require an update of the netdev trigger settings each
time it is done.

This change is (for now) applied only to MT7628 devices from TP-Link, as
we only had the possibility to test this change against two of those
devices, namely a TL-WR841 v13 and a Archer C50 v3.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
INAGAKI Hiroshi a32c06f44d ramips: add support for I-O DATA WN-GX300GR
I-O DATA WN-GX300GR is a 2.4 GHz band 11n router, based on MediaTek
MT7621S.

Specification:

- MT7621S (1-Core, 2-Threads)
- 64 MB of RAM
- 8 MB of Flash (SPI)
- 2T2R 2.4 GHz
- 5x 10/100/1000 Mbps Ethernet
- 2x LEDs, 4x keys (2x buttons, 1x slide switch)
- UART header on PCB
  - Vcc, GND, TX, RX from ethernet port side
  - baudrate: 115200 bps (U-Boot, OpenWrt)

Flash instruction using initramfs image:

1. Connect serial cable to UART header
2. Rename OpenWrt initramfs image for WN-GX300GR to "uImageWN-GX300GR"
and place it in the TFTP directory
3. Set the IP address of the computer to 192.168.99.8, connect to the
LAN port of WN-GX300GR, and start the TFTP server on the computer
4. Connect power cable to WN-GX300GR and turn on the router
5. Press "1" key on the serial console to interrupt boot process on
U-Boot, press Enter key 3 times and start firmware download via TFTP
6. WN-GX300GR downloads initramfs image and boot with it
7. On the initramfs image, execute "mtd erase firmware" to erase stock
firmware and execute sysupgrade with sysupgrade image for WN-GX300GR
8. Wait ~150 seconds to complete flasing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Rosen Penev 9685f39787 ramips: Use generic board detect for GnuBee devices
This is a port of an old commit from mkresin's tree:

09260cdf3e9332978c2a474a58e93a6f2b55f4a8

This has the potential to break sysupgrade but it should be fine as
there is no stable release of LEDE or OpenWrt that support these devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years ago
David Bauer ce91c85e01 ramips: change wifi led trigger for Archer C50v3
This commit alters the TP-Link Archer C50v3 LED settings to use the phy
trigger instead of the netdev one. This way the WiFi status is displayed
even if the wifi interface name is altered.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 years ago
Vianney le Clément de Saint-Marcq bcf2125142 ramips: add support for Zorlik ZL5900V2
The Zorlik ZL5900V2 is an unbranded clone of HAME MPR-A1/2.  It is
marketed as "3G Wi-Fi Router".  Only the PCB has the model name
"ZL5900V2" printed on it.

Specifications:
- Ralink RT5350F (360 MHz)
- 32 MB RAM
- 8 MB Flash
- 802.11bgn 1T1R
- 1x 10/100 Mbps Ethernet
- 1x USB 2.0 (Type-A)
- 5200 mAh battery

The ramdisk image (not the squashfs sysupgrade image) can be flashed
through the web interface (named "GoAhead") of the factory firmware.
However, as the factory firmware does not cleanly unmount the rootfs
before flashing, the device may hang instead of rebooting after
successful write.  Power cycling the device gets you in OpenWrt where
the squashfs image may be flashed through normal sysupgrade procedure.

Signed-off-by: Vianney le Clément de Saint-Marcq <code@quartic.eu>
6 years ago
Zheng Qian 80a94aacaf ramips: add support for the YouHua WR1200JS
YouHua tech WR1200JS is an AC1200 router with 5 1Gb ports (4 Lan, 1 Wan)
and 1 USB 2.0 port.

Devices is base on MediaTek MT7621AT + MT7603E + MT7612E.

Specification:

- MT7612AT (880 MHz)
- 128 MB of RAM
- 16 MB of FLASH (SPI NOR)
- 5x 10/100/1000 Mbps Ethernet
- 2T2R 2.4 GHz (MT7603E)
- 2T2R 5 GHz (MT7612E)
- 1x USB 2.0
- 10x LED (Power 2G 5G WPS Internet LAN4-1 USB)
- 3x button (reset wifi wps)
- DC jack for main power input (12V)

Installation:

1.) Press reset key 5 sec and restore the factory default
2.) Login webUI and change username to root and set a
    new password
3.) Visit http://192.168.2.254/adm/telnetd.shtml and
    turn on the telnet service
4.) Copy openwrt-ramips-mt7621-youhua_wr1200js-initramfs-kernel.bin
    to a usb pan
5.) Plug the usb pan to the router, telnet to the router
    and login by root
6.) cd /media/sda1 and check the initramfs file is there
7.) exec command:
    mtd_write write openwrt-ramips-mt7621-youhua_wr1200js-initramfs-kernel.bin Kernel
8.) reboot and visit 192.168.1.1

Signed-off-by: Zheng Qian <sotux82@gmail.com>
6 years ago
Giuseppe Lippolis 6525bffc0a ramips: add support for DLINK DWR-921-C1
The DWR-921-C1 Wireless Routers with LTE embedded modem is based on the
MT7620N SoC.

Specification:

  * MediaTek MT7620N (580 Mhz)
  * 64 MB of RAM
  * 16 MB of FLASH
  * 802.11bgn radio
  * 5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
  * 2x external, detachable (LTE) antennas
  * UART header on PCB (57600 8n1)
  * 6x LED (GPIO-controlled)
  * 1x bi-color Signal Strength LED (GPIO-controlled)
  * 2x button
  * JBOOT bootloader

The status led has been assigned to the dwr-921-c1:green:sigstrength (lte
signal strength) led. At the end of the boot it is switched off and is
available for lte operation. Work correctly also during sysupgrade
operation.

Installation:
Apply factory image via d-link http web-gui.

How to revert to OEM firmware:
1.) Push the reset button and turn on the power. Wait until LED start
    blinking (~10sec.)
2.) Upload original factory image via JBOOT http (IP: 192.168.123.254)
3.) If http doesn't work, it can be done with curl command:
    curl -F FN=@XXXXX.bin http://192.168.123.254/upg
    where XXXXX.bin is name of firmware file.

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
6 years ago
Peter Lundkvist d13b05741a ramips: add support for TP-Link TL-WR902AC v3
TP-Link TL-WR902AC v3 is a pocket-size dual-band (AC750) router
based on MediaTek MT7628N + MT7650E.

Specification:
- MediaTek MT7628N/N (580 Mhz)
- 64 MB of RAM
- 8 MB of FLASH
- 2T2R 2.4 GHz and 1T1R 5 GHz
- 1x 10/100 Mbps Ethernet

* MT7650 ac chip isn't not supported by LEDE/OpenWrt at the moment.
  Therefore 5Ghz won' work.

Flash instruction:

The only way to flash LEDE image in TL-WR902AC v3 is to use
tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "openwrt-ramips-mt76x8-tplink_tl-wr902ac-v3-squashfs-tftp-recovery.bin"
   to "tp_recovery.bin" and place it in tftp server directory.
3. Connect PC with the LAN port, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

Signed-off-by: Peter Lundkvist <peter.lundkvist@gmail.com>
[drop p2led_an pinmux, this pin isn't used as gpio, fix whitespace issues]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Pawel Dembicki a5bd8de0bd ramips: add support for D-Link DWR-116-A1/2
The DWR-116-A1/2 Wireless Router is based on the MT7620N SoC.

Specification:

  MediaTek MT7620N (580 Mhz)
  32 MB of RAM
  8 MB of FLASH
  802.11bgn radio
  5x 10/100 Mbps Ethernet (1 WAN and 4 LAN)
  2x external, non-detachable antennas
  UART (J1 in A1, JP1 in A2) header on PCB (57600 8n1)
  6x LED (GPIO-controlled), 2x button
  JBOOT bootloader

Known issues:
WAN LED is drived by uartl tx pin. I decide to use this pin as
uartlite tx pin.

Installation:
Apply factory image via http web-gui.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
6 years ago
Piotr Dymacz f1c193c27e ramips: add support for ALFA Network AWUSFREE1
ALFA Network AWUSFREE1 is an USB Wi-Fi N300 adapter based on MT7628.

Specification:

- MT7628AN (580 MHz)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 2T2R 2.4 GHz (MT7628) with external FEM (RFFM4203)
- 2x detachable antennas (RP-SMA)
- ASIX AX88772 USB to Ethernet bridge (connected with MT7628 PHY0)
- 4x LED (2 driven by GPIO)
- 1x button (reset)
- 1x mini USB for host and main power input
- UART header on PCB

Flash instruction:

You can use sysupgrade image directly in vendor firmware which is based
on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot:

1. Power device with reset button pressed and release it after ~5 sec.
2. Setup static IP 192.168.1.2/4 on your PC.
3. Go to 192.168.1.1 in browser and upload "sysupgrade" image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
6 years ago
INAGAKI Hiroshi e1d4aa36b0 ramips: add support for Tama W06
Tama Electric Axing W06 is a 2.4 GHz band 11n router, based on Mediatek
MT7688AN.

Specification:

- MT7688AN (575 MHz)
- 64 MB of RAM (DDR2 SDRAM)
- 16 MB of Flash (SPI)
- 1T1R 2.4 GHz
- 1x 10/100/1000 Mbps Ethernet
- 4x LEDs (GPIO connected: 3), 1x button
- 1x USB 2.0 Type-A (host)
- UART header on PCB (GND, RX, TX, Vcc from RJ45 side)

Flash instruction using sysupgrade image:
1. Connect micro-USB cable for power supply into W06 and turn on the
router
2. Connect to wifi with SSID "tama-*" with password. Complete SSID and
password are listed on the back of the router
3. Access to 192.168.1.1 and login with user name "admin" and password
empty
4. In firmware update(ファームウェア更新) page, click "参照" button
and click "ブラウザー" button to open file browser, select the
sysupgrade image and press OK button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Mathias Kresin cb741654e5 ramips: improve GnuBee Personal Cloud Two support
Use the generic board detection for the GnuBee Personal Cloud Two
instead of the target specific one as all recent additions are doing.

Fixup the pinmux to set all pins used as GPIO to the function GPIO.
Request pins where used.

Drop the i2c from the dts. There is nothing connected. While at it fix an
indentation issue and use references instead of duplicating the whole
node path.

Use the same switch config as for the GB-PC1 and drop the led trigger for
the not supported IP1001 phy connected to second rgmii.

Fixes: c60a21532b ("ramips: Add support for the GnuBee Personal Cloud Two")
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Rosen Penev c60a21532b ramips: Add support for the GnuBee Personal Cloud Two
The GnuBee Personal Cloud Two crowdfunded on https://www.crowdsupply.com
It is a low-cost, low-power, network-attached storage device.

Specifications:

- SoC: MediaTek MT7621AT
- RAM: DDR3 512 MB
- Flash: 32 MB
- Six SATA ports for 3.5" Drives
- One SDcard
- One USB 3.0
- Two USB 2.0
- Gigabit Ethernet: Three Ports
- UART 3.5mm Audio Jack or 3 pin header - 57600 8N1
- Three GPIOs available on a pin header

Flash instructions:

The GnuBee Personal Cloud Two ships with libreCMC installed.
libreCMC is a Free Software Foundation approved fork of LEDE/OpenWrt.
As such one can upgrade using the webinterface or sysupgrade.

Das U-Boot has multiple options for recovery or updates including :

- USB
- http
- tftp

Errata:
- While there are three ethernet ports, the third requires support for
  the second GMAC. This will come in kernel 4.14.
- The first hard drive slot has a clearance issue with the two fan
  headers. Workaround is to pull the headers out and connect the pins to
  jumper wires.
- Using this device as a NAS is problematic with the 4.9 kernel as many
  /dev/sdX reads throw silent errors. The current theory behind this is
  some kind of unhandled DMA mapping error in the kernel. This is not an
  issue with kernel 4.4.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years ago