Commit Graph

144 Commits (28080d54d217fb4ab112e079f69462fee695dbf8)

Author SHA1 Message Date
Petr Štetiar 28080d54d2 ramips: mt7621: disable images for gehua_ghl-r-001
This device OOPs during the boot due to broken flash. It can be probably
fixed with `broken-flash-reset` once ramips is on 4.19 kernel.

So disable images for this device until its fixed.

Ref: FS#2695, PR#2483
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
David Bauer 8f0effc462 ramips: disable image build for HiWiFi HC5962
Image builds for the ramips-mt7621 target currently fail with:
> WARNING: Image file ./hiwifi_hc5962-kernel.bin is too big
Disable this board for now. It can still be built using the SDK.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Yong-hyu Ban 99dd2709b8 ramips: add support for ipTIME A8004T
ipTIME A8004T is a 2.4/5GHz band AC2600 router, based on Mediatek
MT7621A.

Specifications:
- SoC: MT7621A
- RAM: DDR3 256M
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: MT7615E
  - 5GHz: MT7615E
- Ethernet: 5x 10/100/1000Mbps
  - Switch: SoC internal
- USB: 1 * USB3.0 port
- UART:
  - J4: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1
- Other info:
  - J9: Unknown unpopulated header.

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

Signed-off-by: Yong-hyu Ban <perillamint@quendi.moe>
[do not enable xhci node in DTS which is already enabled in DTSI]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Maksym Medvedev 663b1a14e5 ramips: add support for Edimax RA21S
Edimax RA21S is a dual band 11ac router,
based on MediaTek MT7621A and MT7615N chips.

Specification:
- SoC: MediaTek MT7621A dual-core @ 880MHz
- RAM: 256M (Nanya NT5CC128M16IP)
- FLASH: 16MB (Macronix MX25L12835F)
- WiFi: 2.4/5 GHz 4T4R
  - 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 case closed
- UART:  through-hole on PCB.
   J1: 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.2.1/)
User: admin
Password: 1234

The sysupgrade image can be installed via TFTP
from the U-Boot bootloader. Connect via ethernet port 2.

Tested on device by @UAb5eSMn

Signed-off-by: Maksym Medvedev <redrathnure@gmail.com>
[split DTS and take over improvements from RG21S, extend commit
message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 58e71e322b ramips: rename MTK_SOC to SOC
This replaces MTK_SOC by the newly introduced common SOC device
variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler e417ff88f1 ramips: harmonize line breaks in image Makefiles
This harmonizes the line wrapping in image Makefile device
definitions, as those are frequently copy-pasted and are a common
subject of review comments. Having the treatment unifying should
reduce the cases where adjustment is necessary afterwards.

Harmonization is achieved by consistently (read "strictly")
applying certain rules:
- Never put more than 80 characters into one line
- Fill lines up (do not break after 40 chars because of ...)
- Use one tab for indent after wrapping by "\"
- Only break after pipe "|" for IMAGE variables

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
DENG Qingfang 1b7199c90c ramips: add support for JCG JHR-AC876M
JCG JHR-AC876M is an AC2600M router

Hardware specs:
  SoC: MT7621AT
  2.4GHz: MT7615N 4x4 @ PCIe0
  5GHz: MT7615N 4x4 @ PCIe1
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  USB 2.0 and 3.0 ports
  6 LEDs, 3 of which are connected to SoC GPIO
  Reset and WPS buttons

Flash instructions:
Stock to OpenWrt:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings

OpenWrt to stock:
  Push and hold the reset button for 5s while power cycling to
  enter recovery mode;
  Visit 192.168.1.1 and upload stock firmware

MAC addresses map:
  0x0004  *:1c  wlan2g/wan/label
  0x8004  *:20  wlan5g
  0xe000  *:1b  lan
  0xe006  *:1a  not used in stock fw

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Sungbo Eo a972b1fb5f ramips: add support for ipTIME A6ns-M
ipTIME A6ns-M is a 2.4/5GHz band AC1900 router, based on MediaTek MT7621A.

Specifications:
- SoC: MT7621AT
- RAM: DDR3 128MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: MT7615
  - 5GHz: MT7615
- Ethernet: 5x 10/100/1000Mbps
  - Switch: SoC internal
- UART:
  - J4: 3.3V, TX, RX, GND (3.3V is the square pad) / 57600 8N1

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 0375c076b6 ramips: add support for ZIO FREEZIO
ZIO FREEZIO is a 2.4/5GHz band AC1200 router, based on MediaTek MT7621A.

Specifications:
- SoC: MT7621AT
- RAM: DDR3 128MB
- Flash: SPI NOR 16MB
- WiFi:
  - 2.4GHz: MT7603EN
  - 5GHz: MT7612EN
- Ethernet: 5x 10/100/1000Mbps
  - Switch: SoC internal
- USB: 1x 3.0
- UART:
  - J4: 3.3V, RX, TX, GND (3.3V is the square pad) / 57600 8N1

Notes:
- FREEZIO has almost the same board as WeVO W2914NS v2.
- Stock firmware is based on OpenWrt BB.

MAC addresses in factory partition:
0x0004: WiFi 2.4GHz (label_mac-8)
0x002e: WAN (label_mac)
0x8004: WiFi 5GHz (label_mac-4)
0xe000: LAN (label_mac+1)

Installation via web interface:
1.  Access web admin page and turn on "OpenWrt UI mode".
2.  Flash sysupgrade image through LuCI, with the "Keep settings" option
    OFF.

Revert to stock firmware:
1.  Perform sysupgrade with stock image.
    Make sure to NOT preserve settings.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rebase, use mt7621_wevo_w2914ns-v2.dtsi]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 19800ac095 ramips: set uImage name of WeVO 11AC NAS and W2914NS v2
The stock firmware and bootloader only accept uImage with names that
match certain patterns. This patch enables OpenWrt installation from
stock firmware without having to reflash the bootloader or access the
UART console.

Installation via web interface:
1.  Flash **initramfs** image through the stock web interface.
2.  Boot into OpenWrt and perform sysupgrade with sysupgrade image.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
5 years ago
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