33879 Commits

Author SHA1 Message Date
Markus Stockhausen
898f678261 realtek: dsa: relax rtldsa_ethernet_loaded()
The Realtek DSA driver accesses the DTS at two locations.

- rtldsa_ethernet_loaded(): to check if ethernet driver is active
- rtl83xx_mdio_probe(): to create ports and link to pcs/phy

The first function does not directly search for the ethernet driver
but looks it up through the switch port nodes. Avoid future issues
and simply search all nodes that have a "ethernet" link to the
network driver.

While we are here add a missing put_device() to keep reference
counters clean.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22235
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-08 20:12:34 +01:00
Markus Stockhausen
02710fdfca realtek: eth: provide shared tx_header() for RTL93xx
rteth_930x_create_tx_header() and rteth_931x_create_tx_header() do
basically the same. Only exception is, that one function can handle
ports beyond 32 and the other not. Merge them into one.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22228
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-08 20:05:47 +01:00
Markus Stockhausen
fb6e2568df realtek: eth: refactor rteth_set_mac_hw()
MAC setting uses hard to read duplicated code. Additionally it
evaluates the unwanted family_id attribute. Provide the list
of MAC address registers in the configuration structure and use
a loop to fill those.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22217
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-08 20:03:03 +01:00
Markus Stockhausen
0e09c39a19 realtek: eth: cleanup hardware transmit handling
There is a workaround in the transmit path for the RTL838x SoCs. This
is basically an open coded read_poll_timeout() and makes the code hard
to read. Additionally the magic trigger calculation is not easy to
understand.

Simplify things by using kernel standards and a better macro.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22217
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-08 20:03:03 +01:00
Jonas Köppeler
50ec0a3f97 kernel: add cake_mq fixes
This adds upstreamed cake_mq fixes:
- avoiding synchronization overhead when running unlimited
- fixing diffServ rates scaling

Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
Link: https://github.com/openwrt/openwrt/pull/22303
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-08 19:43:33 +01:00
Jan Kantert
557b092273 realtek: pending upstream rtl9300 i2c speed patch
Some 10G optics showed random "module transmit fault indicated" due to I2C
read errors on ONTi ONT-S508CL-8S/XikeStor SKS8300-8X switches. The same
modules work with the original firmware and on other Linux based devices.

There seems to be some differences in how we talk to those modules using
I2C in OpenWRT. To fix this this patch adds support for 50kHz I2C speed on
SFPs and enables that for XikeStor/Onti devices. Since SFPs only transmit
very few bytes this should not have any real downsides.

This patch adds support in the i2c driver for 50kHz and 2.5MHz. In a
second PR I will configure 50kHz in the DTS for the affected devices.

Signed-off-by: Jan Kantert <jan-openwrt@kantert.net>
Link: https://github.com/openwrt/openwrt/pull/22209
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:51:08 +01:00
Harshal Gohel
89322b4d69 rtl93xx: dsa: Handle lag_change properly
LACP frequently changes active/backup links. driver must also handle
dp->lag_tx_enabled.

This should only affect egress LAG table, ingress should not be touched.
To test, connect a known working 802.3ad compatible switch (Mikrotik).
Configure bond with 802.3ad on openwrt as well as mikrotik.
Observer active/backup links on openwrt with
```
for iface in <list of bond participants>; do
ip -d link show $iface
done
```
This should show ACTIVE/BACKUP status which must be synchronized with
the partner's ACTIVE/BACKUP status if LACP is working correctly.

Backup interface must not be chosen by the distribution algorithm to
transmit egress packet

At the moment, we have two parties involved in the selection of active LAG TX
ports:
- the bonding/DSA code which informs about activated/deactivated ports using
  .port_lag_change
- the HW which is deactivating ports based on the link state see
  RTL93XX_TRK_CTRL_LINK_DOWN_AVOID

In our case, the software is supposed to manage everything

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:22 +01:00
Harshal Gohel
05096060ca realtek: dsa: rtl93xx: Add link aggregation support
With this commit it is possible to create 802.3ad compatible bond
interface that is interoperable with other 802.3ad compatible switches.

Each trunk group can have maximum of 8 ports as members.
Hardware also supports trunking with stacked switches, however it is not
handled here and the driver only configures the local trunk.

rtl930x and rtl931x has minimal differences in trunk/lag

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:22 +01:00
Harshal Gohel
f556b54a2c realtek: dsa: rtl93xx: Initialize trunk on probe
rtl93xx has two distribution algorithm slots that are shared among
multiple trunks.
Each of this slot can be configured to handle L2 and/or L3 packets

Hardware can also be configured to support layer3+4 but that is not
802.3ad compliant. With this commmit I want to focus on getting
layer2 and layer2+3 initialized in two slots.
When a new LAG group is created, depending on the xmit_hash_policy
configuration a slot will be configured in LAG table entry

SPA and VLAN bits made the switch to always choose same link for all
connections which completely dismisses point of Link aggregation.
So avoid these and stick to SMAC + DMAC for L2 packets and
SMAC + DMAC + SIP + DIP for L3 packets

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Jan Fuchs <jf@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:21 +01:00
Harshal Gohel
3743ed0e02 realtek: dsa: Reelect primary port for a LAG
rtl93xx hardware supports trunk fdb entries. That requires driver to
translate port-fdb entry to trunk fdb entry if the port is part of a
LAG.

There is no standard way of indicating fdb entries for bond interfaces.

One can use debugfs interface l2_table to dump all the entries stored in
the hardware. Trunk FDB entries are now displayed properly with trunk ID
and participating ports

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:21 +01:00
Harshal Gohel
286445257d realtek: dsa: rtl93xx: Deduplicate distribution algo setup
rtl9310 and rtl9300 have two slots for configuration of packet distribution
algorithm that can be assigned to multiple LAG groups. They also have the
same field descriptions

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:21 +01:00
Harshal Gohel
6e63fac22a realtek: dsa: Refactor LAG in preparation for rtl93xx
It is not helpful at the moment to expose all the SoC specific details to
the common code when it actually only needed to add ports to a LAG. Just
have a simple interface for now.

Support returning errors while setting distribution algorithm

Move setting algomask to rtl83xx specific routine and out of common lag_add
because algomasks will be handled differently on rtl93xx

Co-developed-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/21740
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-07 20:33:21 +01:00
Marco von Rosenberg
cd1b70f6f9 ipq40xx: add support for Huawei AP4050DN
Hardware
========
SoC: Qualcomm IPQ4018
ETH: Qualcomm QCA8075 (2 x RJ-45)
WDG: OnSemi SCT706
RAM: Micron MT41K128M16JT-125 (256MB)
NOR: Infineon S25FL512S (64MB)

Installation
============

1. Create a ramboot-able image with the command

   { dd if=/dev/zero bs=32 count=1 2>/dev/null; \
     cat openwrt-ipq40xx-generic-huawei_ap4050dn-initramfs-uImage.itb; \
   } > ramboot.bin`

2. Start a TFTP server in the folder with the ramboot.bin.

3. Plug in a USB-RJ45 serial adapter to the CONSOLE port of the device
   and start a serial console session with
   9600 baud, no parity, 1 stop bit.

4. Plug in either 12V power or PoE to the device.

5. On the prompt `Press f or F  to stop Auto-Boot in 3 seconds`,
   press `f` to enter the Huawei U-Boot command line

6. Enter a new password for the u-boot command line

7. In the command line, run these commands to ramboot OpenWrt:

      setenv serverip <IPv4 address of TFTP server>
      setenv ipaddr <IPv4 address for this AP>
      setenv rambootfile ramboot.bin
      run ramboot

8. In OpenWrt, set up the network and then `scp` the files
   `u-boot-huawei_ap4050dn/uImage` and
   `openwrt-ipq40xx-generic-huawei_ap4050dn-squashfs-sysupgrade.bin`
   into `/tmp/`

9. To backup the original firmware, run the following:

      cat /dev/mtd12 /dev/mtd13 > huawei_ap4050dn_fw_backup.bin.bin

10. Run the following commands to flash u-boot and OpenWrt to the device:

      mtd erase uboot
      mtd write /tmp/uImage uboot
      sysupgrade -n /tmp/openwrt-ipq40xx-generic-huawei_ap4050dn-squashfs-sysupgrade.bin

11. The device should now boot OpenWrt! (sometimes the boot process takes a bit
    longer due to the watchdog resetting the device before the watchdog driver runs)

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
2026-03-07 18:52:31 +01:00
Kenneth Kasilag
d09041eb8a
airoha: an7581: disable NPU offload stats for eagle
'CONFIG_NET_AIROHA_FLOW_STATS=y' currently breaks NPU
offload for AN7581+MT7996, so disable it for now.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/22300
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-06 15:00:46 +01:00
Lorenzo Bianconi
123557f0e2
airoha: add the capability to read firmware names from dts
Introduce the capability to read the firmware binary names from device-tree
using the firmware-name property if available.
This is a preliminary patch to enable NPU offloading for MT7996 (Eagle)
chipset since it requires a different binary with respect to the one
used for MT7992 on the EN7581 SoC.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/22289
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-06 15:00:24 +01:00
Lorenzo Bianconi
305f685f83
airoha: npu: Init BA memory region if provided via DTS
Initialize NPU Block Ack memory region if reserved via DTS.
Block Ack memory region is used by NPU MT7996 (Eagle) offloading.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/22289
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-06 15:00:24 +01:00
Álvaro Fernández Rojas
eb4fd65c92 kernel: net: sfp: improve Huawei MA5671a fixup
Add pending patch for improving Huawei MA5671a SFP fixup, which allows
communicating with the module even if the fiber isn't connected.

Link: https://github.com/openwrt/openwrt/pull/22283
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2026-03-06 14:00:03 +01:00
Rosen Penev
0c0b00422e mpc85xx: fix dtc warnings
Even though these are disabled, dtc still warns on missing reg and
ranges.

Add them. No real difference as it's disabled anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20990
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 12:06:49 +01:00
Ivan Diaz
03fddee7bd ath79: tiny: increment compat version for RE355/RE450
Bump compat version to 3.0 for TP-Link RE355 v1, RE450 v1 and RE450 v2.
Was missed for 25.12; users upgrading from older images need sysupgrade -F.

Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
Link: https://github.com/openwrt/openwrt/pull/22185
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 12:04:23 +01:00
Ivan Diaz
831685aa15 ath79: add 4k blocksize for RE355/RE450 rootfs alignment
Misaligned rootfs_data caused config loss on sysupgrade. Set BLOCKSIZE
:= 4k for proper JFFS2 alignment. Add DEVICE_COMPAT_MESSAGE for
sysupgrade -F requirement.

Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
Link: https://github.com/openwrt/openwrt/pull/22185
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 12:04:23 +01:00
Ivan Diaz
d583294c70 ath79: rename tplink_rex5x-v1, deduplicate RE450-v2 config
Rename Device/tplink_rex5x-v1 to tplink_rex5x. Make RE355 v1, RE450 v1,
and RE450 v2 inherit from it, removing duplicated fields from RE450 v2.

Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
Link: https://github.com/openwrt/openwrt/pull/22185
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 12:04:22 +01:00
Jonas Jelonek
45636e3a2b kernel: refresh patches
Refresh kernel patches with make target/linux/refresh for each target.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22206
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 11:33:05 +01:00
Jonas Jelonek
3b2e52d52f generic: drop downstream gpio-cascade driver
The single user of the downstream gpio-cascade driver has been switched
to use the upstream gpio-line-mux driver. Thus, we can drop the former
now.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22206
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 11:33:05 +01:00
Jonas Jelonek
564a6442f2 ath79: replace gpio-cascade on Buffalo WZR-HP-G300NH
The GPIO cascade driver is a downstream-only driver and the Buffalo
WZR-HP-G300NH is its only user for now. Recently, a similar and
independently developed driver 'gpio-line-mux `which serves the same
purpose was accepted upstream and backported here. Use that instead the
downstream driver.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22206
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 11:33:05 +01:00
Jonas Jelonek
95532ba906 generic: backport gpio-line-mux driver
Backport the upstream 'gpio-line-mux' driver which allows to provide a
1-to-many mapping between one physical GPIO and multiple virtual GPIOs,
based on a multiplexer.

For this purpose, there's been a dedicated downstream driver
'gpio-cascade' which is mostly the same, but wasn't upstreamed in the
end. Independently developed, the 'gpio-line-mux' driver was upstreamed
to solve the exact same problem occuring on Realtek-based Zyxel XS1930
switches. Support for those is being worked on, but the hardware uses a
similar quirk for SFP signals. The signals 'RX_LOS', 'MOD_ABS' and
'TX_FAULT' do not have dedicated GPIOs each but all use a single GPIO
which is multiplexed. Depending on the multiplexer state the GPIO line is
connected to one of the signals.

Since the SFP driver needs single GPIOs for the single signals, this
adapter drivers fills the gap to make both work together.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22206
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-06 11:33:05 +01:00
Dirk Buchwalder
e468534263
airoha: an7581: add ubi nvmem driver
Add ubi nvmem driver, required to load nvmem entries from ubi volumes

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/22151
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-05 11:17:47 +01:00
Dirk Buchwalder
0a64ed27a7
airoha: an7581: enable fitblk driver
Enable fitblk driver, required to parse the fit image and set-up the rootfs volume

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/22151
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-05 11:17:47 +01:00
Kenneth Kasilag
442e67d31f
airoha: an7581: add uboot chainloader
Due to issues surrounding the implementation of the vendor BMT/BBT
on Airoha, upstream ATF + uboot has switched to UBI flash partitions.

However, some devices shipped on this platform are bootloader locked,
and thus it is impossible to replace ATF + uboot.

During testing for the Gemtek W1700K (#17869), sysupgrades from Linux
(which is unaware of the underlying BMT/BBT) would occasionally write
data into blocks which were remapped by the vendor uboot when it was
read on the following reboot, causing a soft brick.

An acceptable workaround [1],[2] was discussed where an intermediate
uboot would be written by the vendor uboot (which is aware of Airoha
BMT/BBT). This chainloader would then ignore the regions of flash
used by the vendor uboot, and store all relevant data inside of UBI.

UBI would then be used to handle bad block management. As the vendor
ATF + uboot do not read or interact with the UBI region, we would avoid
unwanted remaps from BMT/BBT.

This commit introduces support for building such a chainloader, by
packaging u-boot and DTS into a FIT image; to be flashed like a kernel.

Configuration for the Gemtek W1700K is provided as an example of how the
chainloader is used.

[1] https://github.com/openwrt/openwrt/pull/17869#discussion_r2836066746
[2] https://github.com/openwrt/openwrt/pull/17869#discussion_r2838395671

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
[ move FIP_COMPRESS to Build/Compile, wrap some long lines ]
Link: https://github.com/openwrt/openwrt/pull/22151
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-05 11:17:46 +01:00
Rustam Adilov
5d86278a9d realtek: mtd: nand: backport realtek-ecc OOB check fix patch
Add a backport patch of realtek ecc driver which has been accepted
upstream. It enables us to make use of devices with NAND that have
OOB size larger than 64 and utilize Realtek ECC engine in OpenWrt.

Signed-off-by: Rustam Adilov <adilov@tutamail.com>
Link: https://github.com/openwrt/openwrt/pull/22243
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-05 10:42:54 +01:00
Markus Stockhausen
dddda85985 realtek: dsa: remove obsolete attributes from port structure
The attributes "is2G5" and "is10G" are set but never used. Drop them.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22255
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-05 10:39:34 +01:00
Markus Stockhausen
4253882e4e realtek: dsa: rename rtl838x_port to rtldsa_port
Adapt the prefix of the port structure.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22255
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-05 10:39:34 +01:00
Markus Stockhausen
3f65aca850 realtek: dsa: make pcs a port attribute
pcs is currently a standalone array for the pcs of each port.
Convert it to an attribute of the port structure and thus move
it where it belongs.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22255
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-05 10:39:34 +01:00
Daniel Golle
f45235cc7c mediatek: filogic: enable KASLR
Enable Kernel Address Space Layout Randomization (KASLR) on the MT7622
platform. Note that this requires the bootloader to provide the kaslr-seed!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-03-05 02:28:32 +00:00
Daniel Golle
93d1988e6f mediatek: mt7622: enable KASLR
Enable Kernel Address Space Layout Randomization (KASLR) on the MT7622
platform. Note that this requires the bootloader to provide the kaslr-seed!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-03-05 02:28:32 +00:00
Daniel Golle
b7a2f80740 mediatek: replace downstream TRNGv2 driver
Replace the downstream mtk-rng-v2 driver which was acquires random bytes
from TF-A via SMC. A new approach is needed as TF-A for MT7986 has
changed and now requires to use SMC instead of directly accessing the
TRNG via MMIO. However, we can't know whether we are on old or new TF-A,
many devices (like the BananaPi BPi-R3) allow updating TF-A BL3 in the
field, so it may be of the old or new type, and the RNG driver will have
to figure it out somehow.

This currently means that MT7986 with newer TF-A has broken/non-working
HWRNG in Linux:
root@OpenWrt:~# hexdump -C /dev/hwrng
hexdump: /dev/hwrng: I/O error

Fix this by creating a new combined driver which replaces the previous
mtk-rng-v2 driver, and is able to auto-detect which convention to use
on MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-03-05 02:26:41 +00:00
Valent Turkovic
a75cc4f18c ipq40xx: re-enable MeshPoint.One target
The MeshPoint.One was disabled during the DSA migration with the
comment "Missing DSA Setup". However, this device inherits its
entire network configuration from 8dev Jalapeno via the
Device/8dev_jalapeno-common template, and shares the same DSA
network setup in 02_network.

The Jalapeno has been working with DSA since the migration. All
MeshPoint.One board support files (DTS, network config, LED config)
are already in place and reference the same QCA8072 switch
configuration as the Jalapeno.

Hardware: Qualcomm IPQ4018, QCA8072 switch, same as 8dev Jalapeno.
Tested: Built firmware from current main branch, boots and network
functions correctly.

Signed-off-by: Valent Turkovic <valent@meshpointone.com>
Link: https://github.com/openwrt/openwrt/pull/22258
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-04 12:35:57 +01:00
Shiji Yang
7a76074574 ramips: modules: build I2C driver package for MT7621
Some MT7621 devices also have I2C peripherals.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22213
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-03 13:07:58 +01:00
Markus Stockhausen
24335722f6 realtek: dsa: drop rtldsa_get_mib_desc()
rtldsa_get_mib_desc() is always well defined and only looks into
the configuration structure. Drop it and use direct data assignment
where needed. While we are here drop all NULL checks because
mib_desc is never unset.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22219
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-03 13:06:32 +01:00
Markus Stockhausen
5fad34e5f0 realtek: dsa: move mib_desc/mib_list to device specific source
The device specific mib descriptors are located in dsa.c and
rtldsa_get_mib_desc() selects the right decriptor for the caller
based on family_id from the private structure. That makes not
much sense and is not wanted

Move the descriptors into their corresponding files and link
them directly to the config structure. Simplify the selector
by directly returning the linked data.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22219
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-03 13:06:32 +01:00
Bjørn Mork
3207627eab realtek: dsa: fix ports => ethernet-ports renaming
The "ports" node was renamed.  Update driver to match device-tree.

Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Fixes: 63729a8d6e87 ("realtek: dts: replace ports by ethernet-ports")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/22242
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-02 18:18:05 +01:00
Robert Marko
4bfa5e2c09 Revert "imx: cortexa53: remove KSZ9477 static driver"
This reverts commit 231553b280925f1c1154c9a7c8549c4cbbea7c9e.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-02 18:05:45 +01:00
Valerio 'ftp21' Mancini
09a0462ea8
mediatek: add support for Zyxel WX5600-T0
This access point is a ‘friend’ of the T56 supplied by Odido but with DDR3 RAM and with two Ethernet 2.5 (GPY211)

The flash procedure is similar to other Zyxel T56/EX5600/EX5601

If you need backup please use the T56 guide
Please refer to https://openwrt.org/inbox/toh/zyxel/wx5600-t0 for detailed flash informations

Specifications:
SOC: MT7986b
RAM: 512MB
Flash: 512 MB SPI NAND
Ports: 2 LAN 2.5Gbps (GPY211C)
WIFI: MT7976GN + MT7976AN
LED: 3 bicolor LED - 1 monocolor LED
Buttons: Reset and WPS

We can install all with U-boot and mtk_uartboot.
Load Uboot:

```
./mtk_uartboot -a -p ./mt7986-ram-ddr3-bl2.bin -s /dev/ttyUSB0 -f openwrt-mediatek-filogic-zyxel_wx5600-t0-ubootmod-bl31-uboot.fip
```
**WARNING: Please use a GBIT ethernet or force it on system**
**WARNING: Please use only LAN2 port in Uboot**
Press 0 on Bootmenu
```
mtd erase ubi
run ubi_format
bootmenu
```
Load and write BL2 and U-boot:
```
8
7
```

Load and write recovery and production
```
6
5
```

Signed-off-by: Valerio 'ftp21' Mancini <ftp21@ftp21.eu>
Co-authored-by: Hal Martin <halmartin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18364
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-02 11:43:43 +01:00
Shiji Yang
6e7d23be8b mediatek: drop PCIe reset assert delay patch
This patch has already been merged into linux 5.17 kernel.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.17.y&id=65ace9a85fa7f88aec4d9d842061108161fa47bc
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22175
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 18:50:54 +01:00
Bevan Weiss
018ba6e5b8 kernel: mfd: Add Hasivo STC8 mfd
This STC8 microcontroller is used on a range of Hasivo managed switches.
It typically performs some fan/thermal control, and also has some
discrete IO hanging off of it.
The fan/thermal control is still somewhat unknown at this stage, but the
LED / gpio control has been determined as being two I2C registers which
need to be written to with a 'typical' Hasivo 0x40 execute mask set, to
change values.

Rather than having this expose the LED functionality / thermal control
directly, just represent it as an mfd, with some configurable OR'ing of
an execute-bit to certain registers (execute-bit-regs).  This way different
STC8 arrangements can hopefully be handled by devicetree configs rather
than needing new driver code.

Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21578
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 18:47:27 +01:00
Ahmed Naseef
f92e0d3d3a econet: en7528: add missing flash partition for DASAN H660GM-A Generic
Add the unnamed partition between rwfs and reservearea to fully describe
the flash layout.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22195
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 17:36:01 +01:00
Ahmed Naseef
3fe9307c14 econet: en7528: fix swapped WiFi eeprom references for DASAN H660GM-A
The 2.4 GHz and 5 GHz WiFi eeprom cell references were assigned to the
wrong PCIe slots. Swap them so slot0 (2.4 GHz) uses the eeprom at
0x1c0000 and slot1 (5 GHz) uses the eeprom at 0x40000. Fix the eeprom
cell lengths to match the sizes expected by their respective drivers.

Fixes: be24a13ad5b2 ("econet: en7528: add PCIe and WiFi support")
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22195
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 17:36:01 +01:00
Jonas Jelonek
4cf401088e realtek: dts: drop SYS LED of XikeStor SKS8310-8X
The sys_led node in the device tree is wrong and doesn't work. On GPIO
23 nothing seems to be connected. The switch has a SYS LED but as with a
lot other Realtek switches, this LED is connected to the pin A0, which
can be driven as GPIO0 or system LED. The hardware-assisted behavior is
configured during boot by u-boot.

Though it is be possible to deactivate the hardware-assisted behavior
and give userspace control over the LED, it doesn't work for this
switch. XikeStor apparently decided to hook the SYS LED to some kind of
external watchdog. This one seems to expect a LOW signal on that line
periodically. This leaves room for two options:

1) keep behavior and let the LED blink as configured by u-boot
2) turn off LED completely

Option 2) is rather odd and may confuse users, thus it is better to keep
the behavior as-is for now. u-boot configures the LED to blink fast
which might be annoying. As soon as we have a way in the device tree to
specify different blinking frequencies as supported by the hardware,
this can be smoothened.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22211
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 14:46:12 +01:00
Jonas Jelonek
4a73f72a23 realtek: dts: add monitor IC node for XikeStor SKS8310-8X
The XikeStor SKS8310-8X has a monitoring IC LM75B from National
Instruments on board. This was missed when support for the device was
added. Add it now and also add the corresponding kmod to the device
packages.

Fixes: 62d50fb196 ("realtek: add support for XikeStor SKS8310-8X")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22211
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 14:46:12 +01:00
Jonas Jelonek
05cbbb4037 realtek: use nvmem for mac address for XikeStor SKS8310-8X
Define an nvmem cell in the device tree of XikeStor SKS8310-8X to
reference that as a source for the MAC address of the switch (ports).
This eliminates the need for the userspace script to read and parse the
MAC address.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22211
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 14:46:12 +01:00
Markus Stockhausen
4724649689 realtek: mdio: avoid unneeded array initialization
rtmdio_probe() uses for_each_phy() to access dn[]. This will point
to initialized entries. No need to clear that array in advance.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22131
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-03-01 14:41:05 +01:00