Commit Graph

33140 Commits

Author SHA1 Message Date
Rosen Penev
4ffd5aa239 treewide: fix coccinelle checks
Unneeded semicolon

WARNING comparing pointer to 0

WARNING: NULL check before some freeing functions is not needed.

WARNING: casting value returned by memory allocation function to (u32 *)

ERROR: allocation function on line 378 returns NULL not ERR_PTR on failure

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19932
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-02 23:32:42 +01:00
Rosen Penev
55b5e44673 ath79: ews511ap: use nvmem
Userspace handling is deprecated.

This is a weird one. It should be using u-boot,env, but the variable
name is unknown. Keep it as is.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20520
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-02 23:02:46 +01:00
gongzi miao
d0fcbddaad kernel: bump 6.12 to 6.12.60
changelog:
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.60

Signed-off-by: gongzi miao <miaogongzi0227@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21010
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-02 22:51:19 +01:00
Sven Eckelmann
141ac0b2bd realtek: dsa: rtl930x: Fix flow control with ingress shaping
Tests with ingress shaping and enabled flow control showed really high
packet loss. It seems like the MAC pause frames are not created correctly
when both burst high off is set to the same value as burst high on.

By default, RTL930x has set the burst high values to:

* on: 64K
* off: 32K

Using the same 1:2 ratio seems to solve the high packet loss rate during
UDP tests.

Fixes: 2e74eb6d93 ("realtek: dsa: rtl93xx: Support per port throttling")
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21011
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-02 10:42:24 +01:00
Robert Marko
5bdf1b8d9c qualcommax: fix CPR of_property_present conversion
CPR conversion to of_property_present is broken in multiple places, either
by leaving the comma after now the last argument or by attempting to replace
an instance that actually uses the returned length.

So, lets fix these in order for qualcommax to compile again.

Fixes: c9e7f32c4c ("treewide: use of_property_present")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-01 15:05:56 +01:00
Eric Schäfer
401c0a03f1 qualcommax: ipq807x: add support for Zyxel NWA210AX
The Zyxel NWA210AX is a wall- and ceiling-mountable access point (AP).

Hardware specifications:
- SoC: Qualcomm IPQ8071A
- RAM: 1 GB (Samsung K4A8G165WC-BCTD)
- Flash: 8 MB (Winbond W25Q64DW), 256 MB (Winbond W29N02GZ)
- Ethernet: 1x 2.5 Gbps RJ45 port (QCA8081), 1x 1 Gbps RJ45 port (AR8033)
- WiFi: 2.4 GHz 802.11ax/b/g/n (QCN5024), 5 GHz 802.11 ac/ax/n (QCN5054)
- Power: DC 12V/PoE 802.3at
- Button: Reset
- LEDs: Multicolour red/green/blue/white via LP5562

Installation/flashing instructions:
1. In OEM web interface navigate to gear icon → System → SSH and enable SSH.
2. Log in via SSH (username/password are the same as for the web interface).
3. Run "debug dual-image show".
4. Verify that output is "Current Image num: 1".
5. If this is not the case (i.e. if the output is "Current Image num: 0"):
   a. Either flash a fresh version of factory firmware, or
   b. run "debug dual-image set boot-image image1" and then run "reboot".
6. Log in via SSH again and verify that output is "Current Image num: 1".
7. Rename "openwrt-qualcommax-ipq807x-zyxel_nwa210ax-squashfs-factory.bin" to
   "openwrt.bin" to avoid upload errors in the OEM web interface.
8. Reopen OEM web interface, navigate to wrench icon → File Manager →
   Firmware Package and upload the bin file. Once the upgrade process is
   finished and OpenWrt has booted, the LED will light up green.

Switching between OpenWrt and OEM firmware:
- OpenWrt → Zyxel via ssh command "zyxel-bootconfig-ipq807x set image1".
- Zyxel → OpenWrt via ssh command "debug dual-image set boot-image image0".

This commit is based on the work of Pascal Beleiu  <pascal@beleiu.de>:
93ca21f3 (qualcommax: ipq807x: add support for Zyxel NWA210AX, 2025-03-17)

Signed-off-by: Eric Schäfer <eric@es86.de>
Link: https://github.com/openwrt/openwrt/pull/19828
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-01 14:30:27 +01:00
Rosen Penev
bda163eb7c ath79: add back mistakenly removed label
Fixes target builds.

Fixes: 592d4e6 ("ath79: mr600-v1: use led-sources for ath9k")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21008
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 11:56:18 +01:00
Álvaro Fernández Rojas
d7f777b41c generic: 6.12: backport bcm63xx-spi CS deassertion fix
Backport fix for premature SPI CS deassertion on RX-only transactions from
linux v6.18, which is needed for bmips (bcm63xx).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-01 09:12:36 +01:00
Shiji Yang
9f5cb25867 ipq40xx: dts: remove useless ethernet0 alias for WIA3300-20
The MAC addresses of this device are not assigned by the bootloader.
Therefore, this alias is useless.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20478
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:46:33 +01:00
Shiji Yang
7bbbe77504 ipq40xx: dts: convert WIA3300-20 SPI chipselect to hardware mode
On ipq40xx platform, some specific GPIO can be configured as hardware
controlled SPI CS pin. This commit is an example of how to convert the
chipselect pin to the hardware CS mode.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20478
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:46:33 +01:00
Tomáš Macholda
ea6ee93060 mvebu: add support for Turris MOX
Adds support for Turris MOX, a modular router extendable by board modules (MOX B-G).

You can explore the idea behind the modules at: https://mox-configurator.turris.cz/

More information about Turris MOX can be found here: https://docs.turris.cz/hw/mox/intro/

Also works with Turris Shield (Turris MOX A and C with a simplified OS UI).

Specifications:
-----------------------

MOX A
- SoC: Marvell Armada 3720
- RAM: 512/1024 MB, DDR3
- Memory:
    - 8 MB SPI NOR Flash for U-Boot and rescue system
    - SD card slot
- 1x RJ-45, 1Gbps
- 1x USB 3.0
- 1x activity LED
- 1x reset button
- SDIO header
- misc pin header (UART, GPIO, JTAG, ...)

MOX B, G
- 1x mPCIe slot
- 1x SIM slot

MOX C
- 4x RJ-45, 1Gbps

MOX D
- SFP, 2.5Gbps

MOX E
- 8x RJ-45, 1Gbps

MOX F
- 4x USB 3.0

Module support:
-----------------------

Additional packages are needed for some modules.

MOX A (core)
- works as is

MOX B, G (mPCIe, mPCIe passthrough)
- works as is

MOX C, E (4x, 8x RJ-45)
- kmod-dsa
- kmod-dsa-mv88e6xxx

MOX D (SFP)
- kmod-sfp
- kmod-phy-marvell-10g

MOX F (4x USB 3.0)
- works as is

Wi-Fi 5, 3x3 card (WLE900VX)
- kmod-ath10k
- ath10k-board-qca988x
- ath10k-firmware-qca988x

Wi-Fi 6, DBDC, 2x2 card (MT7915DAN)
- kmod-mt7915e
- kmod-mt7915-firmware

Interface naming:
-----------------------

- MOX A's RJ-45 is assigned to `eth0`.
- MOX C, E (4x, 8x RJ-45) are assigned to `lan<number>@eth1`
- If MOX D (SFP) is connected directly to MOX A, the resulting interface
  is `eth1`. If it's connected through MOX E (8x RJ-45), the resulting
  interface is `sfp@eth1`.

Quirks:
-----------------------

- MOX is sensitive to the order of connected modules. Verify that the
  confguration is valid at: https://mox-configurator.turris.cz/
- `CONFIG_MOXTET` and `CONFIG_GPIO_MOXTET` need to be enabled in kernel
  config. Moxtet is a bus protocol needed to discover and configure MOX
  modules. It must be compiled into the kernel for the modules to work.
  Though it's very small so it won't bloat up the kernel image.

Flashing instructions:
-----------------------

1. Download `openwrt-*-ext4-sdcard.img.gz` and `gunzip` it.
2. Insert an SD card and flash the image to it using dd:
   dd if=openwrt-*-ext4-sdcard.img.gz of=/dev/mmcblk0 bs=4096 conv=fsync
3. Plug the SD card into MOX.

Troubleshooting:
-----------------------

- https://docs.turris.cz/hw/serial/#turris-mox
- https://docs.turris.cz/hw/mox/rescue-modes/

Signed-off-by: Tomáš Macholda <tomas.macholda@nic.cz>
Link: https://github.com/openwrt/openwrt/pull/20356
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:32:14 +01:00
INAGAKI Hiroshi
5baaee843a ath79: add support for NEC Aterm WF1200HP2
NEC Aterm WF1200HP2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router with FE
ports, based on AR9344.

Specification:

- SoC              : Atheros AR9344
- RAM              : DDR2 128 MiB (2x ESMT M14D5121632A-2.5BG2A)
- Flash            : SPI-NOR 8 MiB (Macronix MX25L6406EM2I-12G)
- WLAN             : 2.4/5 GHz 2T2R
  - 2.4 GHz        : Atheros AR9344 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9882
- Ethernet         : 4x 10/100 Mbps
  - switch         : Atheros AR9344 (SoC)
- LEDs/Keys (GPIO) : 12x/4x
  - note           : all LEDs are controlled by ath10k chip (QCA9882)
- UART             : through-hole on PCB (J1)
  - assignment     : 3.3V, GND, NC, TX, RX from tri-angle marking
  - settings       : 9600n8 (U-Boot: 115200n8)
- Power            : 12 VDC, 0.7 A (Max. 8 W)
- Stock OS         : NetBSD based

Flash instruction using initramfs-factory.bin image (StockFW WebUI):

1. Boot WF1200HP2 with router mode
2. Access to the WebUI ("http://aterm.me/" or "http://192.168.10.1/") on
   the device and open firmware update page ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory.bin image and click update
   ("更新") button
4. After updating, the device will be rebooted and booted with OpenWrt
   initramfs image
5. On the initramfs image, upload (or download) uboot.bin and
   sysupgrade.bin image to the device
6. Replace the bootloader with uboot.bin image

   mtd write <uboot.bin image> bootloader

7. Perform sysupgrade with sysupgrade.bin image

   sysupgrade <sysuppgrade image>

8. Wait ~120 seconds to complete flashing and rebooting

Flash instruction using initramfs-factory.bin image (bootloader CLI):

 1. Connect and open serial console
 2. Power on WF1200HP2 and interrupt bootloader by ESC key
 3. Login to the bootloader CLI with the password "chiron"
 4. Start TFTP server by "tftpd" command
 5. Upload initramfs-factory.bin via tftp from your computer

    example (Windows): tftp -i 192.168.0.1 PUT initramfs-factory.bin

 6. Boot initramfs image by "boot" command
 7. On the initramfs image, backup the stock bootloader and firmware if
    needed
 8. Upload (or download) uboot.bin and sysupgrade.bin image to the
    device
 9. Replace the bootloader with uboot.bin image (see above)
10. Perform sysupgrade with sysupgrade.bin image (see above)
11. Wait ~120 seconds to complete flashing and rebooting

Notes:

- The stock bootloader requires the unknown filesystem on firmware area
  in the flash chip. Booting OpenWrt from that filesystem cannot be
  handled, so the bootloader needs to be replaced to mainline U-Boot
  before OpenWrt installation.

Known issues:

- All LEDs on the front side are connected to the GPIO controller on the
  ath10k chip (QCA9882) and controlled by it. The current ath10k driver
  supports only one LED as "ath10k-phyN", but using as a GPIO controller
  is not supported yet. As a result, all 12x LEDs on the front side
  cannot be controlled by users.

MAC Addresses:

LAN    : C0:25:A2:xx:xx:44 (config,  0x6 (hex))
WAN    : C0:25:A2:xx:xx:45 (config,  0xc (hex))
2.4 GHz: C0:25:A2:xx:xx:46 (config,  0x0 (hex))
5 GHz  : C0:25:A2:xx:xx:47 (config, 0x12 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:17:48 +01:00
INAGAKI Hiroshi
29014b54d4 ath79: add support for NEC Aterm WF1200HP
NEC Aterm WF1200HP is a 2.4/5 GHz band 11ac (Wi-Fi 5) router with FE
ports, based on AR9344.

Specification:

- SoC              : Atheros AR9344
- RAM              : DDR2 128 MiB (2x ESMT M14D5121632A-2.5BG2A)
- Flash            : SPI-NOR 8 MiB (Macronix MX25L6406EM2I-12G)
- WLAN             : 2.4/5 GHz 2T2R
  - 2.4 GHz        : Atheros AR9344 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9882
- Ethernet         : 4x 10/100 Mbps
  - switch         : Atheros AR9344 (SoC)
- LEDs/Keys (GPIO) : 12x/4x
  - note           : all LEDs are controlled by ath10k chip (QCA9882)
- UART             : through-hole on PCB (J1)
  - assignment     : 3.3V, GND, NC, TX, RX from tri-angle marking
  - settings       : 9600n8 (U-Boot: 115200n8)
- Power            : 12 VDC, 0.7 A (Max. 8 W)
- Stock OS         : NetBSD based

Flash instruction using initramfs-factory.bin image (StockFW WebUI):

1. Boot WF1200HP with router mode
2. Access to the WebUI ("http://aterm.me/" or "http://192.168.10.1/") on
   the device and open firmware update page ("ファームウェア更新")
3. Select the OpenWrt initramfs-factory.bin image and click update
   ("更新") button
4. After updating, the device will be rebooted and booted with OpenWrt
   initramfs image
5. On the initramfs image, upload (or download) uboot.bin and
   sysupgrade.bin image to the device
6. Replace the bootloader with uboot.bin image

   mtd write <uboot.bin image> bootloader

7. Perform sysupgrade with sysupgrade.bin image

   sysupgrade <sysuppgrade image>

8. Wait ~120 seconds to complete flashing and rebooting

Flash instruction using initramfs-factory.bin image (bootloader CLI):

 1. Connect and open serial console
 2. Power on WF1200HP and interrupt bootloader by ESC key
 3. Login to the bootloader CLI with the password "chiron"
 4. Start TFTP server by "tftpd" command
 5. Upload initramfs-factory.bin via tftp from your computer

    example (Windows): tftp -i 192.168.0.1 PUT initramfs-factory.bin

 6. Boot initramfs image by "boot" command
 7. On the initramfs image, backup the stock bootloader and firmware if
    needed
 8. Upload (or download) uboot.bin and sysupgrade.bin image to the
    device
 9. Replace the bootloader with uboot.bin image (see above)
10. Perform sysupgrade with sysupgrade.bin image (see above)
11. Wait ~120 seconds to complete flashing and rebooting

Notes:

- The stock bootloader requires the unknown filesystem on firmware area
  in the flash chip. Booting OpenWrt from that filesystem cannot be
  handled, so the bootloader needs to be replaced to mainline U-Boot
  before OpenWrt installation.

Known issues:

- All LEDs on the front side are connected to the GPIO controller on the
  ath10k chip (QCA9882) and controlled by it. The current ath10k driver
  supports only one LED as "ath10k-phyN", but using as a GPIO controller
  is not supported yet. As a result, all 12x LEDs on the front side
  cannot be controlled by users.

MAC Addresses:

LAN    : C0:25:A2:xx:xx:44 (config,  0x6 (hex))
WAN    : C0:25:A2:xx:xx:45 (config,  0xc (hex))
2.4 GHz: C0:25:A2:xx:xx:46 (config,  0x0 (hex))
5 GHz  : C0:25:A2:xx:xx:47 (config, 0x12 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20611
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:17:48 +01:00
Andrew LaMarche
e11e1c18ee ramips: add support for TP-Link Archer AX21
This patch adds support for the TP-Link Archer AX21 v4.

Device specification
--------------------
SoC Type:	Mediatek MT7621DAT
RAM:		DDR (128MB)
Flash:		ESMT EN25QH128A (16MB)
Ethernet:	5x (4 lan, 1 wan) via embedded switch/SoC built-in
Wi-Fi:		2x2 2.4GHz via MT7975DN, 2x2 5GHz via MT7905DAN
LEDs:		Power, 2.4GHz, 5GHz, WAN, LAN, WPS
Buttons:	Reset, WPS

Installation
------------

Upload the factory image using the Web UI.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20932
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:11:23 +01:00
Rosen Penev
fb1e8a446d ath79: ubnt: nvmem calibration
Userspace handling is deprecated.

Moved pcie wifi nodes out of dtsi as these devices differ in wifi
chipsets and thus calibration size. Added compatible lines too.

Removed pointless label_mac assignments as label-mac-device is already
implemented.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20303
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-01 00:03:06 +01:00
Richard Fröhning
f57a0e8db3 mediatek-filogic: assign WAN netdev trigger to blue:wan LED for cudy wr3000e
- rename blue:wan-online to blue:wan
- assign wan netdev trigger to blue:wan

Signed-off-by: Richard Fröhning <misanthropos@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/20808
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 23:57:23 +01:00
Rosen Penev
579d4654c7 ath79: ar9344: use led-sources for ath9k
The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19865
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 23:54:06 +01:00
Til Kaiser
5629e06cf2 ramips: mt76x8: add Teltonika RUT976 support
This commit adds support for the Teltonika RUT976, part
of the RUTE series, which is very similar to the RUT956.
The RUT976 now has a 5G modem and the flash size has doubled.

Specification:
- MediaTek MT7628AN SoC
- 128 MB RAM
- 32MB Flash
- 4x 10/100 Mbps Ethernet, with passive PoE support on LAN1
- MediaTek MT7628AN 2.4 GHz 802.11n WiFi
- Quectel RG255C 5G modem
- GNSS
- RS232, DB9 connector, Cypress ACM via USB, /dev/ttyACM0
- RS485 /dev/ttyS1
- microSD card slot
- 2.0 USB Type-A HOST port
- analog 0-24V input (MCP3221)
- Relay
- 2x Digital input
- 2x Digital output
- 2x SIM slot (can be swapped via GPIO)
- eSIM (depends on hardware configuration, can be swapped via GPIO)

GPIO:
 - 1 button (Reset)
 - 7 LEDs (power, status green/red, RSSI 1,2,3,4,5)
 - 5 Modem control (power button, reset, status, SIM select, eSIM select)
 - 2 Digital input
 - 2 Digital output
 - 1 Isolated input
 - 1 RS485 tx enable
 - 1 RS485 rx enable
 - 1 Relay
 - 1 Data Carrier Detect (DCD)

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Mobile data connection:
Create proto qmi interface.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 23:49:57 +01:00
Til Kaiser
902b25abf3 generic: 6.12: backport net-usb-qmi_wwan: add Quectel RG255C
Backport support for the Quectel RG255C USB modem.
This modem is used, among others, on the Teltonika RUT976.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 23:49:57 +01:00
Til Kaiser
93c29343ad ramips: split Teltonika RUT9M SPI-NOR layout into separate dtsi
Introduce mt7628an_teltonika_rut9m.dtsi to hold the SPI-NOR flash
definition and partition layout specific to the RUT9M series.

This refactor prepares for supporting the Tetonika RUT976
(part of the RUTE series), which shares most hardware with
RUT9M devices but has a different flash layout.

Update RUT9x1 and RUT9x6 DTS files to include the new dtsi.
Existing RUT9M devices remain unchanged.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/20933
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 23:49:57 +01:00
Schneider Azima
b2648d8951 mediatek: add support for Mercusys MR85X
This commit adds support for Mercusys MR85X router.

Device specification:
 - SoC: Mediatek MT7981b, Cortex-A53, 64-bit
 - RAM: 512MB
 - Flash: SPI NAND GigaDevice GD5F1GQ5UEYIGY (128 MB)
 - Ethernet: Realtek rtl8367s + 2.5Gbe Airoha en8811h
 - Ethernet: 1x2.5Gbe (WAN 2.5Gbps), 3xGbe (LAN 1Gbps, port0, port1, port2)
 - Wireless: 2.4GHz (802.11 b/g/n/ax)
 - Wireless: 5GHz (802.11 a/n/ac/ax)
 - LEDs: 1 amber and 1 green status LEDs, 4 green gpio-controlled LEDs
   on ethernet ports
 - Buttons: 2 (reset,wps)
 - Bootloader: Main U-Boot - U-Boot 2022.07-rc3. Additionally, both UBI
   slots contain "seconduboot" (also U-Boot 2022.07-rc3)

Installation (UART):
 - Place OpenWrt initramfs-kernel image on tftp server with IP 192.168.1.2
 - Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'.
 - Set the uboot environment for startup.
   setenv tp_boot_idx 0; saveenv
   If the bootarg is set to boot from ubi1, also change it to ubi0.
 - Load and run OpenWrt initramfs image.
   setenv serverip 192.168.1.2; setenv ipaddr 192.168.1.1; tftpboot initramfs-kernel.bin; bootm
 - Browse IP 192.168.1.1, upload the 'sysupgrade' image and do upgrade.

Recovery:
 - Press Reset button and power on the router.
 - Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware.

Stock layout:
0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000000300000 : "u-boot-env"
0x000000300000-0x000003500000 : "ubi0"
0x000003500000-0x000006700000 : "ubi1"
0x000006700000-0x000006f00000 : "userconfig"
0x000006f00000-0x000007300000 : "tp_data"

ubi0/ubi1 format:
U-Boot at boot checks that all volumes are in place:
+-------------------------------+
| Volume Name: uboot   Vol ID: 0|
| Volume Name: kernel  Vol ID: 1|
| Volume Name: rootfs  Vol ID: 2|
+-------------------------------+

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| label   | 00:FF:xx:xx:xx:EE | label     |
| WAN     | 00:FF:xx:xx:xx:EF | label+1   |
| LAN     | 00:FF:xx:xx:xx:EE | label     |
| WLAN 2g | 00:FF:xx:xx:xx:ED | label-1   |
| WLAN 5g | 00:FF:xx:xx:xx:EC | label-2   |
+---------+-------------------+-----------+
label MAC address was found in UBI partition "tp_data", file "default-mac".
OEM wireless eeprom is also there, file "MT7981_EEPROM.bin".

Signed-off-by: Schneider Azima <Schneider-Azima12@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/19187
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 22:59:34 +01:00
Schneider Azima
c79c32b4e5 mediatek: build rtl8367s_gsw as a kernel module
The RTL8367S_GSW config for filogic target is not set by default.
This switch model can be recognized by multiple drivers. Configure it as an optional module instead of default set in config.

Signed-off-by: Schneider Azima <Schneider-Azima12@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/19187
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 22:59:28 +01:00
Rosen Penev
f190a5e842 kernel: remove uboot,env hack
Since everything got migrated to the layouts driver, this is no longer
needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20948
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 20:18:08 +01:00
Aleksander Jan Bajkowski
48c9e55094 kernel: backport upstream Realtek PHY patches
Backport of the latest upstream Realtek PHY patches. WoL uses
devm_pm_set_wake_irq(), so the patch that adds this function
has also been backported.

Changelog:
4465ae435ddc net: phy: realtek: create rtl8211f_config_phy_eee() helper
bb78b71faf60 net: phy: realtek: eliminate priv->phycr1 variable
e1a31c41bef6 net: phy: realtek: allow CLKOUT to be disabled on RTL8211F(D)(I)-VD-CG
910ac7bfb1af net: phy: realtek: eliminate has_phycr2 variable
27033d069177 net: phy: realtek: eliminate priv->phycr2 variable
8e982441ba60 net: phy: realtek: create rtl8211f_config_rgmii_delay()
b826bf795564 net: phy: realtek: fix RTL8211F wake-on-lan support

Tested on Netgear WAX206 with RTL8221B-VB-CG.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:39:50 +01:00
Rosen Penev
c9e7f32c4c treewide: use of_property_present
Easier to read and reason about.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19951
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:18:06 +01:00
Rosen Penev
2f30e14c49 ath79: convert pcie gpios to led-sources
Simpler dts.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:06:13 +01:00
Rosen Penev
099807bea5 ath79: fix some ath10k LEDs
ath10k loads before ath9k and thus ends up as phy0.

Also use led-sources to avoid some confusion.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:06:13 +01:00
Rosen Penev
592d4e67c6 ath79: mr600-v1: use led-sources for ath9k
The ath9k driver creates an ath9k LED by default. Instead of having a non
functional LED, configure it properly and remove the extra as it's not
needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19860
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 19:06:13 +01:00
Vincent Li
d4dcb94968 loongarch64: add Loongson PCI DWMAC as built-in
Add the CONFIG_DWMAC_LOONGSON driver to the loongarch64 kernel
configuration as a built-in module.

This driver is required for the integrated Ethernet controller found on
modern Loongson devices such as the 3A6000 NUC and 2K3000. Including it
by default ensures these popular devices have network functionality
out-of-the-box.

Configuration changes were made via `make kernel_menuconfig` for the
loongarch64 target.

Ref: https://github.com/openwrt/openwrt/issues/20945
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20975
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 18:53:03 +01:00
Brian Lee
e7086d7a2f mediatek: filogic: add support for ASUS TUF-AX4200Q
ASUS TUF-AX4200Q(TUF 小旋风Pro WiFi6 AX4200) is a home router that adds an additional 2.5G Ethernet port to ASUS TUF-AX4200.

Hardware
- - - - - - - -
- SOC   : MediaTek MT7986
- RAM   : 512MB DDR3
- FLASH : 256MB SPI-NAND (Winbond W25N02KV)
- WIFI  : Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
- ETH   : MediaTek MT7531 Switch
          MaxLinear GPY211C 2.5 N-Base-T PHY (WAN)
          MaxLinear GPY211C 2.5 N-Base-T PHY (LAN)
- UART  : 3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)

Installation
- - - - - - - -
Vendor-UI Method:

1. Download or make the OpenWrt initramfs.trx image
2. Connect the PC via LAN to one of the yellow router ports and wait until your PC to get a DHCP lease.
3. Browse to http://192.168.50.1/
4. If your router is brand new, finish the setup process and log into the Web-UI.
5. Navigate to Administration -> Firmware Upgrade and upload the downloaded OpenWrt image.
6. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using SCP and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

TFTP Method:

1. Download the OpenWrt initramfs image.
   Copy the image to a TFTP server reachable at 192.168.1.70/24.
   Rename the image to tufax4200q.bin.

2. Connect the PC with TFTP server to the TUF-AX4200Q.
   Set a static ip on the ethernet interface of your PC.
   (IP address: 192.168.1.70, subnet mask: 255.255.255.0)
   Connect to the serial console,
   interrupt the autoboot process by pressing '4' when prompted.

3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.1.1
   $ setenv serverip 192.168.1.70
   $ tftpboot 0x46000000 tufax4200q.bin
   $ bootm 0x46000000

4. Wait for OpenWrt to boot.
   Transfer the sysupgrade image to the device using SCP and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

(based on support for ASUS RT-AX52 by achterin and trx image generation by remittor)

Signed-off-by: Brian Lee <larte332@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-30 18:45:40 +01:00
Alexandru Gagniuc
95bd7a76a1 qualcommbe: update ipq9574 PCS driver
Update the ipq9574 PCS driver the version provided by Qualcomm via
github. The updated driver simplifies link up handling by removing
unnecessary clock rate changes.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20993
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-30 16:51:12 +01:00
Alexandru Gagniuc
cc6b9ff17b qualcommbe: drop "uniphy" from pcs node labels
According to Qualcomm developers, the pcs nodes on IPQ9574 will be
labeled "pcs<n>" and "pcs<n>_ch<m>". The proposed IPQ5424 changes
include the simpler labels. Rename the IPQ95xx nodes for consistency.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20993
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-30 16:51:12 +01:00
Alexandru Gagniuc
6891dc2562 qualcommbe: use ipq_pcs_get/put() in PPE (MAC) driver
ipq_unipcs_create/destroy() are provided by an older version of the
IPQ9574 PCS driver. Use the renamed versions ipq_pcs_get/put() to
allow updating the PCS driver.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20993
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-30 16:51:12 +01:00
Rosen Penev
f614322d28 mediatek: rtl8367s: modernize gpio API
Upstream is strongly considering removing of_gpio.h. As of this commit,
3 upstream drivers remain with actual usage.

Get ahead of upstream and use the GPIOD API before the OF one goes away.

Rework to remove mediatek,reset-pin in favor of the standard
reset-gpios.

Fix wrong high GPIO.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20088
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-29 21:08:39 +01:00
Coia Prant
23a070dfb1 ramips: add support for Hongdian H8850 v20
This is an industrial 4G router equipped with OpenWrt SNAPSHOT OEM
customized version

WARNING: The original firmware device tree is modified from evb
boards, and the device tree name is evb board. This submitted device
tree is a modified version, which deletes the non-this-device parts
and adds GPIO watchdog.

Specification:
- SoC: MediaTek MT7628DAN
- Flash: 16 MB
- RAM: 64 MB
- Power: DC 5V-36V 1.5A
- Ethernet: 1x WAN/LAN, 3x LAN (10/100 Mbps)
- Wireless radio: 802.11n 2.4g-only
- LED:
  System/Power (PWR): Always Off
  Modem (NET): GPIO/3 active-low
  LAN: Always On
  RF (Modem Signal): GPIO/2 active-low
  WIFI: GPIO/44 active-low
- Button:
  WPS / RESET: GPIO/11 active-low
- UART: 1x UART on PCB - 115200 8N1
- GPIO Watchdog: GPIO/0 mode=toggle timeout=1s
- Modem: 1x Built-in modem on board (Power: GPIO/4 active-high)
- SIM Slots: 1x SIM Slots

Issue:
- Factory partition not store mac address on original firmware

Flash instruction:
Using TTL:
1. Connect the board to the computer via TTL.
2. Enter original firmware failsafe mode.
3. Use wget download firmware to board /tmp
4. Use command "mtd -r write openwrt-ramips-mt76x8-hongdian_h8850-v20-squashfs-sysupgrade.bin firmware"
   to flash

Original Firmware Dump / More details:
https://blog.gov.cooking/archives/research-hongdian-h8850-v20-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Tested-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20259
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-29 19:19:46 +01:00
Rosen Penev
f891609fab qualcommbe: fix wrongly edited patch
Line count was incorrect

Fixes: 96fc2fa ("treewide: convert u-boot,env to nvmem-layout")

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-11-29 18:11:32 +01:00
Shiji Yang
1aee2f5567 ipq40xx: convert CRLF line-ending to LF for Linksys MR6350
Use Unix LF style instead of Windows CRLF style.

Fixes: 00bb18b851 ("ipq40xx: Add support for Linksys MR6350")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20973
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-29 18:04:38 +01:00
Robert Marko
39f2019985 Revert "treewide: fixup ath10k nodes"
This reverts commit 741689a335.

Only after merging I remebered the reason why it was changed to 0,0 [1].

[1] 1e20f7b6c6

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-29 17:56:11 +01:00
Rosen Penev
734eacf313 ramips: rt3xxx: fix wifi node address
The reg value says it should be wifi@1,0, not wifi@0,0.

Should fix dtc warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20351
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-29 17:46:36 +01:00
Rosen Penev
741689a335 treewide: fixup ath10k nodes
Use compatible before reg for consistency.

Also fixup the wifi node name for some qualcomm platforms where the slot
is 1 instead of 0.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20351
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-29 17:46:36 +01:00
Rosen Penev
66672e7021 ath79: tplink_tl-wdrxxxx: use led-sources for ath9k
The ath9k driver creates an ath9k LED by default. Instead of having a
non functional LED, configure it properly and remove the extra as it's
not needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-29 00:46:36 +01:00
Hauke Mehrtens
9424b2b786 kernel: mtd: spinand: esmt: add support for F50L1G41LC
Backport upstream patch to add support for the ESMT F50L1G41LC flash
chip. It is used in multiple Cudy products manufactured starting
November 2025.

Link: https://github.com/openwrt/openwrt/pull/20962
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 23:42:29 +01:00
George Moussalem
1f879b8839 qualcommax: ipq50xx: split firmware variants and refactor QCN6122 support
IPQ5018 based boards come in multiple wireless architectures.
The SOC itself provides 2.4G wifi while 5G wifi is added by either an
IPQ5018-specific QCN6122 (2x2) solution or by the more generally
available PCIe-based QCN9074 (4x4) wifi chip.

On IPQ5018/QCN6122-based boards, both QCN6122 and IPQ5018 wifi is
initialized by IPQ5018 firmware which comes in different versions:
- IPQ5018: firmware files to initialize WCSS and the internal wifi chip
- IPQ5018/QCN6122: above + additional firmware segments to initialize
the QCN6122 chip incl. (de-)assertion of resets and clocks enablement

OpenWrt currently packages the combined IPQ5018/QCN6122 firmware for
both architectures. As such, let's switch to using IPQ5018-only firmware
for boards not packed with QCN6122 chip(s) and keep using the shared
firmware for devices that do have QCN6122(s) chips.
This helps us move to using upstreamed IPQ5018 firmware while using the
legacy repo for IPQ5018/QCN6122 firmware and rule out any initialization
conflicts/issues caused by loading QCN6122 on IPQ5018-only boards.

While at it, default to the secure WCSS remoteproc driver sent upstream
for review, move QCN6122 wifi nodes to a separate dtsi, override the Q6
node to load the multi-PD-based architecture remoteproc driver for
needed only by IPQ5018/QCN6122 designs, reference said dtsi in
boards packed with QCN6122 wifi chip(s), and add provision for migrating
the radio path as the wifi nodes now adhere to linux device tree naming
conventions.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20928
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-28 10:27:53 +01:00
George Moussalem
00d61da588 qualcommax: Add support for qcom remoteproc WCSS secure PIL driver
Add support for qcom remoteproc WCSS secure PIL driver.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20928
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-28 10:27:53 +01:00
Rani Hod
cdf187f1e7
siflower: sf21 device tree fix
`i2c1` node was missing `resets`, so even when enabled, the driver would
not recognize it:
```
i2c_designware c101000.i2c: Unknown Synopsys component type: 0x00000000
```

With this fix, I2C pins on BPi-RV2 26-pin GPIO header are usable.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20969
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-28 09:47:39 +01:00
Rosen Penev
eed995d4f9 lantiq: more conversions to nvmem
Now that NVMEM in UBI is supported, more handling can be moved.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 01:20:33 +01:00
Rosen Penev
75b9fae0c3 lantiq: dgn3500: use nvmem to load calibration
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 01:20:33 +01:00
Rosen Penev
00e5204e84 lantiq: homehub-v3a: assign wlan mac in dts
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 01:20:33 +01:00
Rosen Penev
feba8983ac kernel: disable non layout u-boot,env
All users of regular CONFIG_NVMEM_U_BOOOT_ENV have been converted to use
layouts.

CONFIG_NVMEM_U_BOOT_ENV selects the layout variant anyway so this is
safe to do.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 01:20:33 +01:00
Rosen Penev
96fc2fa594 treewide: convert u-boot,env to nvmem-layout
Non nvmem-layout is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-28 01:20:33 +01:00