Commit Graph

33756 Commits

Author SHA1 Message Date
Robert Senderek
f948f71300 qualcommax: ipq50xx: Add support for Zyxel SCR50AXE
This is tri-band WiFi6E capable router. Also Zyxel Nebula managed so no real local GUI. To open device 4 screws must be located uder the label.
Four latches are on front and two on each side. Better start from ethernet port side where 3 small latches are easy to handle.
FCC shows It's identical to WSQ65 sold as Zyxel Multy M6E but that's nowhare to be found yet. WSQ65 is not covered by this PR

Speficiations:
* SoC: Qualcomm IPQ5018
* RAM: 1GB DDR3
* Flash: Winbond W25N02KWZEIR 256MB
* UART: PCB "J3"  is located left from front LED strip
              (VCC/TX/RX/     /GND)   3.3V 115200n8
* Wi-Fi1: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
* Wi-Fi2: QCN6102 (2x2:2 5 Ghz 802.11an/ac/ax)
* Wi-Fi3: QCN6122 (2x2:2 6 Ghz 802.11an/ac/ax)
* Ethernet: QCA8337 4xLAN 1Gbit / 1xWAN 1Gbit
* Buttons: WPS , Reset
* LEDs: 13 in total
   RGB power, RGB wan, RGB status (cloud), RGB wifi, Green wps
* FCCID: I8803891

*Flash Instructions starts with getting root:
connect uart to J3 connector next to the front LEDs
go to failsafe when this shows up in log:
"Press the [f] key and hit [enter] to enter failsafe mode"
execute:
mount_root
passwd -d root
reboot

logon as root:
look for 'Please press Enter to activate this console.'
login is root password is empty
execute:
fw_setenv DebugFlag=0x1
fw_setenv bootdelay=0x2
passwd -d root
backup ubi partition "rootfs" into safe space
reboot

*OpenWrt installation
stop uboot and execute:
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.10
tftpboot *-factory.ubi
flash rootfs
reset

or:
tftpboot *-initramfs-uImage.itb
bootm
use sysupgrade as usual

*restore OEM from backup
stop uboot and execute:
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.10
tftpboot *-initramfs-uImage.itb
bootm
transfer rootfs.bin backup and execute:
ubiformat /dev/mtd16 -y -f /tmp/rootfs.bin

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/21042
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 11:05:20 +01:00
Jonas Jelonek
b94c3ba0ff realtek: pcs: rtl931x: improve port media handling
The port media handling introduced before was to some extent just taken
over from the SDK. As a second step, improve that code now. Some code
can be deduplicated, a few statements removed and improved in general.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21385
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 11:01:11 +01:00
Jonas Jelonek
7971386514 realtek: pcs: rtl931x: add port media handling
SFP modules still do not work that well across different devices. One
missing piece seems to be the bunch of magic values and bits set by the
SDK depending on which media is used on a port.

Take over code from the SDK for port media handling [1]. This applies
different sequences depending on whether it's 10G fiber, 1G fiber or DAC
cables to make it work best for each variant. Place the call to that
code below the configuration of a SerDes mode but before actually
activating that mode and powering on the SerDes. The SDK and our code
for RTL930x do that similarly.

Though we do not have any notion of media in pcs_config right now, do
similar to some SDK versions and set an appropriate media type for fiber
modes and SGMII (otherwise it doesn't work).

[1] 51c3390e0e/sources/rtk-dms1250/src/hal/phy/phy_rtl9310.c (L2302)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21385
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 11:01:11 +01:00
Jonas Jelonek
b4bd85d504 realtek: pcs: add enum for port media
The Realtek SDK includes a lot of code around specific port media,
usually having quite some differences between 10G fiber, 1G fiber and
DAC cables. For each type, several magic values are set which in the end
usually make different kinds of links work optimal.

While there is currently no way to get that media information from the
kernel, add some fields as an enum to have a notion of different media
kinds. In additional steps, code for the subtargets can be taken over
from the SDK to handle different media.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21385
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 11:01:11 +01:00
Jonas Jelonek
b435b5bc61 realtek: pcs: drop some unneeded unused attributes
Drop the '__always_unused' tags from two functions which are actually
used. This was missed during the big transition before.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:46:54 +01:00
Jonas Jelonek
84f2ecba4d realtek: pcs: fix naming of RTL931X sds config data
Those config arrays still do not lineup with common conventions in the
driver in terms of naming. They are missing the driver and variant
prefix. Thus, line that up with how RTL930X code looks like.

- add 'rtpcs_' prefix since it's part of the PCS driver
- add '931x_' prefix because it's for RTL931X
- use 'cfg' instead of 'config' to shorten that a bit

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:46:54 +01:00
Jonas Jelonek
3753805b2a realtek: pcs: use ARRAY_SIZE kernel macro
In the RTL931X configuration code, the array size of configuration
arrays was still calculated with 'sizeof(...) / sizeof(...)'. There's a
dedicated macro in the kernel for exactly that usecase. Use that instead
to avoid possible errors and make the line shorter. The RTL930X code is
already doing it the good way.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:46:54 +01:00
Jonas Jelonek
7aa7e97e53 realtek: pcs: fix sds_config struct definition
In kernel coding style, it is highly disregarded to hide structures
behind typedefs ([1]). The PCS driver still contains a typedef for the
sds_config which was taken over from the PHY driver.

- drop the typedef, just declaring it as a struct
- give it the common 'rtpcs_' prefix
- adjust all usage locations

[1] https://www.kernel.org/doc/html/v6.18/process/coding-style.html#typedefs

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:46:54 +01:00
Jonas Jelonek
fe0f6f82c1 realtek: pcs: add myself as module author
I have contributed quite a lot changes recently and should be made
responsible for most of the code that has been added to the PCS driver
after it has been introduced by Markus.

FWIW, add myself as another module author so anything I produced here
doesn't fall back to someone else, i.e. Markus as currently the single
module author.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21410
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:46:54 +01:00
Tianling Shen
c79fa27cbf rockchip: fix kernel tag for backported patches
These patches were actually merged in kernel 6.19 instead of 6.18,
fix them to avoid confusing when moving to new kernel version.

While at it, refresh the RK3528 PCIE L1ss patch since it was
accepted in 6.19 as well.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/21419
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-07 10:44:11 +01:00
Daniel Golle
6aaffddf27 kernel: net: phy: realtek: fix C22-only mode on 2.5GE PHYs
Import 2 patches completing and fixing the RealTek's 2.5GE PHYs when being
used in Clause-22 mode.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-01-07 01:30:26 +00:00
Daniel Golle
96ff31b94a kernel: net: phy: c45: check validity of 10GbE LPA
Only use link-partner advertisement bits for 10GbE modes if they are
actually valid. Check LOCALOK and REMOTEOK bits and clear 10GbE modes
unless both of them are set.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-01-07 01:30:26 +00:00
Daniel Golle
dfce21df96 kernel: net: phy: realtek: replace in-band AN hack
Replace downstream hack for RealTek PHYs with a more clean solution
which could make it upstream.

As SGMII in-band AN is broken on some platforms, or simply expected to
be disabled by default in phy/sgmii mode (ie. on-board PHYs with MDIO
for out-of-band configuration and status), a hack for the RealTek PHY
driver was introduced to unconditionally disable SGMII in-band
autonegotiation.

Meanwhile the kernel has gained a proper interface for PHY and PCS to
report in-band AN capabilities and enable/disable in-band, matching
PHY and PCS capabilities.

Thanks to Bevan Weiss' knowledge about how RealTek PHY SerDes registers
are being handled in RealTek's SDK this can now be greatly improved:
 - report in-band capabilties
 - let phylink set in-band matching PCS and PHY capabilities
 - properly abstracted indirect access of SerDes registers

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-01-07 01:30:26 +00:00
Daniel Golle
5652b98952 kernel: net: phy: realtek: replace hack with proper fix
RealTek's 2.5G PHYs suffer from an up to now inexplicable problem which
results in the SerDes mode not being properly setup and disabling
in-band AN leading to a timeout waiting for a busy-bit to clear. Up to
now there has been a crude work-around: resetting the PHY and trying
another time.

The cause has now been found as a wrong access to register PHYCR1 on
MDIO_MMD_VEND1 instead of MDIO_MMD_VEND2 when setting up ALDPS as well
as disabling the MDIO broadcast address 0.

In order to access MDIO_MMD_VEND2 on Clause-22-only busses a custom
.read_mmd and .write_mmd ops are implemented, mapping MDIO_MMD_VEND2 to
paged access as this is required.

Also, as ALDPS by design disables the SerDes PCS of the PHY in case the
link has been down for a while, move enabling ALDPS to the end of the
config_init function to not face problems when configuring the interface
mode and in-band AN.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-01-07 01:30:26 +00:00
Ziyang Huang
f5bf8c2b94 airoha: an7581: correct led nodename
Use standard name.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:25 +01:00
Ziyang Huang
077120fb64 airoha: an7581: correct phy nodename
Let node unit address same as reg.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:24 +01:00
Ziyang Huang
ea54b6a478 airoha: an7581: move the switch led label from soc-level to board-level
Different boards use different port map. For example, some board may use
a GE port as WAN. So defining the led label in board-level is better.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:24 +01:00
Ziyang Huang
e2f7ad08c7 airoha: an7581: move the switch port label from soc-level to board-level
Different boards use different port map. Defining the port labels in
board-level is better.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:24 +01:00
Ziyang Huang
007aa5a51c airoha: an7581: disable all switch port and phy by default
Some board only use some of them, so enable as necessary in
board-level dts.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:24 +01:00
Ziyang Huang
65aed6aa12 airoha: an7581: correct the pinctrl-name of phy leds
address the following issues:

    [    3.542844] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
    [    3.552550] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
    [    3.562449] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
    [    3.574350] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20482
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-05 01:00:24 +01:00
Markus Stockhausen
17b90c59fa realtek: eth: adapt prefix of ops structures
Convert all ops structures to the new rteth prefix.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-04 19:06:26 +01:00
Markus Stockhausen
f14fed9a92 realtek: eth: move netdev_ops to config structure
Simplify netdev_ops initialization by moving the data
into the configuration structure.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-04 19:06:26 +01:00
Markus Stockhausen
2d8212e8a4 realtek: eth: reorder configuration data
The configuration data needs to reference the netdev_ops
in the future. Reorder it in a separate commit to avoid
confusion later.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-04 19:06:26 +01:00
Markus Stockhausen
b8c6713ce4 realtek: eth: move cpu_port to config structure
There is no need to set the cpu port depending on the
given family. Remove it from the private control structure
and add the fixed value to the configuration structure.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-04 19:06:26 +01:00
Markus Stockhausen
e6d282eee7 realtek: eth: Rename configuration structure
The name of the configuration structure suggests that it
contains a list of registers. As it contains functions too
change the name according to other realtek drivers.

- "Invent" a new driver prefix "rteth"
- Rename the structure and variables to config/cfg

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-04 19:06:26 +01:00
Linus Walleij
b73fd273b3 ixp4xx: fix bug in Actiontec DTS file
This misassigned ethernet port bug was merged in the upstream
kernel.

Link: https://github.com/openwrt/openwrt/pull/21367
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-01-04 16:51:31 +01:00
Hauke Mehrtens
5230157a16 kernel: QCOM SPI NAND: backport multiple fixes
These patches fix bugs in a patch we backported.

These patch were cherry picked from upstream Linux because it references
a patch we backported in the fixes tag.

The patches were reordered to match the ordering in the upstream Linux kernel.

Fixes: 93173aee96 ("qualcommbe: ipq95xx: Add initial support for new target")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:30 +01:00
Hauke Mehrtens
69d76e3a14 kernel: phylink: disable autoneg for interfaces that have no inband
This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

The first two patches are providing function needed by the last patch.

Fixes: 813ecda1f3 ("generic: backport phylink patches for PCS/PHY caps OPs")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:30 +01:00
Hauke Mehrtens
2c7241b209 kernel: RTL8211FVD: restore disabling of PHY-mode EEE
This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

Fixes: 48c9e55094 ("kernel: backport upstream Realtek PHY patches")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:30 +01:00
Hauke Mehrtens
9c4b7fbaad kernel: mv88e6xxx: backport fixes
These patches fix bugs in a patch we backported.

These patch were cherry picked from upstream Linux because it references
a patch we backported in the fixes tag.

Fixes: c990f6e156 ("linux: generic: net: dsa: mv88e6xxx LED support")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:30 +01:00
Hauke Mehrtens
b3cc77eead kernel: reserved_mem: add missing IORESOURCE_MEM flag on resources
This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

Fixes: 9d3009f426 ("airoha: major backport of Airoha Ethernet driver feature support")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:30 +01:00
Hauke Mehrtens
b3318fe819 kernel: as21xxx: backport patch improve PHY HW reset
This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

The function phy_id_compare_vendor() is needed by the fix.
Refresh 782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch with the upstream code.

Fixes: 08a616b216 ("generic: backport support for Aeonsemi AS21xxx PHY")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:29 +01:00
Hauke Mehrtens
7390e63374 kernel: pcs-mtk-lynxi: backport fix for in-band status capabilities
This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

Fixes: 813ecda1f3 ("generic: backport phylink patches for PCS/PHY caps OPs")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:29 +01:00
Hauke Mehrtens
63b45a10c0 kernel: PHY: backport led fixes commit
This patch fixes a bug in some patches we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:29 +01:00
Hauke Mehrtens
6ac5e28902 kernel: r8169: backport upstream fix
This fixes a bug introduced in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

Fixes: 91ce7f606a ("generic: backport upstream v6.16 r8169 patches")
Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:29 +01:00
Hauke Mehrtens
3c821c19a8 kernel: move patches to backported
These formally pending patches were merged into upstream Linux some time
ago. Move them to the backports folder and add the kernel version they
were added to the file name.

Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:29 +01:00
Hauke Mehrtens
7130053695 kernel: refresh upstreamed patches
Replace pending patches which are already integrated in upstream Linux
with their upstream versions.

These patches were exported with:
git format-patch -1 -k

Link: https://github.com/openwrt/openwrt/pull/21366
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-04 16:41:28 +01:00
Rosen Penev
9934c716ed treewide: replace remove_new with remove
Preparation for kernel 6.18. It removes the former.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21226
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 17:27:25 +01:00
Aleksander Jan Bajkowski
79ff31104c airoha: an7583: fix scuclk unit-address
Fix the unit-address of the scuclk node.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20985
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 17:04:58 +01:00
Aleksander Jan Bajkowski
914fe44647 airoha: en7583: dts: fix typo disable
No functional changes intended.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20985
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 17:04:58 +01:00
Jonas Jelonek
2055a4df78 realtek: pcs: rtl931x: soften early exit for USXGMII
Now that the PCS driver keeps track of how many links are registered per
SerDes, we can also decide which real hardware mode to use when USXGMII
is set. While there is still no proper setup for 10G-QXGMII or XSGMII,
the existing USXGMII 10G-SXGMII setup seems to work properly.

Soften the condition when to exit early so that single 10G port USXGMII
can be setup properly.

Fixes: c18476d0c5 ("realtek: RTL931x: disable USXGMII SerDes setup")
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 16:59:49 +01:00
Jonas Jelonek
b63f68e409 realtek: pcs: select OFF mode with no links on SerDes
Because the PCS driver keeps track of the number of registered links for
each SerDes now, we now know when there is no link on a SerDes. In this
case, determine to turn off the SerDes in the mode mapper.

Though the phylink subsystem shouldn't attempt to config something
different when no link/port references a Serdes, be on the safe side.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 16:59:48 +01:00
Jonas Jelonek
7cd3407fde realtek: pcs: cover number of links per SerDes for USXGMII
A SerDes may supply multiple ports and depending on that number,
different hardware modes need to be used. While there are corresponding
modes in the kernel in some cases (e.g. USXGMII with 4 2.5G ports aka
10G-QXGMII), this doesn't always map to Realtek hardware modes. Use the
previously added link number accounting for that.

An obvious example of this is the SerDes on XGS12xx-12 switches which
is connected to an octa-PHY. This runs Realtek proprietary XSGMII mode
(10G-pumped SGMII interface) for which there is no corresponding mode
in the kernel.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 16:59:48 +01:00
Jonas Jelonek
76f392194b realtek: pcs: keep track of number of links per SerDes
Add a field to the rtpcs_serdes structure to keep track of how many
links (aka ports) are used on a single SerDes. This is needed to be
known to map kernel interface modes to SerDes hardware modes properly
(e.g. USXGMII --> USXGMII/10G-QXGMII/XSGMII).

While working in rtpcs_create, optimize referencing the SerDes instance
for cleaner code.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 16:59:48 +01:00
Jonas Jelonek
dfd6a4212f realtek: pcs: add missing SerDes modes
100Base-X mode was missing before in the enum rtpcs_sds_mode. So add it
to be able to support this mode too. Handle this mode in the
_determine_hw_mode mapper.

10G_QXGMII mode was missing in the mode mapper. Add it and map it to
USXGMII_10GQXGMII mode.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 16:59:48 +01:00
Hannu Nyman
93e9e67ee9 mediatek: remove erroneous pipe action from BE7200 recipe
Remove the errorneous pipe action from the BE7200 device package list.

It causes visible errors into config:

 perus@ub2510:/OpenWrt/aarch64$ make defconfig
 ...
 tmp/.config-target.in:55023:warning: ignoring unsupported character '|'
 tmp/.config-target.in:191877:warning: ignoring unsupported character '|'
 tmp/.config-target.in:191878:warning: ignoring unsupported character '|'
 tmp/.config-target.in:285812:warning: ignoring unsupported character '|'
 tmp/.config-target.in:285815:warning: ignoring unsupported character '|'
 tmp/.config-target.in:285819:warning: ignoring unsupported character '|'
 tmp/.config-target.in:285820:warning: ignoring unsupported character '|'
 #
 # configuration written to .config
 #

 File tmp/.config-target.in:

  55020         select DEFAULT_urandom-seed
  55021         select DEFAULT_urngd
  55022         select DEFAULT_wpad-basic-mbedtls
  55023         select DEFAULT_|
  55024         help
  55025           Build firmware images for Routerich BE7200

Fixes: ff5e66a920 ("mediatek: add support for Routerich BE7200")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/21376
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 12:38:10 +01:00
Michel Promonet
ce282459e7 kernel: add kernel module sun6i_csi and ov5640
This is adding SUN6I-CSI and OV5640 driver for AllWinner platform for NanoPi

Signed-off-by: Michel Promonet <michel.promonet@free.fr>
Link: https://github.com/openwrt/openwrt/pull/20085
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 01:11:09 +01:00
Jörg Seitz
479f1403f2 mediatek: add support for device zbt-z8103ax-c
- adopted MTD partition size increase from 64M to 128M
  -> this allows boot to complete
- moved MAC addressing stuff out of partition definitions
- all MAC addressing stuff is in .dtsi

Specifications:

SoC: MediaTek MT7981B
RAM: 256MiB
Flash: Winbond SPI-NAND 128 MiB
Switch: 1 WAN, 3 LAN (Gigabit) MediaTek MT7531
Buttons: Reset, Mesh
Power: DC 12V 1A
WiFi: MT7981B 2.4Ghz & 5.8Ghz

Led Layout from bottom to top:

    Power
    Mesh (RGB Led, user controllable, default set to OpenWrt Status)
    WLAN 2 GHz (user controllable)
    WAN (user controllable)
    LAN3
    LAN2
    LAN1
    WLAN 5 GHz (Not on front panel but blinks through enclosure,
               user controllable)

Buttons:

    Reset
    Mesh (user controllable, no default function)

Installation:

A. Through U-Boot menu:

 -  Prepare your connecting computer to use a static IP in
	network 192.168.1.0/24
 -  Power down the router and hold in the Reset button.
 -  While holding in the button power up the router again.
 -  Hold the button in for 10 seconds and then release.
 -  Use your browser to go to 192.168.1.1
 -  If you see a GUI allowing for flashing firmware then
	you got the right model.
 -  Upload the sysupgrade file.

Note: Recovery GUI can be used to recover from an incorrect
      firmware flash.

B. Through OpenWrt Dashboard:

    If your router comes with OpenWrt preinstalled
	(modified by the seller), you can easily upgrade
	by going to the dashboard (192.168.1.1) and then
	navigate to System -> Backup/Flash firmware,
	then flash the firmware

MAC Addresses were found in Factory partition:

offset 0x4 F8:5E:3C:xx:xx:aa --> Router Label -2
offset 0xa F8:5E:3C:xx:xx:bb --> Router Label -1
offset 0x24 F8:5E:3C:xx:xx:cc --> Router Label +1
offset 0x2a F8:5E:3C:xx:xx:yy --> printed on Router Label

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/19823
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 00:58:39 +01:00
Jörg Seitz
b21b019af4 mediatek: extract DTS include for zbt z8103ax
- Use .dtsi for old z8103ax featuring a 64M Nand
- Prepare .dtsi for model C of z8103ax featuring a 128M Nand

This .dtsi is supposed to match boards labeled as hardware
revision Z8103AX_V01. Model variant D of zbt-z8103ax appears
to use very same board.

DTS include does also

- set wifi mac addresses in &wifi section
- set eth mac addresses in &eth section
- set LAN switch mac addresses in &switch section

All of the above allows to get rid of 11_fix_wifi_mac script

Signed-off-by: Jörg Seitz <github.joeterminal@xoxy.net>
Link: https://github.com/openwrt/openwrt/pull/19823
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 00:58:39 +01:00
Aleksander Jan Bajkowski
f49b452cc0 airoha: replace patches with upstream version
Replace patches with version accepted upstream.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21333
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-03 00:02:46 +01:00