4266 Commits

Author SHA1 Message Date
Shiji Yang
5a9cfbbc18 ramips: mt7621: disable CONFIG_PAGE_POOL_STATS
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>
2026-04-30 10:42:06 +02:00
John Audia
c252e6d3b1 kernel: bump 6.18 to 6.18.22
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.22

Removed upstreamed:
  ramips/patches-6.18/100-mips-ralink-update-CPU-clock-index.patch[1]

Manually rebased:
  pending-6.18/361-Revert-MIPS-mm-Prevent-a-TLB-shutdown-on-initial-uni.patch

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.22&id=a99f94e4f28a3c289bd397d521de1187b6320158

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22890
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-30 01:14:12 +02:00
Mieczyslaw Nalewaj
54cb211d50 ramips: remove hack and use safexcel-eip93ies
Remove legacy hack patch, switch mt7621 crypto node to the intended
Safexcel insecure EIP93 compatible string and simplify crypto module
packaging to use the inside-secure eip93 driver.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22871
Signed-off-by: Nick Hainke <vincent@systemli.org>
2026-04-28 09:44:04 +02:00
Mieczyslaw Nalewaj
47430172e7 ramips: drop 6.12 support
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>
2026-04-28 09:44:04 +02:00
Mieczyslaw Nalewaj
1bc1b98de9 ramips: use kernel 6.18 by default
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>
2026-04-28 09:44:03 +02:00
Rosen Penev
086fb1c067 ramips: wn575a3: fix eeprom size for 5ghz wifi
MT7613 uses 4da8 for eeprom size. eeprom + calibration.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22463
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-27 11:11:07 +02:00
Rosen Penev
669a7375a6 treewide: use _scoped for loop
Avoids refcount problems and slightly simplifies code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21176
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-16 21:17:43 +02:00
Hiroki Utsunomiya
44f408aa31 ramips: add support for I-O DATA WN-AX2033GR2
I-O DATA WN-AX2033GR2 is roughly the same as I-O DATA WN-AX2033GR.
The difference is the Flash Memory (Macronix MX30LF1G18AC).

Specification
=============
- SoC: MediaTek MT7621A
- RAM: DDR3 128 MiB
- Flash Memory: NAND 128 MiB (Macronix MX30LF1G18AC)
- Wi-Fi: MediaTek MT7603E
- Wi-Fi: MediaTek MT7615
- Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN)
- LED: 2x green LED
- Input: 2x tactile switch, 1x slide switch
- Power: DC 12V

Flash instruction
=================
1. Open the router management page (192.168.0.1).
2. Update router firmware using "initramfs-kernel.bin".
3. After updating, run sysupgrade with "sysupgrade.bin".

Signed-off-by: Hiroki Utsunomiya <hu-git-ja@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-13 02:14:26 +02:00
Ivan Davydov
0eadcfb7d2 ramips: mt76x8: add support for Keenetic KN-1510
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>
2026-04-13 02:07:35 +02:00
Ryan Leung
6a8f9fa54d ramips: add support for EDUP EP-RT2983
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>
2026-04-12 19:52:42 +02:00
Rosen Penev
c1fa85f659 treewide: use of_device_get_match_data
Simplifies code slightly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21599
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-12 18:18:28 +02:00
Mieczyslaw Nalewaj
3e42e349d4
treewide: strip trailing whitespace
Strip trailing whitespace in all code:
find . -type f | grep "\.c$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.h$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dts$" | xargs sed -i 's/[ \t]\+$//'
find . -type f | grep "\.dtsi$" | xargs sed -i 's/[ \t]\+$//'

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22840
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-04-08 10:05:53 +02:00
Mieczyslaw Nalewaj
ef584a3632 ramips: refresh patches
Refreshed patches by running: make target/linux/refresh

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-08 00:01:20 +02:00
Mieczyslaw Nalewaj
5213918c3d ramips: restore CONFIG_PAGE_BLOCK_MAX_ORDER=10 for 6.18
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>
2026-04-08 00:00:24 +02:00
Mieczyslaw Nalewaj
5d7aa6395e ramips: enable 6.18 testing kernel
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
10127e2201 ramips: mt7621_nand: fix MODULE_DEVICE_TABLE reference
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
f5c0225a48 ramips: mtk_eth_soc: handle frag_cache on Linux >= 6.13
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
eac2a6c404 ramips: 6.18: refresh patches
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
6b1da2b9b3 ramips: 6.18: update 802-GPIO-MIPS-ralink patch
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
b57038804a ramips: 6.18: update 831-03-mmc-mtk-sd patch
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
69a4371020 ramips: 6.18: manually rebuild patches
Manually rebuild patches:
 - 102-01-pwm-mediatek-set-mt7628-pwm45_fixup-flag-to-false.patch
 - 102-02-pwm-mediatek-correct-mt7628-clock-source-setting.patch
 - 312-MIPS-ralink-add-cpu-frequency-scaling.patch
 - 810-uvc-add-iPassion-iP2970-support.patch
 - 821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
 - 831-01-mmc-mtk-sd-add-tuning-parameters-for-legacy-MIPS-MT7.patch
 - 831-02-mmc-mtk-sd-disable-auto-CMD23-support-for-mt7620.patch
 - 835-asoc-add-mt7620-support.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
7429b5a8d6 ramips: 6.18: remove obsolete patches
Remove obsolete patches already included in kernel 6.18.
 - 001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch[1]
 - 002-03-v6.13-clk-ralink-mtmips-add-mmc-related-clocks-for-SoCs-MT.patch[2]
 - 003-v6.13-mmc-mtk-sd-Implement-Host-Software-Queue-for-eMMC.patch[3]
 - 004-v6.15-dt-bindings-clock-add-clock-definitions-for-Ralink-S.patch[4]
 - 860-ramips-add-eip93-driver.patch[5]
 - 900-pci-rt2880-static-pcibios_init.patch[6]
 - 931-mips-ralink-add-missing-include.patch[7]

[1] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=cd5375610baadd3a0842a9e83ca502684f938be8
[2] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=198675bbc03d437fb80a35d781ad13d622d0ff68
[3] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=7e9ddd7d45897b15a64c4a3c88f2f7909bf49749
[4] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=adb2424d0d05506c2f36fcba66101d34f7409e45
[5] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=9739f5f93b7806a684713ba42e6ed2d1df7c8100
[6] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=de94259d064814b7eacd6d1f4b26e934eed02590
[7] https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=f13e645e15f1a4a33f0709844dac1a962b335b16

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
628f46ccb1 ramips: 6.18: update kernel symbols
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>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
951d884ebf kernel/ramips: restore files for v6.12
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/21418
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-04-06 11:26:27 +02:00
Mieczyslaw Nalewaj
a98d68dc70 kernel/ramips: create files for v6.18 (from v6.12)
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>
2026-04-06 11:26:27 +02:00
Shiji Yang
c3109a565c kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic
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>
2026-04-06 01:38:41 +02:00
William Latter
9e8f96dc79 ramips: add support for wavlink halo base pro
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>
2026-04-06 01:30:37 +02:00
Shiji Yang
109844e32f ramips: dts: mt7621: use "mediatek,mtk-xhci" compatible
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>
2026-04-06 01:05:51 +02:00
Shiji Yang
fcbaaddf08 ramips: dts: mt7621: add USB t-phy node
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>
2026-04-06 01:05:51 +02:00
Shiji Yang
45c818ff10 ramips: mt7621: build MediaTek T-PHY driver
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>
2026-04-06 01:05:51 +02:00
Rany Hany
3166710fc9 ramips: mt7621: fix reset hang and re-enable LIST_HARDENED
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>
2026-04-05 23:26:44 +02:00
xingchi
d9eb01ad67 ramips: add support for Z-ROUTER ZR-2662
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>
2026-04-04 01:23:20 +02:00
Shiji Yang
dc597eeb79 ramips: dts: add 'broken-cd' for VoCore2 MMC
This model doesn't have cd pin on its MicroSD card slot.

Fixes: https://github.com/openwrt/openwrt/issues/20288
Fixes: https://github.com/openwrt/openwrt/issues/22603
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21568
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-04-03 22:59:22 +02:00
Fil Dunsky
b4a5e57bde ramips: mt76x8: add support for Cudy LT300 v3
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>
2026-04-03 22:28:47 +02:00
Shiji Yang
2d9f174881 ramips: dts: fix uart node names
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>
2026-04-03 18:50:57 +02:00
Shiji Yang
6767f535be ramips: dts: mt7621: add missing pinctrl for uart0
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>
2026-04-03 18:50:57 +02:00
Rosen Penev
e1c2f02325 treewide: dts: reg: use new syntax for arrays
<>, <> 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>
2026-04-03 11:11:35 +02:00
Shiji Yang
74fe4b014c ramips: fix WAN LED GPIO for Xiaomi Mi Router 4C
Correct WAN LED GPIO and its pinctrl group.

Fixes: https://github.com/openwrt/openwrt/issues/18578
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22696
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-31 15:45:30 +02:00
Paweł Owoc
598b90107e treewide: linksys: remove unnecessary properties
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>
2026-03-30 19:35:41 +02:00
Rany Hany
a2fa1db797 ramips: mt7621: disable CONFIG_LIST_HARDENED
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>
2026-03-29 18:50:57 +02:00
Florian Maurer
b1713d623b ramips-mt7621: fix xiaomi mi ac2100 mac address
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>
2026-03-24 22:19:11 +01:00
Shiji Yang
339e8fa25b ramips: dts: adjust mt7621 peripherals address range
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>
2026-03-23 02:17:57 +01:00
Shiji Yang
015e8820b5 ramips: fix kernel decompress error for ELECOM WRC-X1800GS
The bootloader reads the compressed kernel to 0x82000000. We need
to decompress kernel to a different address far from 0x82000000 to
avoid memory overlap.

Fixes: https://github.com/openwrt/openwrt/issues/22270
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22520
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-23 01:37:43 +01:00
Shiji Yang
e5d8f5fd69 ramips: fix initramfs kernel loadaddr for EAP615-Wall v1
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>
2026-03-23 01:31:59 +01:00
John Audia
d0784a69dd kernel: bump 6.12 to 6.12.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.75

Removed upstream:
  bcm27xx/patches-6.12/950-0225-media-i2c-ov5647-Correct-pixel-array-offset.patch[1]
  bcm27xx/patches-6.12/950-0226-media-i2c-ov5647-Correct-minimum-VBLANK-value.patch[2]
  bcm27xx/patches-6.12/950-0248-media-i2c-ov5647-Sensor-should-report-RAW-color-spac.patch[3]
  qualcommax/patches-6.12/0074-v6.20-clk-qcom-gcc-ipq5018-flag-sleep-clock-as-critical.patch[4]

Manually rebased:
  bcm27xx/patches-6.12/950-0262-mfd-simple-mfd-i2c-Add-configuration-for-RPi-POE-HAT.patch
  bcm27xx/patches-6.12/950-0071-drivers-mfd-sensehat-Add-Raspberry-Pi-Sense-HAT-to-s.patch
  bcm27xx/patches-6.12/950-0516-media-i2c-ov5647-Add-V4L2_CID_LINK_FREQUENCY-control.patch
  lantiq/patches-6.12/101-find_active_root.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=58f1767ad5c9eda3dd0befddc1843259d46d64fa
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=ff65571ffae52b65577121e7696bf22156e1928a
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=fbf2a108ed5eb1c896d3f354bd05314c2e22e78f
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=b109dd4970a0fc89d54b1198b163f86125dd2977

Build system: x86/64
Build-tested: flogic/glinet_gl-mt6000
Run-tested: flogic/glinet_gl-mt6000

Co-authored-by: Shiji Yang <yangshiji66@outlook.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22276
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-22 12:00:31 +01:00
Shiji Yang
b9299ae0e7
ramips: kernel: drop ip_fast_csum() dead loop fix
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>
2026-03-20 21:55:20 +01:00
Shiji Yang
7ba45de827 ramips: mt76x8: disable ICPlus PHY driver
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>
2026-03-20 13:21:46 +01:00
Rosen Penev
06125fc10d ramips: cpe200: fix eeprom size
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>
2026-03-19 10:46:49 +01:00
Rosen Penev
de08715d7f ramips: dir-3040-a1: fix MAC address assignment
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>
2026-03-18 12:18:27 +01:00
Esat Yiğithan GÖKTOPRAK
d97381aff3 ramips: fix for Keenetic KN-1910
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>
2026-03-17 02:02:20 +01:00