Commit Graph

85 Commits (6ba58b7b020c4b793e6fb7a43c8adef070579d8d)

Author SHA1 Message Date
Anton Arapov 6ba58b7b02 ramips: cleanup the RB750Gr3 support
Always enable the pwr led and use the usr led for boot status indication.

Rename nodes in the dts, to match what is recommend in the devicetree
specification.

Increase the maximum spi frequency to 20MHz and drop the m25p,chunked-io
which isn't required on mt7621.

Use the BTN_0 keycode for the mode button. This board doesn't have any
wireless.

Use a more descriptive label for the reset button and the GPIO enabling
the usb vcc supply.

Use the beeper kernel module for the buzzer.

Fix the pinmux to switch only pins used as GPIOs to the GPIO function.
Add support for the PoE enable GPIO to the userspace. The PoE power
status can be read via GPIO7. Since OpenWrt doesn't have support for
reading inputs from userspace, prepare only the pinmux for the GPIO.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Anton Arapov 52f2d7d2a9 ramips: add RB750Gr3 native support
This patch adds support of MikroTik RouterBOARD 750Gr3, without the need
to reflashing the bootloader.

Installation through RouterBoot follows the usual MikroTik method
https://openwrt.org/toh/mikrotik/common

Since the image isn't compatible with RouterBOARD 750Gr3 installations
which have replaced the bootloader, the former used userspace boardname
is not added to the SUPPORTED_DEVICES, to prevent a brick while trying
to upgrade to the image with native support.

Signed-off-by: Anton Arapov <arapov@gmail.com>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 7c1332d95f ramips: consolidate seama image build code
Create a common template which has the required image build code
defined. Add some new variables to pass individual parts to the seama
recipes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
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
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
Mathias Kresin 78ca6a5578 ramips: merge relocate compile into build recipe
Compile the loader if the relocate-kernel image recipe is used and get
rid of the legacy build code to do so.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 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>
5 years ago
Mathias Kresin 1977be8bd0 ramips: unifiy sysupgrade file extensions
Use .bin as file extension where possible. The user doesn't need to that
sysupgrade images for NAND boards are tarballs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 7f00123d63 ramips: remove duplicate image build variables
Remove image build variables which are set to the same value as the
default image build recipe.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Nishant Sharma df3e0b5806 ramips: add support for UniElec U7621-06-512M-64M variant
Add support for UniElec U7621-06 variant with 512MB RAM and 64MB flash.

Additional specs are below:

CPU: MT7621 (880Mhz)
Bootloader: Ralink U-Boot
Flash: 64MB
 - U-Boot identifies as Macronix MX66L51235F
 - kernel identifies as MX66L51235l (65536 Kbytes)
RAM: 512MB

Rest of the details as per commit 46ab81e405 ("ramips add support for
UniElec U7621-06")

Signed-off-by: Nishant Sharma <nishant@unmukti.in>
[use generic board detection, add firmware partition compatible, extend
firmware partition to use all of the remaining flash space, add a
maximum image size matching the firmware partition size]
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 509d02a3d1 ramips: use generic board detection for Unielec u7621-06
Use the generic board detection for the board instead of the target
specific one. Mark the sysupgrade image compatible with the former used
userspace boardname to allow an upgrade from earlier versions.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 80c61c161a treewide: use wpad-basic for not small flash targets
Add out of the box support for 802.11r and 802.11w to all targets not
suffering from small flash.

Signed-off-by: Mathias Kresin <dev@kresin.me>

Mathias did all the heavy lifting on this, but I'm the one who should
get shouted at for committing.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Jo-Philipp Wich 77e2bccde8 ramips: only limit lzma dictionary size on mt7621
The changed dictionary size leads to a different LZMA header which breaks
sysupgrade image magic checkibng on at least some RT288x boards.

Since the commit message only mentions testing on MT7621 and since the
change appears to break at least one other ramips subtarget, do not take
any chances and restrict the size limitation to only MT7621.

Fixes FS#1797
Fixes 09b6755946 ("ramips: limit dictionary size for lzma compression")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
NOGUCHI Hiroshi ad10e71bec ramips: add support for ELECOM WRC-1900GST
ELECOM WRC-1900GST is a wireless router, based on Mediatek MT7621A.
This is almost same as WRC-2533GST except wireless specs.

Specifications:

  - SoC : MT7621A (four logical CPU cores)
  - RAM : 128MiB
  - ROM : 16MiB of SPI NOR-FLASH
  - wireless :
          5GHz : 3T3R up to 1300Mbps/11ac with MT7615
          2.4GHz : 3T3R up to 600Mbps/11n with MT7615
  - Ethernet : 5 ports, all ports is capable of 1000base-T
  - Ether switch : MT7530 (MT7621A built-in)
  - LEDs : 4 LEDs
  - buttons : 2 buttons and 1 slide-switch
  - UART : header is on PCB, 57600bps

Flash instruction using factory image:

 1. Connect the computer to the LAN port of WRC-1900GST
 2. Connect power cable to WRC-1900GST and turn on it
 3. Access to "https://192.168.2.1/" and open firmware update
    page ("ファームウェア更新")
 4. Select the OpenWrt factory image and click apply ("適用")
    button
 5. Wait ~150 seconds to complete flashing

Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
6 years ago
INAGAKI Hiroshi ce93445cd6 ramips: add support for ELECOM WRC-2533GST
ELECOM WRC-2533GST is a 2.4/5 GHz band 11ac rotuer, based on
MediaTek MT7621A.

Specification:

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

Flash instruction using factory image:

1. Connect the computer to the LAN port of WRC-2533GST
2. Connect power cable to WRC-2533GST and turn on it
3. Access to "https://192.168.2.1/" and open firmware update
page ("ファームウェア更新")
4. Select the OpenWrt factory image and click apply ("適用")
button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Thibaut VARÈNE c4f09fc9f8 ramips: define common MikroTik RouterBOARD image recipe
All these devices share the exact same image format.

The usb3 kmod is added for the rbm11g, as the rbm11g has a mini-pcie
slot like its bigger sibling. The usb kmod is necessary for
usb-over-pcie support, which is mandatory for a lot of LTE modules.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
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
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
Alex Maclean 2f23a0583a ramips: RE350: add rootfs offset to header
Have mktplinkfw fill in the rootfs offset so the firmware splitter can
find it without aligning to erase blocks.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
6 years ago
Tobias Schramm 5684d08741 ramips: Add support for Mikrotik RouterBOARD RBM33g
This commit adds support for the Mikrotik RouterBOARD RBM33g.

=Hardware=

The RBM33g is a mt7621 based device featuring three gigabit ports, 2
miniPCIe slots with sim card sockets, 1 M.2 slot, 1 USB 3.0 port and a male
onboard RS-232 serial port. Additionally there are a lot of accessible
GPIO ports and additional buses like i2c, mdio, spi and uart.

==Switch==

The three Ethernet ports are all connected to the internal switch of the
mt7621 SoC:

port 0: Ethernet Port next to barrel jack with PoE printed on it
port 1: Innermost Ethernet Port on opposite side of RS-232 port
port 2: Outermost Ethernet Port on opposite side of RS-232 port
port 6: CPU

==Flash==

The device has two spi flash chips. The first flash chips is rather small
(512 kB), connected to CS0 by default and contains only the RouterBOOT
bootloader and some factory information (e.g. mac address).
The second chip has a size of 16 MB, is by default connected to CS1 and
contains the firmware image.

==PCIe==

The board features three PCIe-enabled slots. Two of them are miniPCIe
slots (PCIe0, PCIe1) and one is a M.2 (Key M) slot (PCIe2).
Each of the miniPCIe slots is connected to a dedicated mini SIM socket
on the back of the board.

Power to all three PCIe-enabled slots is controlled via GPIOs on the
mt7621 SoC:

PCIe0: GPIO9
PCIe1: GPIO10
PCIe2: GPIO11

==USB==

The board has one external USB 3.0 port at the rear. Additionally PCIe
port 0 has a permanently enabled USB interface. PCIe slot 1 shares its
USB interface with the rear USB port. Thus only either the rear USB port
or the USB interface of PCIe slot 1 can be active at the same time. The
jumper next to the rear USB port controls which one is active:

open: USB on PCIe 1 is active
closed: USB on rear USB port is active

==Power==

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

=Installation=

==Prerequisites==

A USB -> RS-232 Adapter and a null modem cable are required for
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 RBM33G" in
openwrt menuconfig and build the images. This will create the images
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" and
"openwrt-ramips-mt7621-mikrotik_rbm33g-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.**

Serial settings: 115200 8N1

The installation is a two-step process. First the
"openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin" must be booted
via tftp:

1. Set up a dhcp server that points the bootfile to tftp server serving
   the "openwrt-ramips-mt7621-mikrotik_rbm33g-initramfs-kernel.bin"
   initramfs image
2. Connect to WAN port (left side, next to sys-LED and power indicator)
3. Connect to serial port of board
4. Power on board and enter RouterBOOT setup menu
5. Set boot device to "boot over ethernet"
6. Set boot protocol to "dhcp protocol" (can be omitted if DHCP server
   allows dynamic bootp)
6. Save config
7. Wait for board to boot via Ethernet

On the serial port you should now be presented with the OpenWRT boot log.
The next steps will install OpenWRT persistently.

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

Once the flashing completes reboot the router and let it boot from flash.
It should boot straight to OpenWRT.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
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
Mathias Kresin 4bb6ee465e ramips: mt7621: fix wireless package selection
Add wpad-mini if wireless drivers are included. Drop the mt76 package if
both of the provided drivers are included with their own packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Davide Ammirata 004cc22e4e ramips: add support for mqmaker witi 512mb version
Splitted out the dts file and create the new dts for the 256 MByte RAM and
the 512 MB RAM version.

Migrate both versions to the common board detection.

The install the 512 MByte Version on a board running the 256 MByte image,
a forceful sysupgrade with the -F flag is required.

Signed-off-by: Davide Ammirata <list@davidea.it>
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
Roman Yeryomin f5984e0a0c ramips: mt7621: add Mediatek AP-MT7621A-V60 EVB support
This board has:
- mt7621 SoC
- 8MB SPI flash
- 128MB RAM
- 5x ethernet ports from internal (SoC) switch
- 1x ethernet port sitting on gmac2 and IC+ phy (not yet supported)
- 3x PCIe slots
- 1x USB 2.0 and 1x USB 3.0
- sound based on wm8960
- SDXC card slot (full size)

First fw write from interactive u-boot menu, interrupt with 2.
After that sysupgrade.

Tested both with 4.9 and 4.14

Signed-off-by: Roman Yeryomin <roman@advem.lv>
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
Jackson Ming Hu c0e131b436 ramips: add support for newifi d2
Previously Newifi D2 could only use PandoraBox M1's firmware.
It works fine, but LED GPIO is different.
As a result, a separated DTS file for this device should be implemented.

Hardware spec:

* CPU: MTK MT7621A
* RAM: 512MB
* ROM: 32MB SPI Flash
* WiFi: MTK MT7603+MT7612
* Button: 2 buttons (reset, wps)
* LED: 3 single-color LEDs (USB, WiFi 2.4GHz, WiFi 5GHz) &
       2 dual-color LEDs (Power, Internet)
* Ethernet: 5 ports, 4 LAN + 1 WAN

Installation method:

Same as Newifi D1, users may need to request unlock code from the device
manufacturer. Otherwise, a SPI flash programmer may be necessary to get
the firmware flashed. After the device is unlocked, press and hold reset
button before power cable plugs in. Then go to http://192.168.1.1 to
upload and flash the firmware package.

Signed-off-by: Jackson Ming Hu <huming2207@gmail.com>
6 years ago
Mathias Kresin 6545c71d2c ramips: sync image filename with boardname
Use <manufacturer>_<modelname> as image name for board using the
devicetree compat string as boardname.

Replace the underline of the device define, to keep the SUPPORTED_DEVICES
in sync with a devicetree compat string based boardname.

Override the default SUPPORTED_DEVICES for board which are having an
userspace boardname with an underline.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 7d3ec5f833 ramips: fallback to generic board detect
Fallback to the generic board detection if no case for the current
board exists.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Felix Fietkau 9996480b0e ramips: add support for ZBT WE3526
This is a variant of the ZBT WG3526 with a few minor modifications.
The wifi chips are swapped, and there is no GPIO controllable status
LED. There is also no SATA port.

Specifications:

- MT7621AT (880 MHz)
- 512 MB RAM
- 16 MB Flash (SPI NOR)
- 5x 1Gbps Ethernet (built-in switch)
- MT7612E 802.11ac 5 GHz WLAN
- MT7603E 802.11n 2.4 GHz WLAN

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Piotr Dymacz 46ab81e405 ramips: add support for UniElec U7621-06
UniElec U7621-06 is a router platform board based on MediaTek MT7621AT.
The device has the following specifications:

- MT7621AT (880 MHz)
- 256/512 MB of RAM (DDR3)
- 8/16/32/64 MB of FLASH (SPI NOR)
- 5x 1 Gbps Ethernet (MT7621 built-in switch)
- 1x ASMedia ASM1061 (for mSATA and SATA)
- 2x miniPCIe slots (PCIe bus only)
- 1x mSATA slot (with USB 2.0 bus for modem)
- 1x SATA
- 1x miniSIM slot
- 1x microSD slot
- 1x USB 3.0
- 12x LEDs (3 GPIO-controlled)
- 1x reset button
- 1x UART header (4-pins)
- 1x GPIO header (30-pins)
- 1x FPC connector for LEDs (20-pin, 0.5 mm pitch)
- 1x DC jack for main power (12 V)

The following has been tested and is working:

- Ethernet switch
- miniPCIe slots (tested with Wi-Fi cards)
- mSATA slot (tested with modem and mSATA drive)
- miniSIM slot
- sysupgrade
- reset button
- microSD slot

Installation:

This board might come with a different firmware versions (MediaTek SDK,
PandoraBox, Padavan, etc.). If your board comes with PandoraBox, you can
install LEDE using sysupgrade. Just SSH to the router and perform forced
sysupgrade (due to a board name mismatch). The default IP of this board
should be: 192.168.1.1 and username/password: root/admin. In case of a
different firmware, you can use web based recovery described below.

Use the following command to perform the sysupgrade (for the 256MB
RAM/16MB flash version):

sysupgrade -n -F lede-ramips-mt7621-u7621-06-256M-16M-squashfs-sysupgrade.bin

Recovery:

This board contains a Chinese, closed-source bootloader called Breed
(Boot and Recovery Environment for Embedded Devices). Breed supports web
recovery and to enter it, you keep the reset button pressed for around
5 seconds during boot. Your machine will be assigned an IP through DHCP
and the router will use IP address 192.168.1.1. The recovery website is
in Chinese, but is easy to use. Click on the second item in the list to
access the recovery page, then the second item on the next page is where
you select the firmware. In order to start the recovery, you click the
button at the bottom.

LEDs list (top row, left to right):

- LED_WWAN# (connected with pin 42 in LTE/mSATA slot)
- Power (connected directly to 3V3)
- CTS2_N (GPIO10, configured as "status" LED)
- TXD2 (GPIO11, configured as "led4", without default trigger)
- RXD2 (GPIO12, configured as "led5", without default trigger)
- LED_WLAN# (connected with pin 44 in wifi0 slot)

LEDs list (bottom row, left to right):

- ESW_P0_LED_0
- ESW_P1_LED_0
- ESW_P2_LED_0
- ESW_P3_LED_0
- ESW_P4_LED_0
- LED_WLAN# (connected with pin 44 in wifi1 slot)

Other notes:

1. The board is available with different amounts of RAM and flash. We
have only added support for the 256/16 MB configuration, as that seems
to be the default. However, all the required infrastructure is in place
for making support for the other configurations easy.

2. The manufacturer offers five different wireless cards with MediaTek
chipsets, based on MT76x2, MT7603 and MT7615. Images of the board all
show that the miniPCIe slots are dedicated to specific Wi-Fi cards.
However, the slots are generic.

3. All boards we got access to had the same EEPROM content. The default
firmware reads the Ethernet MAC from offset 0xe000 in factory partition.
This offset only contains 0xffs, so a random MAC will be generated on
every boot of the router. There is a valid MAC stored at offset 0xe006
and this MAC is shown as the WAN MAC in the bootloader. However, it is
the same on all boards we have checked. Based on information provided
by the vendor, all boards sold in small quantities are considered more
as samples for development purposes.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
7 years ago
Kevin Darbyshire-Bryant f2107fc328 ramips: improve Xiaomi Mi Router 3G support
This commit improves support for the Xiaomi Mi Router 3G originally
added in commit 6e283cdc0d

Improvements:

- Remove software watchdog as hardware watchdog now working as per
  commit 3fbf3ab44f for all mt7621
  devices.

- Reset button polarity corrected - length of press determines reboot
  (short press) vs. reset to defaults (long press) behaviour.

- Enable GPIO amber switch port LEDs on board rear - lit indicates 1Gbit
  link and blink on activity.  Green LEDs driven directly by switch
  indicating any link speed and tx activity.

- USB port power on/off GPIO exposed as 'usbpower'

- Add access to uboot environment settings for checking/setting uboot
  boot order preference from user space.

Changes:

- Front LED indicator is physically made of independent Yellow/Amber,
  Red & Blue LEDs combined via a plastic 'lightpipe' to a front panel
  indicator, hence the colour behaviour is similar to an RGB LED. RGB
  LEDs are not supported at this time because they produce colour results
  that do not then match colour labels, e.g. enabling 'mir3g:red' and
  'mir3g:blue' would result in a purple indicator and we have no such
  label for purple.
  The yellow, red & blue LEDs have been split out as individual yellow,
  red & blue status LEDs, with yellow being the default status LED as
  before and with red's WAN and blue's USB default associations removed.

- Swapped order of vlan interfaces (eth0.1 & eth0.2) to match stock vlan
  layout. eth0.1 is LAN, eth0.2 is WAN

- Add 'lwlll' vlan layout to mt7530 switch driver to prevent packet
  leakage between kernel switch init and uci swconfig

uboot behaviour & system 'recovery'

uboot expects to find bootable kernels at nand addresses 0x200000 &
0x600000 known by uboot as "system 1" and "system 2" respectively.
uboot chooses which system to hand control to based on 3 environment
variables: flag_last_success, flag_try_sys1_failed & flag_try_sys2_failed

last_success represents a preference for a particular system and is set
to 0 for system 1, set to 1 for system 2.  last_success is considered *if*
and only if both try_sys'n'_failed flags are 0 (ie. unset) If *either*
failed flags are set then uboot will attempt to hand control to the
non failed system. If both failed flags are set then uboot will check
the uImage CRC of system 1 and hand control to it if ok.  If the uImage
CRC of system is not ok, uboot will hand control to system 2
irrespective of system 2's uImage CRC.

NOTE: uboot only ever sets failed flags, it *never* clears them. uboot
sets a system's failed flag if that system's was selected for boot but
the uImage CRC is incorrect.

Fortunately with serial console access, uboot provides the ability to
boot an initramfs image transferred via tftp, similarly an image may
be flashed to nand however it will flash to *both* kernels so a backup
of stock kernel image is suggested. Note that the suggested install
procedure below set's system 1's failed flag (stock) thus uboot ignores
the last_success preference and boots LEDE located in system 2.

Considerable thought has gone into whether LEDE should replace both
kernels, only one (and which one) etc. LEDE kernels do not include a
minimal rootfs and thus unlike the stock kernel cannot include a
method of controlling uboot environment variables in the event of
rootfs mount failure. Similarly uboot fails to provide an external
mechanism for indicating boot system failure.

Installation - from stock.

Installation through telnet/ssh:
- copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and
  lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it
  from LEDE download site to /tmp
- switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if
  wgetted from LEDE download site
- run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
- run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
- run: nvram set flag_try_sys1_failed=1
- run: nvram commit
- run: reboot

Recovery - to stock.

Assuming you used the above installation instructions you will have a
stock kernel image in system 1. If it can be booted then it may be used
to perform a stock firmware recovery, thus erasing LEDE completely. From
a 'working' LEDE state (even failsafe)

Failsafe only:
- run: mount_root
- run: sh /etc/uci-defaults/30_uboot-envtools
Then do the steps for 'All'

All:
- run: fw_setenv flag_try_sys2_failed 1
- run: reboot

The board will reboot into system 1 (stock basic kernel) and wait with
system red light slowly blinking for a FAT formatted usb stick with a
recovery image to be inserted.  Press and hold the reset button for
around 1 second. Status LED will turn yellow during recovery and blue
when recovery complete.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 years ago
Pavel Kubelun 6e283cdc0d ramips: add Xiaomi Mi Router 3G support
This commit adds support for Xiaomi Mi WiFi Router 3G.

Short specification:
 - MT7621AT + MT7603EN + 7612EN
 - 256MB DDR3 RAM
 - 128MB NAND flash
 - 1+2 x 1000M Ethernet
 - 1x USB 3.0 port
 - reset button
 - yellow, blue, red leds

Installation through telnet/ssh:
- copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and
lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it
from LEDE download site to /tmp
- switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if
wgetted from LEDE download site
- run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
- run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
- run: mtd erase kernel0
- run: reboot

Originally stock firmware has following partitions:
 - ...
 - kernel0 (primary kernel image)
 - kernel1 (secondary kernel image, used by u-boot in failsafe routine)
 - rootfs0 (primary rootfs)
 - rootfs1 (secondary rootfs in case primary fails)
 - overlay (used as ubi overlay)

This commit squashes rootfs0, rootfs1 and overlay partitions into 1, so
it can be used by LEDE fully for package installation, resulting in 117,5MiB.

This device lacks hw watchdog, so adding softdog instead (stock does the same).

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
7 years ago
L. D. Pinney 77645ffcd9 ramips: add support for the GnuBee Personal Cloud One
The GnuBee Personal Cloud One 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 2.5" Drives
    - One micro SDcard
    - One USB 3.0
    - Two USB 2.0
    - Gigabit Ethernet: 1 x WAN and 1 x LAN
    - UART 3.5mm Audio Jack or 3 pin header - 57600 8N1
    - Four GPIOs available on a pin header

    Flash instructions:

    The GnuBee Personal Cloud One 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

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
[use switchdev led trigger, all interfaces are in vlan1; rename leds
according to board.d setting; remove ge2 group from the pinmux, this
group doesn't exist in the driver]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Alex Maclean f683385e73 ramips: add support for TP-Link RE350
The TP-Link RE350 is a wall-wart AC1200 range extender/access point with
a single gigabit ethernet port and two non-detachable antennas, based on
the MT7621A SoC with MT7603E and MT7612E radios.

Firmware wise it is very similar to the QCA based RE450.

SoC: MediaTek MT7621A (880MHz)
Flash: 8MiB (Winbond W25Q64)
RAM:   64MiB (DDR2)
Ethernet: 1x 1Gbit
Wireless: 2T2R 2.4Ghz (MT7603E) and 5GHz (MT7612E)
LEDs: Power, 2.4G, 5G (blue), WPS (red and blue), ethernet link/act
(green)
Buttons: On/off, LED, reset, WPS

Serial header at J1, 57600 8n1:
Pin 1 TX
Pin 2 RX
Pin 3 GND
Pin 4 3.3V

Factory image can be uploaded directly through the stock UI.

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Chuanhong Guo a4c84b2d73 ramips: add support for Phicomm K2P
It uses one MT7615D radio chip with DBDC mode enabled. This mode allows
this single chip act as an 2x2 11n radio and an 2x2 11ac radio at the
same time. However mt76 doesn't  support it currently so there is no
wireless available.

Specification:
- SoC: MediaTek MT7621AT
- Flash: 16 MB
- RAM: 128 MB
- Ethernet: 1 x WAN (10/100/1000Mbps) and 4 x LAN (10/100/1000 Mbps)
- Wireless radio: MT7615D on PCIE0
- UART: 1 x UART on PCB - 57600 8N1

Issue:
- Wireless radio doesn't work due to the lack of driver.

Flash instruction:
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.
4. Power up the device and press 2,then 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: Chuanhong Guo <gch981213@gmail.com>
7 years ago
Matthias Schiffer 4b32d66216
ramips: simplify ubnt-erx-sfp device definition
Most of the ubnt-erx definition can be reused; the package removals in
DEVICE_PACKAGES have become redundant after d17cb4a68a "ramips: purge
default packages on MT7621".

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Mathias Kresin 1faff3b7e3 ramips: add MT7603E driver to AFoundry EW1200
Add the MT7603E driver for the 2.4GHz wireless.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Sven Roederer 9715beb04c ramips: add support for Ubiquiti EdgeRouter X-SFP
This patch adds support for the Ubiquiti EdgeRouter X-SFP and
improves support for the EdgeRouter X (PoE-passthrough).

Specification:
- SoC: MediaTek MT7621AT
- Flash: 256 MiB
- RAM: 265 MiB
- Ethernet: 5 x LAN (1000 Mbps)
- UART: 1 x UART on PCB (3.3V, RX, TX, GND) - 57600 8N1
- EdgeRouter X:
  - 1 x PoE-Passtrough (Eth4)
  - powered by Wallwart or passive PoE
- EdgeRouter X-SFP:
  - 5 x PoE-Out (24V, passive)
  - 1 x SFP (unknown status)
  - powered by Wallwart (24V)

Doesn't work:
* SoC has crypto engine but no open driver.
* SoC has nat acceleration, but no open driver.
* This router has 2MB spi flash soldered in but MT
  nand/spi drivers do not support pin sharing,
  so it is not accessable and disabled. Stock
  firmware could read it and it was empty.

Installation

via vendor firmware:
- build an Initrd-image (> 3MiB) and upload the factory-image
- initrd can have luci-mod-failsafe
- flash final firmware via LuCI / sysupgrade on rebooted system

via TFTP:
- stop uboot into tftp-load into option "1"
- upload factory.bin image

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
7 years ago
Daniel Golle d17cb4a68a ramips: purge default packages on MT7621
In order to have a smaller initramfs image remove all packages not
needed on all devices and add them explicitely for those actually
needing them. Also remove wpad-mini from ramips default package set
and add it to all sub-targets except for MT7621.
While at it reorder packages alphabetically and replace kmod-mt76 with
kmod-mt7603 and/or kmod-mt76x2 depending on the chip actually used on
a specific board.

Hopefully fixes FS#758

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Mathias Kresin 3cfc909c54 ramips: rename Digineo AC1200 Pro to ZBT-WG3526 32MB
The Digineo AC1200 Pro is the 32MB flash variant of the ZBT-WG3526 with
unpopulated/exposed sdhci slot. Rename to board to the OEM/ODM name and
add the sdhci kernel module to use it for multiple clones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 619d68bfc9 ramips: prepare ZBT-WG3526 for hardware variants
The ZBT-WG3526 is available with 16 or 32 MByte of flash. Rename the
current supported 16MByte version to indicate which flash size variant
is supported.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Jiawei Wang ff258effd5 ramips: add support for ZBT-WE1326
Specification:
- SoC: MT7621AT, MT7603EN and MT7612EN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 512 MiB (EM6GE16EWXD-12H)
- Ethernet: 1 x WAN (10/100/1000Mbps) and 4 x LAN (10/100/1000 Mbps)
- Others: USB 2.0, micro SD slot, reset button and 8 x LEDs

Issues:
- Two LEDs for 2.4 GHz and 5 GHz Wi-Fi do not work, can't find GPIOs.
- The pwr LED is not GPIO controllable

How to install:
- The original firmware is OpenWrt, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.

Signed-off-by: Jiawei Wang <buaawjw@gmail.com>
7 years ago
Matthias Schiffer 411c1b64f0
ramips: update DEVICE_PACKAGES for Ubiquiti EdgeRouter X
Fixes removal of unneeded kernel modules with per-device rootfs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Mathias Kresin ae0facdf1d ramips: fix Netgear R6220 package selection
The Netgear R6220 requires the kmod-usb3 package and misses
kmod-usb-ledtrig-usbport package to setup the configured usb led
trigger.

Drop the already target selected kmod-mt76.

Fixes: FS#686

Fixes: 38bee61dab ("ramips: add support for Netgear R6220")
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Hanqing Wong 38bee61dab ramips: add support for Netgear R6220
This patch adds support for the Netgear R6220, aka Netgear AC1200 and
R6220-100NAS.

Specification:
- SoC: MediaTek MT7621ST (880 MHz)
- Falsh: 128 MiB (Macronix MX30LF1G08AA-TI)
- RAM: 128 MiB (Nanya NT5CB64M16FP-DH)
- Wireless: MediaTek MT7603EN b/g/n , MediaTek MT7612EN an+ac
- LAN speed: 10/100/1000
- LAN ports: 4
- WAN speed: 10/100/1000
- WAN ports: 1
- Serial baud rate of Bootloader and factory firmware: 57600

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

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

Signed-off-by: Hanqing Wong <hquu@outlook.com>
7 years ago