Commit Graph

134 Commits (e68539aca43a560077364de27eb220f1d85ca3ef)

Author SHA1 Message Date
Piotr Dymacz e68539aca4 ramips: add support for ALFA Network Quad-E4G
ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers
three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM,
USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support.

Specification:

- MT7621A (880 MHz)
- 256/512 MB of RAM (DDR3)
- 16/32+ MB of FLASH (SPI NOR)
- optional second SPI flash (8-pin WSON/SOIC)
- 1x microSD (SDXC) flash card reader
- 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1
- optional 802.3at/af PoE module for WAN
- 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V)
- 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM)
- RTC (TI BQ32002, I2C bus) with backup battery (CR2032)
- external hardware watchdog (EM Microelectronic EM6324)
- 1x USB 2.0 Type-A
- 1x micro USB Type-B for system serial console (Holtek HT42B534)
- 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator)
- 3x button (reset, user1, user2)
- 1x I2C (4-pin, 2.54 mm pitch) header on PCB
- 4x SIM (6-pin, 2.00 mm pitch) headers on PCB
- 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB
- 1x mechanical power switch
- 1x DC jack with lock (24 V)

Other:

- U-Boot selects default SIM slot, based on value of 'default_sim' env
  variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board
  has additional logic circuit for M.2 SIM switching. The 'sim-select'
  will work only if both SIM slots are occupied. Otherwise, always slot
  with SIM inside is selected, no matter 'sim-select' value.
- U-Boot enables power in all three miniPCIe and M.2 slots before
  loading the kernel
- this board supports 'dual image' feature (controlled by 'dual_image'
  U-Boot environment variable)
- all three miniPCIe slots have additional 5 V supply on pins 47 and 49
- the board allows to install up to two oversized miniPCIe cards (vendor
  has dedicated MediaTek MT7615N/D cards for this board)
- this board has additional logic circuit controlling PERSTn pins inside
  miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe
  slots but setting GPIO22 to high allows PERSTn control per slot, using
  GPIO23-25 (value is inverted)

You can use the 'sysupgrade' image directly in vendor firmware which is
based on OpenWrt (make sure to not preserve settings - use 'sysupgrade
-n -F ...' command). Alternatively, use web recovery mode in U-Boot:

1. Power the device with reset button pressed, the modem LED will start
   blinking slowly and after ~3 seconds, when it starts blinking faster,
   you can release the button.
2. Setup static IP 192.168.1.2/24 on your PC.
3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years ago
Adrian Schmutzler 65d76175a5 ramips: improve common definition for Netgear R6xxx in mt7621.mk
This patch renames and reassembles the common definition for
Netgear R6xxx devices in mt7621.mk. The following goals should be
achieved:
- Give the node a more generic name instead of adding devices to it
- Use the common definition in the (less) similar R6220 node
- Include/exclude settings into the common definition so the common
  node contains the common definitions
- Prepare for support of R6700 v2

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Paul Fertser 522d5ff428 ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2
- CMIIT ID: 2019AP2581
- SoC:      MediaTek MT7621
- Flash:    16MiB NOR SPI (GigaDevice GD25Q128B)
- RAM:      128MiB DDR3 (ESMT M15T1G1664A)
- Serial:   As marked on PCB, 3V3 logic, baudrate is 115200, 8n1
- Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN)
- WIFI0:    MT7603E 2.4GHz 802.11b/g/n
- WIFI1:    MT7612E 5GHz 802.11ac
- Antennas: 4x external (2 per radio), non-detachable
- LEDs:     Programmable "power" LED (two-coloured, yellow/blue)
            Non-programmable "internet" LED (shows WAN activity)
- Buttons:  Reset

INSTALLATION:

Bootloader won't accept any serial input unless "boot_wait" u-boot
environment variable is changed to "on". Vendor firmware (looks like
an illegal OpenWrt fork) won't accept any serial input unless
"uart_en" is set to "1". Tricks to force u-boot to use default
environment do not help as it's restricted in the same way.

With bootloader unlocked the easiest way would be to TFTP the
sysupgrade image or to sysupgrade after loading an initramfs one.

For porting the flash contents were changed externally with an SPI
programmer (after lifting Vcc flash IC pin away from the PCB).

Forum thread [0] indicates that this device is identical to "Xiaomi Mi
Router 4A Gigabit Edition".

[0] https://forum.openwrt.org/t/xiaomi-mi-router-4a-gigabit-edition-r4ag-r4a-gigabit-fully-supported-but-requires-overwriting-spi-flash-with-programmer/36685

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
5 years ago
Gabor Varga 7c5f712e4f ramips: add support for Asus RT-AC65P
The Asus RT-AC65P router is identical with the RT-AC85P, but better to make separate images for it.

On both routers the installation can be done also via SSH:

Note: The user/password for SSH is identical with the one used in the
Web-interface.

1. Complete the initial setup wizard.
2. Activate SSH under "Administration" -> "System".
3. Transfer the OpenWrt factory image via scp:
 > scp openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin admin@192.168.50.1:/tmp
4. Connect via SSH to the router.
 > ssh admin@192.168.50.1
5. Write the OpenWrt image to flash.
 > mtd-write -i
/tmp/openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin -d linux
6. Reboot the router
 > reboot

Changelog:

v3: removed [] from filename, rebased to latest master
v2: Rebased to latest master
v1: Initial release

Signed-off-by: Gabor Varga <vargagab@gmail.com>
5 years ago
Adrian Schmutzler e4155bcc45 ramips: fix TARGET_DEVICES after UniElec rename
Device node names were updated, but updating TARGET_DEVICES
was overlooked.

Fixes: 4408723d42 ("ramips: remove RAM size from device name
for UniElec devices")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 4408723d42 ramips: remove RAM size from device name for UniElec devices
UniElec devices are the last ones in ramips target still having
the RAM size in device name although RAM size is auto-detected.

Remove this from device name, compatible, etc., as it's not
required and might be misleading to users and developers adding
device support copying those devices.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Roger Pueyo Centelles ac36cca012 ramips: mt7621: Alternative name KE 2P for Phicomm K2P
The Phicomm KE 2P is identical to the already supported Phicomm K2P,
renamed for the European market. Use the ALT0 buildroot tags to show
both devices.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years ago
Adrian Schmutzler b376818f97 ramips: harmonize device vendor Zbtlink
Spelling of Zbtlink varies across image definitions and DTS files.

This patch uses Zbtlink consistently and also updates the model
in DTS files to contain the vendor in all cases.

This patch is cosmetical, as there should be no dependencies on
device model name in ramips anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
INAGAKI Hiroshi 12ab6ef5c3 ramips: add support for I-O DATA WNPR2600G
I-O DATA WNPR2600G is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Specification:

- SoC           : MediaTek MT7621A
- RAM           : DDR3 128 MiB
- Flash         : SPI-NOR 16 MiB
- WLAN          : 2.4/5 GHz 4T4R
  - 2.4 GHz     : MediaTek MT7615
  - 5 GHz       : MediaTek MT7615
- Ethernet      : 10/100/1000 Mbps
  - Switch      : MT7530 (SoC)
- LED/keys      : 4x/3x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB
  - J1: Vcc, RX, GND, TX from SoC side
  - 57600n8

Flash instruction using factory image:

1. Boot WNPR2600G normaly
2. Access to "http://192.168.0.1/" and open firmware update page
("ファームウェア")
3. Select the OpenWrt factory image and click update ("更新") button
to perform firmware update
4. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
INAGAKI Hiroshi c1394dabf6 ramips: move "elx-header" to Makefile from mt7620.mk and mt7621.mk
I-O DATA WNPR2600G has an "elx-header", so move this definition to
generic makefile to use it from mt7621 subtarget.
This definition is also added to mt7621.mk in
f285e8634c, so remove it from mt7621.mk.

And added a line to cleanup used header file.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Qi Jiang 93b6cc97ca ramips: add support for XiaoYu XY-C5
Hardware:
SoC:      MT7621A
Flash:    32 MiB
RAM:      512 MiB
Ethernet: built-in switch
USB:      1x USB3.0
SATA:     ASM1060, 1 SATA port

Flash instruction (TFTP):
1. Set PC to fixed ip address 192.168.173.22
2. Download *-sysupgrade.bin image and rename it to firmware.img
3. Start a tftp server with the image file in its root directory
4. Turn off the router
5. Turn on router,press the reset button and wait ~15 seconds
6. Release the reset button and after a short time
   the firmware should be transferred from the tftp server
7. Wait ~3 minutes to complete recovery.

Signed-off-by: Qi Jiang <rushx@live.cn>
[squash commits, add label-mac-device, fix sign-off style]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Daniel Danzberger 10c5d3dd5f ramips: mt7621: Add new device AsiaRF AP7621-NV1
SoC:    Mediatek MT7621A
CPU:    4x 880Mhz
Cache:  32 KB I-Cache and 32 KB D-Cach
        256 KB L2 Cache (shared by Dual-Core)
RAM:    DDR3 512MB 16bits BUS
FLASH:  16MB
Switch: Mediatek Gigabit Switch (2 x LAN, 1 x WAN)
POE:    (1x PD, 2x PSE)
USB:    1x 3.0
PCI:    3x Mini PCIe (3 USB2.0 + 2 x UIM interface)
GPS:    Quectel L70B
SIM:    2 Slots
BTN:    Reset
LED:    - Power
        - Ethernet
        - Wifi
        - USB
UART:  UART is present as Pads with throughholes on the PCB.
       They are located on left side.
       3.3V - RX - GND - TX / 57600-8N1
       3.3V is the square pad

Installation
------------
The stock image is a modified openwrt and can be overflashed via sysupgrade -F

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
[merge conflict in mt7621.mk]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Birger Koblitz fde8e2e035 ramips: add support for Asus RT-AC85P
SoC:	MediaTek MT7621AT dual-core @ 880MHz
RAM:	256M (Winbond W632GG6KB-1)
FLASH:	128MB (Macronix MX30LF1G18AC-TI)
WiFi:	- 2.4GHz MediaTek MT7615N bgn
	- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB:	1 x USB 3.1 (Gen 1)
BTN:	Reset, WPS
LED:	- Power (blue)
	- 5Ghz (blue)
	- 2.4GHz (blue)
	- Internet (blue)
	- 4x LAN (blue)
	(LAN/WAN leds are not controllable by GPIOs)
UART: 	UART is present as Pads marked J4 on the PCB.
	3.3V - TX - RX - GND / 57600-8N1
	3.3V is the square pad
MAC:	The MAC address on the router-label matches the MAC of
	the 2.4 GHz WiFi.
	LAN and WAN MAC are identical: MAC_LABEL+4
	5 GHz WiFi MAC: also MAC_LABEL+4

Installation
------------
Via U-Boot tftpd:
Switch on device, within 2s press reset button and keep pressed
until power LED starts blinking slowly.
Upload factory image via tftp put, the router's ip is 192.168.1.1
and expects the client on 192.168.1.75.

The images also work on the Asus RT-AC65P models as tested by Gabor.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Tested-by: Gabor Varga <vargagab@gmail.com>
[fixed Asus -> ASUS in DTS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Birger Koblitz f285e8634c ramips: add support for Edimax RG21S
SoC:	MediaTek MT7621AT dual-core @ 880MHz
RAM:	256M (Nanya NT5CC128M)
FLASH:	16MB (Macronix MX25L12835F)
WiFi:	- 2.4GHz MediaTek MT7615N bgn
	- 5GHz MediaTek MT7615N nac
Switch: SoC integrated Gigabit Switch (4 x LAN, 1 x WAN)
USB:	No
BTN:	Reset, WPS
LED:	4 red LEDs, indistinguishable when casing closed
UART: 	UART is present as Pads marked J1 on the PCB.
	3.3V - RX - GND - TX / 57600-8N1
	3.3V is the square pad

Installation
------------
Update the factory image via the OEM web-interface
(by default:http://192.168.1.1)
The sysupgrade image can be installed via TFTP from
the U-Boot bootloader. Connect ethernet port 2.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
[flash node rename, EDIMAX -> Edimax, complete device model name]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Christoph Krapp 6cea9688af ramips: add support for Netgear R6260 and R6850
As Netgear uses the same image for R6260, R6350 & R6850
we can merge device tree files and generate separate
images for each device.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[add missing WiFi compatible string, fix network
configuration]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christoph Krapp 3c8df280a9 ramips: add factory image for Netgear R6350
This adds factory image generation for all three
devices. These images can be flashed via WebUI
for easy installation.

Thanks to David Bauer for the inspiration.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[altered commit to only include the R6350]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Christoph Krapp 9861fa7aba ramips: add mt7615e support to Netgear R6350
Signed-off-by: Christoph Krapp <achterin@googlemail.com>
5 years ago
David Bauer 607dfdf211 ramips: add factory image for NETGEAR R6220
This adds an easy-installation factory image for the NETGEAR R6220
router. The factory image can either be flashed via the vendor Web-UI or
the bootloader using nmrpflash.

Tested with NETGEAR V1.1.0.86 firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Zhenjian Zhang fb3574f123 ramips: add support for ADSLR G7
SoC: MT7621AT
RAM: 256MB
Flash: 16M SPI
Ethernet: 5x GE ports
WiFi: 2.4G: MT7615N
5G: MT7615N

Flash instruction:
1.Modify the file to linux.bin
2.Set up FTP service
3.Computer settings fixed IP: 192.168.179.50 255.255.255.0
4.Turn on the power and press and hold the reset button until the indicator light is on for about 5 seconds.

Signed-off-by: Zhenjian Zhang <itdesk.zhang@gmail.com>
[fix mac location]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Felix Fietkau 7ec092e641 Revert faulty tree push
Revert "mac80211: add new minstrel_ht patches to improve probing on mt76x2" (9861050b85)
Revert "kernel: use bulk free in kfree_skb_list to improve performance" (98b654de2e)
Revert "ramips: add preliminary support for WIO ONE" (085141dc5b)
Revert "ramips: add preliminary support for SGE AP-MTKH7-0006 developer board" (b1db6d0539)
Revert "build: use config.site generated by autoconf-lean, drop hardcoded sitefiles" (363ce4329d)
Revert "toolchain: add autoconf-lean" (fdb30eed03)
Revert "build: allow overriding the filename on the remote server when downloading" (6fa0e07758)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Felix Fietkau 085141dc5b ramips: add preliminary support for WIO ONE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Felix Fietkau b1db6d0539 ramips: add preliminary support for SGE AP-MTKH7-0006 developer board
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Ozgur Can Leonard d7c082ba4f ramips: add kmod-mt7615e to Xiaomi Mi Router 3 Pro images
Now that the mt76/mt7615e driver is in Openwrt, might as well use it.

Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com>
5 years ago
Adrian Schmutzler f14a5c3f2f ramips: use kiB instead of B for IMAGE_SIZE
This cosmetical patch is just meant to make comparing/checking
IMAGE_SIZE values easier.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 9d87a58d34 ramips: remove ralink_default_fw_size_xxx variables
There are frequent examples of the ralink_default_fw_size_xxx
variables being used to "roughly" set flash size without caring
about the actual size of the firmware partition.

To discourage this behavior, this patch removes the variables and
just sets IMAGE_SIZE by its numeric value for each target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 363197311b ramips: remove default IMAGE_SIZE for ramips target
Currently, ramips target defines 0x7b0000 as default IMAGE_SIZE
for all devices in ramips target, i.e. this will be set if a
device does not specify IMAGE_SIZE itself.

From 92 devices using that default due to a "missing" IMAGE_SIZE,
14 were incorrect by a small amount (i.e. still "8M" flash) and
12 were completely off ("16M", "4M", ...).

This patch thus removes the _default_ IMAGE_SIZE and defines
IMAGE_SIZE for each device individually. This should indicate to
people supporting new devices that this parameter has to be cared
about.

For the present code, this patch is cosmetical.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 7263838e69 ramips/mt7621: fix IMAGE_SIZE for all devices
This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                     *.MK     *.DTS     VERDICT
afoundry_ew1200            (16M)    0xfb0000
asiarf_ap7621-001          (16M)    0xfa0000  wrong
buffalo_wsr-1166dhp        (16M)    0xf90000  wrong
buffalo_wsr-600dhp         (16M)    0xfb0000
dlink_dir-860l-b1          (16M)    0xfb0000
d-team_newifi-d2           (32M)    0x1fb0000
d-team_pbr-m1              (16M)    0xfb0000
elecom_wrc-1167ghbk2-s     15488k   0xf20000
elecom_wrc-1900gst         11264k   0xb00000
elecom_wrc-2533gst         11264k   0xb00000
firefly_firewrt            (16M)    0xfb0000
gehua_ghl-r-001            (32M)    0x1fb0000
gnubee_gb-pc1              (32M)    0x1fb0000
gnubee_gb-pc2              (32M)    0x1fb0000
hiwifi_hc5962              (32M)    0x2000000 wrong (kernel + ubi)
iodata_wn-ax1167gr         15552k   0xf30000
iodata_wn-gx300gr          7798784  0x770000
lenovo_newifi-d1           (32M)    0x1fb0000
linksys_re6500             -        0x7b0000  default
mediatek_ap-mt7621a-v60    (8M)     0x7b0000
mediatek_mt7621-eval-board (4M)     0xec0000  wrong (rootfs)
mikrotik_rb750gr3          [16128k] 0xfc0000
mikrotik_rbm11g            [16128k] 0xFC0000
mikrotik_rbm33g            [16128k] 0xFC0000
mqmaker_witi-256m          (16M)    0xfb0000
mqmaker_witi-512m          (16M)    0xfb0000
mtc_wr1201                 16000k   0xfa0000
netgear_ex6150             14848k   0xe80000
netgear_r6220              28672k   0x1c00000
netgear_r6350              40960k   0x2800000
netgear_wndr3700-v5        15232k   0xee0000
netis_wf-2881              129280k  0x7E40000
phicomm_k2p                15744k   0xf60000
planex_vr500               66453504 0x3fb0000 wrong
samknows_whitebox-v8       (16M)    0xfb0000
storylink_sap-g3200u3      -        0x7b0000  default
telco-electronics_x1       16064k   0xfb0000
thunder_timecloud          -        0xfb0000  wrong
totolink_a7000r            16064k   0xfb0000
tplink_re350-v1            6016k    0x5e0000
ubiquiti_edgerouterx       -        0xfa00000 wrong (kernel1 + ubi)
ubiquiti_edgerouterx-sfp   -        0xfa00000 wrong (kernel1 + ubi)
unielec_u7621-06-256m-16m  16064k   0xfb0000
unielec_u7621-06-512m-64m  65216k   0x3fb0000
wevo_11acnas               (16M)    0xfb0000
wevo_w2914ns-v2            (16M)    0xfb0000
xiaomi_mir3g               32768k   0x7980000 wrong (kernel + ubi)
xiaomi_mir3p               (32M)    0xf980000 wrong (kernel + ubi)
xzwifi_creativebox-v1      (32M)    0x1fb0000
youhua_wr1200js            16064k   0xfb0000
youku_yk-l2                (16M)    0xfb0000
zbtlink_zbt-we1326         (16M)    0xfb0000
zbtlink_zbt-we3526         (16M)    0xfb0000
zbtlink_zbt-wg2626         (16M)    0xfb0000
zbtlink_zbt-wg3526-16m     (16M)    0xfb0000
zbtlink_zbt-wg3526-32m     (32M)    0x1fb0000

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 7392af7520 ramips: fix ralink_default_fw_size_16M
In ramips, there are the following predefined values for IMAGE_SIZE
ralink_default_fw_size_4M    3866624   3776k   0x3B0000
ralink_default_fw_size_8M    8060928   7872k   0x7B0000
ralink_default_fw_size_16M  16121856  15744k   0xF60000
ralink_default_fw_size_32M  33226752  32448k  0x1FB0000

Out of those, the "16M" value is obviously odd, as it provides more
room for the remaining partitions than the tree others.
Of the devices in all subtargets, there are actually > 50 that have
a firmware partition with 0xFB0000 size, while only 5 (!) have
0xF60000. From the former, many are set to
ralink_default_fw_size_16M anyway, although it is wrong at the
present point.

Consequently, it makes sense to change ralink_default_fw_size_16M
to 0xFB0000, and to update IMAGE_SIZE for the 5 devices with
0xF60000.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Roger Pueyo Centelles 7d684b7673 ramips: add kmod-mt7615e to Phicomm K2P images
Now that the mt76 driver supports the MT7615D chip found on these
devices, use it.

Also add the wpad-basic package.

Note: the driver supports operation on both the 2.4 GHz and the
      5 GHz bands, but not yet concurrently.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years ago
DENG Qingfang 0e6d97f961 ramips: enable Newifi D1 SD slot
Newifi D1 is shipped with an 8GB microSD card in its SD slot
Without SD driver users would not be able to use it unless manually installed

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years ago
Georgi Vlaev 8c51ddeff0 ramips: add support for TP-Link RE650 v1
TP-Link RE650 v1 is a dual-band AC2600 range extender,
based on MediaTek MT7621A and MT7615E. According to the
wikidevi entry for RE650 this device is identical with
TP-Link RE500 as hardware. This patch supports only RE650.

Hardware specification:

- SoC 880 MHz - MediaTek MT7621AT
- 128 MB of DDR3 RAM
- 16 MB - Winbond 25Q128FVSG
- 4T4R 2.4 GHz - MediaTek MT7615E
- 4T4R 5 GHz - MediaTek MT7615E
- 1x 1 Gbps Ethernet - MT7621AT integrated
- 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2))
- 4x buttons (Reset, Power, WPS, LED)
- UART header (J1) - 2:GND, 3:RX, 4:TX
  Serial console @ 57600,8n1

Flash instructions:

Upload
openwrt-ramips-mt7621-tplink_re650-v1-squashfs-factory.bin
from the RE650 web interface.

TFTP recovery to stock firmware:

Unfortunately, I can't find an easy way to recover the RE
without opening the device and using modified binaries. The
TFTP upload will only work if selected from u-boot, which
means you have to open the device and attach to the serial
console. The TFTP update procedure does *not* accept the
published vendor firmware binaries. However, it allows to
flash kernel + rootfs binaries, and this works if you have
a backup of the original contents of the flash. It's probably
possible to create special image out of the vendor binaries
and use that as recovery image.

Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com>
[re-added variables for kernel header]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
INAGAKI Hiroshi cda123fe69 ramips: add MT7615 wireless support for ELECOM WRC-1167GHBK2-S
ELECOM WRC-1167GHBK2-S has a MediaTek MT7615D chip for 2.4/5 GHz
wireless.

A driver package for MT7615 chip is added to OpenWrt in
a0e5ca4f35,
so add preliminary MT7615 chip support for WRC-1167GHBK2-S.

Note: Currently, DBDC mode for MT7615 is not supported in mt76 driver.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
David Bauer 14e0e4f138 ramips: add support for ASUS RT-AC57U
SoC:   MediaTek MT7621AT
RAM:   128M (Winbond W631GG6KB-15)
FLASH: 16MB (Spansion S25FL128SA)
WiFi:  MediaTek MT7603EN bgn 2SS
WiFi:  MediaTek MT7612EN nac 2SS
BTN:   Reset - WPS
LED:    - Power
        - LAN {1-4}
        - WAN
        - WiFi 2.4 GHz
        - WiFi 5 GHz
        - USB
UART:  UART is present next to the Power LED.
       TX - RX - GND - 3V3 / 57600-8N1
       3V3 is the nearest one to the Power LED.

Installation
------------
Via TFTP:
1. Set your computers IP-Address to 192.168.1.75.
2. Power up the Router with the Reset button pressed.
3. Release the Reset button after 5 seconds.
4. Upload OpenWRT sysupgrade image via TFTP:
 > tftp -4 -v -m binary 192.168.1.1 -c put <IMAGE>

Via SSH:
Note: User/password for SSH is identical with the one used in the
Web-interface.
1. Complete the initial setup wizard.
2. Activate SSH under "Administration" -> "System".
3. Transfer the OpenWrt sysupgrade image via scp:
 > scp owrt.bin admin@192.168.1.1:/tmp
4. Connect via SSH to the router.
 > ssh admin@192.168.1.1
5. Write the OpenWrt image to flash.
 > mtd-write -i /tmp/owrt.bin -d linux
6. Reboot the router
 > reboot

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Chuanhong Guo 087e14ab59 ramips: mt7621: merge two variants of MQmaker WiTi together
Since we can auto-detect memory now, we don't need 2 dts for two
memory variants.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Adrian Schmutzler 447deed52a ramips: Sort all subtarget Makefiles
This patch applies sorting to the definitions as whole blocks.

Sorting has been performed fully automatic, line count differences
originate from double empty lines removed.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 7196ca1d49 ramips/mt7621: Name DTS files based on scheme
As introduced with ath79, DTS files for ramips will now be labelled
soc_vendor_device.dts(i). With this change, DTS files can be
selected automatically without further manual links.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 2f2a319f82 ramips/mt7621: Synchronize Makefiles with DTS compatible
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Chuanhong Guo 7a8d3432c7 ramips: use upstream RAW_APPENDED_DTB instead of our OWRTDTB
Upstream kernel added support for RAW_APPENDED_DTB on ralink arch
in the following commit:
02564fc89d3d ("ralink: Introduce fw_passed_dtb to arch/mips/ralink")

Use upstream solution and get rid of our OWRTDTB hack.
This commit set DEVICE_DTS to $$(DTS) instead of replacing DTS with
DEVICE_DTS in device profile because DTS variable will be dropped
in later commits.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Tested on mt7621/mt76x8]
Tested-by: Chuanhong Guo <gch981213@gmail.com>
[Tested on rt305x/mt7620]
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Daniel Golle ee66fe4ea9 ramips: convert DEVICE_TITLE to new variables
Also unify naming and add details where they were missing.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Chuanhong Guo 3f68cffd27 ramips: add support for TOTOLINK A7000R
Specifications:
- SoC: MT7621AT
- RAM: 128MB
- Flash: 16M SPI NOR
- Ethernet: 5x GE ports
- WiFi: 2.4G: MT7615N
        5G: MT7615N

Flash instruction:
Upload generated sysupgrade firmware through factory web interface.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years ago
Daniel Danzberger 029c970464 ramips: mt7621: Add new device AsiaRF AP7621-001
Hardware specs:
SoC:	Mediatek MT7621A
CPU:	4x 880Mhz
Cache:	32 KB I-Cache and 32 KB D-Cach
	256 KB L2 Cache (shared by Dual-Core)
RAM:	DDR3 512MB 16bits BUS
FLASH:	16MB
Switch:	Mediatek Gigabit Switch (1 x LAN, 1 x WAN)
USB:	1x 3.0
PCI:	3x Mini PCIe
GPS:	Quectel L70B
BTN:	Reset
LED:	- Power
	- Ethernet
	- Wifi
	- USB
UART:	UART is present as Pads with throughholes on the PCB.
	They are located on left side.
	3.3V - RX - GND - TX / 57600-8N1
	3.3V is the square pad

Installation:
The stock image is a modified openwrt and can be overflashed via
 # sysupgrade -F image.bin

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[removed unused label, formatting]
5 years ago
Jan Hoffmann 085f66de9a ramips: create R6220 dtsi and improve WNDR3700v5 support
The R6220 and WNDR3700v5 are identical apart from using NAND/NOR flash and
having a different casing. This adds a new cleaned up R6220.dtsi with the
common bits for both devices. Both devices now have feature parity.

Performed cleanup:
 * generic DTS node names
 * regulator for usb power
 * added missing pinctrl groups
 * use switch port instead of VLAN as trigger for WAN LED

Fixes for WNDR3700v5:
 * all LEDS work
 * correct ethernet MAC addresses

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
5 years ago
Nicholas Smith 73e0f52b6e ramips: add support for Telco Electronics X1
Hardware:
SoC:   MT7621
DRAM:  256MB DDR3
Flash: 16MB SPI-NOR
WiFi:  2.4GHz: MT7603 @ PCIe0
WiFi:  5.8GHz: MT7612 @ PCIe1
Modem: Sierra Wireless MC74xx

Interfaces:
GBE RJ45 x5
mPCIe    x2
UART     x1
I2C      x1
JTAG     x1
UIM      x1
LEDs     x6

Flash instructions:
Flash from within the factory bootloader, firmware web interface or CLI using
sysupgrade -F -n

Signed-off-by: Nicholas Smith <mips171@icloud.com>
5 years ago
Jan Hoffmann 2fdd02cc7c ramips: add factory image for WNDR3700v5
This uses the existing rules for Sercomm factory images and moves them
to the ramips image Makefile, so they can be used in all subtargets.

The new factory image for WNDR3700v5 can be flashed using nmrpflash.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
5 years ago
Zhao Yu 32689e93c4 ramips: add support for Youku YK-L2
Hardware spec:

CPU: MTK MT7621A
RAM: 256MB
ROM: 16MB SPI Flash
WiFi: MT7603EN + MT7612EN
Button: 2 buttons (reset, wps)
LED: 8 LEDs (Power 2G 5G WPS Internet LAN1 LAN2 USB)
Ethernet: 3 ports, 2 LAN + 1 WAN
Other: USB3.0

Flashing instructions:

Visit the openwrt forum topic for this router:
https://forum.openwrt.org/t/add-openwrt-support-for-youku-yk-l2/34692

to get the bootloader and unlock firmware.

0. upgrade your router with the telnet firmware via the
   firmware upgrade page on the webui.

1. telnet 192.168.11.1 from your PC

2. Download the pb-boot-youku_l2-20190317-61b6d33.bin and transfer
   it to the /tmp directory of the router.

3. mtd write /tmp/pb-boot-youku_l2-20190317-61b6d33.bin Bootloader

4. turn off the power

5. Push the reset button while turning on the router and
   wait until LED start blinking (~10sec.)

6. Connect Ethernet port and goto http://192.168.1.1.

7. Upload the firmware to firmware restore page in webui.

Signed-off-by: Zhao Yu <574249312@qq.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [rewrote the
flashing instructions, fixed author]
5 years ago
David Bauer 3f019bf96c ramips: add Netgear EX6150
SoC:   MediaTek MT7621
RAM:   64M (Winbond W9751G6KB-25)
FLASH: 16MB (Macronix MX25L12835F)
WiFi:  MediaTek MT7662E bgn 2SS
WiFi:  MediaTek MT7662E nac 2SS
BTN:   ON/OFF - Reset - WPS - AP/Extender toggle
LED:    - Arrow Right (blue)
        - Arrow Left (blue)
        - WiFi 1 (red/green)
        - WiFi 2 (red/green)
        - Power (green/amber)
        - WPS (Green)
UART:  UART is present as Pads on the backside of the PCB. They are
       located on the other side of the Ethernet port.
       3.3V - GND - TX - RX / 57600-8N1
       3.3V is the nearest one to the antenna connectors

Installation
------------
Update the factory image via the Netgear web-interfaces (by default:
192.168.1.250/24).

You can also use the factory image with the nmrpflash tool.
For more information see https://github.com/jclehner/nmrpflash

Signed-off-by: David Bauer <mail@david-bauer.net>
[merge conflict in 02_network, flash@0 node rename, wlan DTS triggers]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Ozgur Can Leonard 201d3d1a82 ramips: Xiaomi MIR3G: detect board name from DTS
- Former "mir3g" board name becomes "xiaomi,mir3g".
- Reorder some entries to maintain alphabetical order.
- Change DTS so status LEDs (yellow/red/blue) mimic
  Xiaomi stock firmware: (Section Indicator)
<http://files.xiaomi-mi.co.uk/files/router_pro/router%20PRO%20EN.pdf>
<http://files.xiaomi-mi.co.uk/files/Mi_WiFi_router_3/MiWiFi_router3_EN.pdf>
|Yellow: Update (LED flickering), the launch of the system (steady light);
|Blue: during normal operation (steady light);
|Red: Safe mode (display flicker), system failure (steady light);

Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com>
[Added link to similar Router 3 model]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Ozgur Can Leonard d009033911 ramips: add support for Xiaomi Mi Router 3 Pro
Hardware:

CPU:   MediaTek MT7621AT (2x880MHz)
RAM:   512MB DDR3
FLASH: 256MB NAND
WiFi:  2.4GHz 4x4 MT7615 b/g/n (Needs driver, See Issues!)
WiFI:  5GHz 4x4 MT7615 a/n/ac  (Needs driver, See Issues!)
USB:   1x 3.0
ETH:   1x WAN 10/100/1000 3x LAN 10/100/1000
LED:   Power/Status
BTN:   RESET
UART:  115200 8n1

Partition layout and boot:

Stock Xiaomi firmware has the MTD split into (among others)

- kernel0 (@0x200000)
- kernel1 (@0x600000)
- rootfs0
- rootfs1
- overlay (ubi)

Xiaomi uboot expects to find kernels at 0x200000 & 0x600000
referred to as system 1 & system 2 respectively.
a kernel is considered suitable for handing control over
if its linux magic number exists & uImage CRC are correct.
If either of those conditions fail, a matching sys'n'_fail flag
is set in uboot env & a restart performed in the hope that the
alternate kernel is okay.
If neither kernel checksums ok and both are marked failed, system 2
is booted anyway.

Note uboot's tftp flash install writes the transferred
image to both kernel partitions.

Installation:

Similar to the Xiaomi MIR3G, we keep stock Xiaomi firmware in
kernel0 for ease of recovery, and install OpenWRT into kernel1 and
after.

The installation file for OpenWRT is a *squashfs-factory.bin file that
contains the kernel and a ubi partition. This is flashed as follows:

nvram set flag_try_sys1_failed=1
nvram set flag_try_sys2_failed=0
nvram commit
dd if=factory.bin bs=1M count=4 | mtd write - kernel1
dd if=factory.bin bs=1M skip=4 | mtd write - rootfs0
reboot

Reverting to stock:

The part of stock firmware we've kept in kernel0 allows us to run stock
recovery, which will re-flash stock firmware from a *.bin file on a USB.

For this we do the following:

fw_setenv flag_try_sys1_failed 0
fw_setenv flag_try_sys2_failed 1
reboot

After reboot the LED status light will blink red, at which point pressing
the 'reset' button will cause stock firmware to be installed from USB.

Issues:

OpenWRT currently does not have support for the MT7615 wifi chips. There is
ongoing work to add mt7615 support to the open source mt76 driver. Until that
support is in place, there are closed-source kernel modules that can be used.

See: https://forum.openwrt.org/t/support-for-xiaomi-wifi-r3p-pro/20290/170

Signed-off-by: Ozgur Can Leonard <ozgurcan@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[02_network remaps, Added link to notes]
5 years ago
Ju Se Hoon 9f90074db7 ramips: add kmod-mt76x2 to WeVo 11AC NAS
The WeVo 11AC NAS has a MT7612E 802.11ac chip on the PCB.

Signed-off-by: Ju Se Hoon <joosahoon@gmail.com>
[renamed author from Albis-dev to real name, editted commit message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
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