Commit 15887235c1e3 ("generic: mtk_eth_soc: reduce driver memory usage")
allows building mediatek ethernet driver without CONFIG_PAGE_POOL_STATS.
This can slightly improve throughput on legacy MIPS based MT7621 SoC.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23142
Signed-off-by: Robert Marko <robimarko@gmail.com>
Drop patches and configs for Linux 6.12.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22871
Signed-off-by: Nick Hainke <vincent@systemli.org>
Switch to Linux kernel version 6.18.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22871
Signed-off-by: Nick Hainke <vincent@systemli.org>
Specification:
* CPU: MediaTek MT7628AN (580 MHz)
* Flash: GigaDevice GD25Q128CSIG (16 MiB)
* RAM: Winbond W9751G6KB-25 (64 MiB)
WikiDevi page: <https://wikidevi.wi-cat.ru/Keenetic_City_(KN-1510)>
How to flash:
* Configure TFTP server with IP address 192.168.1.2/24
* Serve OpenWrt factory image as "KN-1510_recovery.bin"
* Connect the PC to router's LAN port, hold the reset button and power
the router up. When the power LED starts blinking release the
button.
The same instructions apply to OEM firmware, except one can take it
from osvault.keenetic.net
Signed-off-by: Ivan Davydov <lotigara@lotigara.ru>
Link: https://github.com/openwrt/openwrt/pull/22404
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
EDUP EP-RT2983 comes with a factory installed version of OpenWrt 23.05
with device name "netis,n6".
Specification
--------------
- SoC : MediaTek MT7621AT, MIPS, 880 MHz
- RAM : 256 MiB
- Flash : NAND 128 MiB (Toshiba)
- WLAN : MT7905DAN + MT7975DN
- 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
- 5 GHz : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- UART : 3.3V, 115200n8
- Buttons : 1x Reset
1x WPS
- LEDs : 1x Power (green)
1x WiFi (green)
1x Mesh/WPS (green); flashing green during boot
3x LAN (green)
1x WAN (green); flashing red during upgrade and failsafe
- Power : 12 VDC 1A
Installation
-------------
1. Log in to LuCI
2. Go to System, Backup / Flash Firmware
3. If desired, backup the current system by saving (all) the mtdblock
contents.
4. Flash new firmware image, select Flash image.
5. Browse and select the sysupgrade file
"openwrt-*-ramips-mt7621-edup_ep-rt2983-squashfs-sysupgrade.bin"
and then Upload.
6. Unselect "Keep settings and retain the current configuration"
Note: All settings will be reset to default. WiFi is not enabled by
default so a connection via Ethernet is necessary to log in and set up.
7. Allow "Force upgrade" (tick the box if there is one), or press Continue
if there is no box to tick. This is because the name is now
"edup,ep-rt2983" as it should have been from the start.
8. Proceed to flash. Wait for reboot and keep power connected.
9. After reboot, default address to access LuCI is 192.168.1.1 with
no password
Recovery (UART)
----------------
1. Remove the 4 screws on the bottom and pry open the cover.
2. Connect serial adapter to the unpopulated serial header pins
TX, RX, GND near the WPS button. Do not connect VCC.
3. Start serial terminal (e.g. minicom, screen, etc) on the computer and
turn on the router.
4. As prompted, hit any key to stop autoboot.
5. Enter 2 to select "2. Upgrade firmware"
6. Enter 0 to select "0 - TFTP client (Default)"
7. Accept the defaults by pressing Enter for
"Input U-Boot's IP address: 192.168.1.1",
"TFTP server's IP address: 192.168.1.2",
"Input IP netmask: 255.255.255.0"
8. Assign your PC's Ethernet port a static IP 192.168.1.2 with netmask
255.255.255.0 and connect to a LAN port on the router using the
Ethernet cable. Disconnect all other network connections (e.g. WiFi) on
the computer.
9. Serve the factory image
"openwrt-*-ramips-mt7621-edup_ep-rt2983-squashfs-factory.bin" using
a TFTP server, e.g. tftpd64. For convenience, the filename can be renamed
to something shorter.
10. In the serial terminal, when prompted "Input file name:", enter the
filename from the previous step and press Enter.
11. The factory image will be flashed as indicated. Wait for reboot.
MAC addresses prototype
------------------------
+---------+---------------------+
| | MAC example |
+---------+---------------------+
| LAN | CC:D8:1F:47:xx:yy |
| WAN | CC:D8:1F:47:xx:yy+1 |
| WLAN 2G | CC:D8:1F:17:xx:yy+2 |
| WLAN 5G | CC:D8:1F:77:xx:yy+2 |
+---------+---------------------+
Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/22197
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Restore CONFIG_PAGE_BLOCK_MAX_ORDER=10 in ramips 6.18 config fragments
to fix build failures where PAGE_BLOCK_MAX_ORDER was undefined.
Support for Linux 6.18 on ramips was added after this OpenWrt change:
ac0cb87a45.
Before that integration, the kernel option CONFIG_PAGE_BLOCK_MAX_ORDER=10
was provided in target/linux/generic/config-6.18 and applied broadly.
After the ramips 6.18 integration the generic fragment no longer supplied
this option for ramips targets, which caused some backported code paths
and drivers to assume PAGE_BLOCK_MAX_ORDER was defined and led
to compilation failures.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22831
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The ramips now supports 6.18 kernel as testing.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
The MODULE_DEVICE_TABLE macro was using an incorrect parameter 'match'
instead of the actual device table name 'mt7621_nfc_id_table'.
This fixes the reference to use the correct symbol name, ensuring
proper device table registration for module autoloading.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
Fix fe_clean_rx to handle the changed frag_cache layout on newer kernels.
For kernels >= 6.13 the fragment cache needs to be converted from its
encoded_page value instead of using the old va field. Add an ifdef
to use frag_cache.encoded_page & PAGE_MASK and virt_to_page for those
kernels, keep the old path for older kernels.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
Refreshed patches for ramips/patches-6.18 by running
make target/linux/refresh
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
Replace previous bgpio_init usage with a full gpio_chip registration so the driver
integrates cleanly with the kernel GPIO core.
Add drivers/gpio/gpio-ralink.c implementing a gpio_chip with:
- get/set, direction_input/direction_output, get_direction
- get_multiple/set_multiple to support efficient multi-bit ops
- DT handling for determining ngpios (reads "ngpios" or falls back to gpio-ranges)
- MAX_NGPIOS cap and safe defaults
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
Update patch 831-03-mmc-mtk-sd-use-default-PATCH_BIT1-2-values-for-mt762.patch
to a newer version compatible with kernel 6.18.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
Remove symbols no longer present in version 6.18,
add new 6.18 kernel symbols.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
This is an automatically generated commit.
When doing `git bisect`, consider `git bisect --skip`.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
This symbol is selected by CONFIG_BPF, which was already enabled
on generic config-6.12.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22730
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This adds support for the Wavlink "Halo Base Pro".
SOC: MT7621DAT
RAM: 128MiB
Flash: 16MiB NOR
WiFi: MT7603EN + MT7613BEN
Buttons:
- The touch sensor was originally for WPS, but this has been moved to the
pair button which is no longer used to prevent accidental touches
LEDs:
- On original firmware, the status LEDs light up as follows:
- Purple = booting, Blue = working, Red = error
Partitions:
- factory contains unique WiFi EEPROM and default MAC addresses
- vendor partition has an unknown purpose
Stock MAC address allocation:
- LAN1: xx:xx:xx:xx:xx:80
- LAN2/WAN: xx:xx:xx:xx:xx:81
- WiFi 2.4G: xx:xx:xx:xx:xx:82
- WiFi 5G: xx:xx:xx:xx:xx:83
LAN Ports:
- lan1 is the normal white LAN port
- lan2 is labelled "LAN/Backhaul", which can either be LAN or WAN.
- Since this device is intended to be part of a mesh, this will usually
be a LAN port, hence why it's assigned to lan2 here
Notes:
- I've chosen "Halo Base Pro" as the device model, despite the website URL
showing WL-WN535M3, as the label only states "Halo Base Pro".
- Only the 5GHz WiFi address is labelled on the device
Signed-off-by: William Latter <williamlatter77@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22400
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Compared to the "mediatek,mt8173-xhci", this is a more generic and
reasonable compatible string. On the driver side, they are identical.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22094
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The USB t-phy driver includes some magic register init values. This
should be beneficial for the USB stability and performance.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22094
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
MT7621 USB phys are compatible with the MediaTek T-PHY controller.
The vendor SDK also enabled this driver for MT7621.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22094
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This reverts commit a2fa1db79726dab47d994df530bc8f02d14de68b.
These patches stop secondary CPUs before restart and wait for them
to go offline, fixing the mt7621 reboot deadlock without needing to
disable CONFIG_LIST_HARDENED.
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/22724
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit adds support for Z-ROUTER ZR-2662 (also known as Routerich
AX1800 V2) wireless WiFi 6 router.
Hardware specification
---------------------
- SoC : MediaTek MT7621AT, MIPS, 880 MHz
- RAM : 256 MiB
- Flash : NAND 128 MiB (AMD/Spansion S34ML01G2)
- WLAN :
- 2.4 GHz : MediaTek MT7905D/MT7975 (14c3:7916), b/g/n/ax, MIMO 2x2
- 5 GHz : MediaTek MT7915E (14c3:7915), a/n/ac/ax, MIMO 2x2
- Ethernet : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- USB : 1x 2.0
- UART : 3.3V, 115200n8, pins are silkscreened on the pcb
- Buttons : 1x Reset
- LEDs : 1x WiFi 2.4 GHz (green)
1x WiFi 5 GHz (green)
1x LAN (green)
1x WAN (green)
1x WAN no-internet (red)
- Power : 12 VDC, 1 A
Installation
------------
1. Run tftp server on your PC (IP: 192.168.2.2) and put OpenWrt initramfs
image (initramfs.bin) to the tftp root dir
2. Open the following link in the browser to enable telnet:
http://192.168.2.1/cgi-bin/telnet_ssh
3. Connect to the router (default IP: 192.168.2.1) using telnet shell
(credentials - user:admin)
4. Run the following commands in the telnet shell (this will install
OpenWrt initramfs image on nand flash):
cd /tmp
tftp -g -r initramfs.bin 192.168.2.2
mtd write initramfs.bin firmware
mtd erase firmware_backup
reboot
5. Copy OpenWrt sysupgrade image (sysupgrade.bin) to the /tmp dir of the
router
6. Connect to the router (IP: 192.168.1.1) using ssh shell and run
sysupgrade command:
sysupgrade -n /tmp/sysupgrade.bin
Return to stock
---------------
1. Copy stock firmware (stock.bin) to the /tmp dir of the router using scp
2. Run following command in the router shell:
cd /tmp
mtd write stock.bin firmware
reboot
Recovery
--------
Connect uart (pins are silkscreened on the pcb), interrupt boot process by
pressing any key, use u-boot menu to flash stock firmware image or OpenWrt
initramfs image.
MAC addresses
-------------
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| LAN | 24:0f:5e:xx:xx:4c | label |
| WAN | 24:0f:5e:xx:xx:4d | label+1 |
| WLAN 2g | 24:0f:5e:xx:xx:4e | label+2 |
| WLAN 5g | 24:0f:5e:xx:xx:4f | label+3 |
+---------+-------------------+-----------+
The WLAN 2.4 MAC was found in 'factory', 0x4
The LAN MAC was found in 'factory', 0xfff4
The WAN MAC was found in 'factory', 0xfffa
Note: This device is similar to Z-ROUTER ZR-2660, but with minor hardware
revisions. The firmware and configuration are compatible.
Signed-off-by: xingchi <juncaixingchi2026@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21524
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hardware:
- SoC: MediaTek MT7628AN (MIPS 580MHz)
- Flash: 16 MiB NOR
- RAM: 64 MiB DDR2
- WLAN: 2.4 GHz (MT7628)
- Ethernet: 1x 10/100 Mbps WAN/LAN, 1x 10/100 LAN (MT7628)
- Build-in LTE Modem: MeigLink SLM770A
4G Cat. 4 (150/50 Mbps)
- Buttons: 1x Reset, 1x wps
- LEDs: Front: 1x Red, 1x White,
Back: 3x White 4G signal strengh
- Serial console: unpopulated header, 115200 8n1
- Power: USB-C
MAC addresses:
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | 80:af:ca:xx:xx:x1 | label+1 |
| LAN | 80:af:ca:xx:xx:x0 | label |
| WLAN 2g | 80:af:ca:xx:xx:x2 | label+2 |
+---------+-------------------+-----------+
Migration to OpenWrt:
- Download the RSA signed intermediate firmware from the Cudy website:
`openwrt-ramips-mt76x8-cudy_lt300-v3-squashfs-flash.bin`
- Connect computer to LAN and flash the intermediate firmware via OEM web interface
- OpenWrt is now accessible via 192.168.1.1
Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the WAN port (upper port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again
General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21982
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The dt-bindings suggest using "^serial(@.*)?$" as the node name.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22738
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is necessary to make it work properly.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22738
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
<>, <> is the preferred way to specify multiple entries.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22736
Signed-off-by: Robert Marko <robimarko@gmail.com>
Remove unnecessary properties as there is no
reg property in child node.
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22592
Signed-off-by: Robert Marko <robimarko@gmail.com>
It appears that CONFIG_LIST_HARDENED causes the system to
hang when restarted. I was unable to determine the cause
of the crash so disabling CONFIG_LIST_HARDENED seems like
an acceptable workaround for the time being.
The issue only occurs on reboot.
Fixes: https://github.com/openwrt/openwrt/issues/20099
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/22672
Signed-off-by: Robert Marko <robimarko@gmail.com>
The Xiaomi Redmi/Mi Router AC2100 does have the correct label mac on the WAN interface.
This MAC is available as gmac1.
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/22567
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Adjust the memory remap range according to the mt7621 programming
guide to ensure that the driver can correctly access the peripheral
registers.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22467
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The kernel load address was changed in commit e2d823d06830 ("ramips:
fix LZMA decompression error for TP-Link EAP615-Wall"). We also need
to relocate the load address for initramfs image so that it can be
booted correctly.
Fixes: e2d823d06830 ("ramips: fix LZMA decompression error for TP-Link EAP615-Wall")
Fixes: https://github.com/openwrt/openwrt/issues/22505
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22562
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The issue described in the patch has been fixed by commit
604355e8c4d1 ("kernel: fix fraglist GRO on linux 6.12")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22525
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
The initial mt76x8 kernel config file was inherited from mt7620
sub-target. However, This SoC series doesn't support any external
PHY. We can disable CONFIG_ICPLUS_PHY symbol to reduce kernel size.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22519
Signed-off-by: Robert Marko <robimarko@gmail.com>
A size of 600 is incomplete in that calibration data is not included,
resulting in low TX power.
Fixes: 64dae105 ("ramips: mt76x8: add support for Yuncore CPE200")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22459
Signed-off-by: Robert Marko <robimarko@gmail.com>
The dtsi used handles a bunch of non-DBDC platforms where the
assignments are correct. The 3040-a1 is different as there are 3 instead
of 2 wifi interfaces and WAN needs to be incremented by 1.
Remove userspace wifi assignmwent which was needed before per band nvmem
was supported.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21977
Signed-off-by: Robert Marko <robimarko@gmail.com>
Set nand flash for KN-1910
Sysupgrade or any other method i tried (asu, owut) not working without it. Tested with a local build.
Signed-off-by: Esat Yiğithan GÖKTOPRAK <eygoktoprak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22311
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>