Commit graph

33642 commits

Author SHA1 Message Date
Rosen Penev
37010e1155 apm821xx: meraki-mr24: fix ubootenv definitions
Per the comments, this is not uboot,env but the redundant forms.

Placed under fixed-partition nodes in order to add status = "disabled".
The roots are needed for u-boot envtools to use.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16618
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-08 18:37:44 +01:00
Rosen Penev
26254408e3 apm821xx: mybooklive: fix ubootenv probe
With nvmem-layout, these probe errors go away.

Add status = "disabled" as the u-boot env driver can't handle redundant
environments properly. As a result, fw_printenv ends up not working
right.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16618
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-08 18:37:44 +01:00
Rosen Penev
45ba1351d6 apm821xx: wndr4700: fix uboot-env
With nvmem-layout, these probe errors go away.

Add status = "disabled" as the u-boot env driver can't handle redundant
environments properly. As a result, fw_printenv ends up not working
right.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16618
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-08 18:37:43 +01:00
Markus Stockhausen
9d839e6a46 realtek: dsa: drop redundant mac_config() logic
RTL930x and RTL931x basically share the same logic for mac_config().
No need to duplicate that logic in two functions and to call one
from the other.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21895
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:37:50 +01:00
Jonas Jelonek
eda2d44ebd realtek: pcs: rtl931x: drop unneeded cmu band read
There is still a stray call in setup_serdes to read the current CMU
band. The only effect is that the current band is printed to the log, the
value itself isn't used for anything further. Drop this since it's not
needed.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
31732b678e realtek: pcs: rtl931x: match function name with content
The function 'rtpcs_931x_sds_init_leq_dfe' was taken over mostly as-is
from the SDK. After looking at what it actually does (by seeing which
register are written and how they are used elsewhere), it becomes clear
that 'init' isn't the correct term to describe what it does. It sets the
LEQ and DFE parameters to baseline values (mostly 0) and turns off auto
mode, switching to manual LEQ/DFE and forcing those baseline values.
This is rather a reset to a known state instead of an initialization.
Name the function accordingly.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
adec06293c realtek: pcs: rtl931x: add some register comments
Add some comments to several register writes explaining what these
fields are. The information was extracted from the SDK. This allows to
understand much better what's going on there.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
b87db98aff realtek: pcs: rtl931x: config CMU before media
Currently, the CMU is configured after media specific settings have been
set. This seems to work however does not make that much sense. The
proper clock should be configured before the TX/RX channels are
configured. Thus, move the call to the CMU configuration above the media
handling.

While at it, handle the return code of the CMU config properly.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
459b456185 realtek: pcs: rtl931x: read chip specifics in early init
The SerDes setup for RTL931x relies on chip specifics in some cases,
Determining both usually requires some register operations. But we can
avoid to do this every time again and again since the information is
static anyway. Thus, move this to initialization for RTL93xx, only read
once and store it in the global control structure. Though not used for
RTL930x, it has the same registers and information.

While at it, give referenced defines a proper prefix.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
0af3177b4d realtek: pcs: rtl931x: drop chiptype 1 support
From the Realtek SDK we know that the chip type tell us whether a chip
is a normal chip or an engineering sample/testchip [1]. Such engineering
samples likely never reach any consumer device, only some initial
development boards. So far we haven't encountered any device with that,
thus the code paths handling this are practically dead and can hardly be
checked of they work properly. To focus on support for the devices we
actually have, drop support for such engineering samples/testchips. This
may be readded later if there's sufficient need for this.

[1] 3261cf2e61/sources/rtk-dms1250/system/drv/swcore/chip_probe.c (L345)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Jonas Jelonek
0c17d0e8a6 realtek: pcs: rtl931x: drop sequence in favor of function
Drop a register write sequence from the USXGMII setup for RTL931x in
favor of using a function that is already present. From the name, the
function initializes LEQ DFE. Though it's not yet clear what it exactly
does, this is already better then having a sequence with no explanation
somewhere in the code.

Apparently, when this code was added, the function wasn't present
but it's content was just added here as single usage.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:35:19 +01:00
Carlo Szelinsky
528c9259a7 kernel: net: pse-pd: backport PSE v6.13-v6.19
Backport the PSE-PD (Power Sourcing Equipment - Powered Device)
framework updates from Linux 6.13 through 6.19. This brings modern
PoE (Power over Ethernet) controller support to OpenWrt, enabling
userspace control of PSE hardware via ethtool.

Key features:
- Enhanced ethtool integration for PSE status and configuration
- Power domain support with budget evaluation strategies
- PSE event reporting via netlink
- Port priority management for power budget allocation
- New Si3474 PSE controller driver

Backported commits:

v6.13 core framework and TPS23881 improvements:
- 6e56a6d47a7f net: pse-pd: Add power limit check
- 0b567519d115 net: pse-pd: tps23881: Simplify function returns
- 4c2bab507eb7 net: pse-pd: tps23881: Use helpers to calculate bit offset
- f3cb3c7bea0c net: pse-pd: tps23881: Add missing configuration register
- 3e9dbfec4998 net: pse-pd: Split ethtool_get_status
  into multiple callbacks
- 4640a1f0d8f2 net: pse-pd: Remove is_enabled callback from drivers
- 7f076ce3f173 net: pse-pd: tps23881: Add power limit
  and measurement features
- 10276f3e1c7e net: pse-pd: Fix missing PI of_node description
- 5385f1e1923c net: pse-pd: Clean ethtool header of PSE structures

v6.17 power domains and event support:
- fa2f0454174c net: pse-pd: Introduce attached_phydev to pse control
- fc0e6db30941 net: pse-pd: Add support for reporting events
- f5e7aecaa4ef net: pse-pd: tps23881: Add support for PSE events
- 50f8b341d268 net: pse-pd: Add support for PSE power domains
- 1176978ed851 net: ethtool: Add support for power domains index
- c394e757dedd net: pse-pd: Add helper to report hw enable status
- ffef61d6d273 net: pse-pd: Add support for budget evaluation strategies
- 359754013e6a net: pse-pd: pd692x0: Add PSE PI priority feature
- 24a4e3a05dd0 net: pse-pd: pd692x0: Add controller and manager power
- 56cfc97635e9 net: pse-pd: tps23881: Add static port priority feature
- d12b3dc10609 net: pse-pd: pd692x0: reduce stack usage

v6.18 Si3474 driver and fixes:
- 1c67f9c54cdc net: pse-pd: pd692x0: Fix power budget leak
- 7ef353879f71 net: pse-pd: pd692x0: Skip power budget when undefined
- a2317231df4b net: pse-pd: Add Si3474 PSE controller driver

v6.19 maintenance and TPS23881B support:
- 2c95a756e0cf net: pse-pd: tps23881: Fix current measurement scaling
- f197902cd21a net: pse-pd: pd692x0: Replace __free macro
- 6fa1f8b64a47 net: pse-pd: pd692x0: Separate configuration parsing
- 8f3d044b34fe net: pse-pd: pd692x0: Preserve PSE configuration
- 4d07797faaa1 net: pse-pd: tps23881: Add support for TPS23881B

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/21810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:19:43 +01:00
Fil Dunsky
658e4adca4 mediatek: filogic: add support for Bazis AX3000WM
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
- SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND (Winbond W25N01GV)
 - RAM: 256 MiB (Nanya NT5CC128M16JR-EK)
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps MaxLinear GPY211C WAN, 1x10/100/1000 Mbps MT7981 LAN
 - USB 3.0 port
 - 2x buttons: Reset, Mesh
 - 3x LEDs on top panel (red, green, blue)
 - 3x PHY port LEDs (1 amber, 2 green)
 - Board version: WD830M V2.0
 - Power: 5 VDC, 3 A

UART: internal test points, 3V3 115200 8N1 (RX, TX, GND)

Interface	MAC			Algorithm
LAN (label)	1c:bf:ce:xx:xx:x1	0x4
WAN		1c:bf:ce:xx:xx:x2	0xa
WLAN 2.4G	1c:bf:ce:xx:xx:x3	0x2a
WLAN 5G		1c:bf:ce:xx:xx:x4	0x24

At the moment installation is possible via UART only since SSH root
is password protected.

Set a static ip on the ethernet interface of your PC:
(ip address: 192.168.1.2, subnet mask:255.255.255.0).
Boot into initramfs via TFTP:
```
setenv serverip 192.168.1.2
tftpboot 0x46000000 openwrt-mediatek-filogic-bazis_ax3000wm-initramfs-recovery.itb
bootm 0x46000000
```

Install kmod-mtd-rw and activate it:
```
apk update && apk add kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
```
Upload to the router and write OpenWrt BL2 and FIP bootloader:
```
mtd write openwrt-mediatek-filogic-bazis_ax3000wm-preloader.bin BL2
mtd write openwrt-mediatek-filogic-bazis_ax3000wm-bl31-uboot.fip FIP
```
Prepare ubi partition:
```
ubidetach -p /dev/mtd4
ubiformat /dev/mtd4 -y
ubiattach -p /dev/mtd4
```

Upgrade via luci web interface with sysupgrade file or by issuing a command:
```
sysupgrade -n openwrt-mediatek-filogic-bazis_ax3000wm-squashfs-sysupgrade.itb
```
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21813
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 22:25:47 +01:00
Michael Wagenhofer
6da2890c03 realtek: add support for Xikestor SKS8300-12E2T2X
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Add board support for the Xikestor SKS8300-12E2T2X switch.

Hardware specifications:
========================
 -Realtek RTL9302C SoC, 1x MIPS-34Kc, 800 MHz
 -512 MB DDR3 RAM
 -32 MB SPI-NOR Flash
 -12x 2.5GBASE-T Ports (RTL8224)
 -2x 10GBASE-T Ports (RTL8261)
 -2x 10G SPF+ Ports
 -Reset Button on the front panel
 -Power & SYS LED's
 -UART (115200 8N1) via RJ45

Flash instruction:
==================
 -Prepare TFTP server & connect to serial port
 -Connect your computer to one of the RJ45 ports
 -Power on and interrupt autoboot with Shift + A.
 -Use Shift + Q to drop from vendor CLI to U-Boot CLI.
 -Change U-Boot Bootcommand (needed for network functionality):
	> setenv bootcmd 'rtk network on; boota'
	> saveenv
 -Start network:
	> rtk network on
 -Set switch IP and TFTP server IP:
	> setenv ipaddr [IP-ADDRESS]
	> setenv serverip [IP-ADDRESS]
 -Load initramfs image from TFTP server:
	> tftpboot 0x82000000 [IMAGEFILE]
 -Boot with the downloaded image:
	> bootm 0x82000000
 -Backup the stock firmware if needed
 -Perform sysupgrade with the sysupgrade image (in Luci or Terminal via scp & sysupgrade)

Back to stock firmware:
=======================
 -In the Terminal enter:
	> fw_setenv bootcmd 'boota'
 -Write firmware with:
	> sysupgrade -F [IMAGEFILE]

Signed-off-by: Michael Wagenhofer <michael@wagenhofer.de>
Link: https://github.com/openwrt/openwrt/pull/21773
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 19:37:49 +01:00
Markus Stockhausen
dd7e88461e realtek: mdio: rename main mdio bus
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Looking at the Realtek mdio busses there are curently the following

root@OpenWrt:~# mdio
1b000000.switchcore:mdio-controller-mii
fixed-0
realtek-aux-mdio
realtek-serdes-mdio
rtldsa_mdio-0

The main mdio bus for the phys is named after the dts node it belongs
to (1b000000.switchcore:mdio-controller-mii). As it is attached to the
controller node it is even more confusing.

Align the naming to the other busses and use "realtek-mdio".

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21702
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:41:59 +01:00
Markus Stockhausen
27a2cbedf3 realtek: phy: drop internal RTL8218B firmware
The phy driver still uses the ancient unknown firmware file format
for the internal RTL8218B of the RTL838x. Get rid of that and
convert the initialization to the bare minimum.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21885
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:39:38 +01:00
John Audia
b4759469c9 kernel: bump 6.12 to 6.12.69
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.69

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:20:33 +01:00
Burak Aydos
50e7e5c80d lantiq: xrx200: handle EPROBE_DEFER for MAC address
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The xrx200 ethernet driver falls back to a random MAC address on any
error from of_get_ethdev_address(), including -EPROBE_DEFER. When the
MAC address comes from an nvmem layout driver (such as u-boot-env on
NAND), the nvmem cell may not be available yet at first probe attempt.

Fix this by propagating EPROBE_DEFER so the driver probe is deferred
until the nvmem cell becomes available.

Tested on Zyxel P-2812HNU-F1 (NAND, u-boot-env nvmem layout).

Signed-off-by: Burak Aydos <byhexadecimal@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 15:27:11 +01:00
Jan Hoffmann
e3be4654a1 realtek: pcs: rtl93xx: configure in-band AN advertisement
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Enabling and disabling in-band auto-negotation is already supported on
RTL93xx. However, so far the advertisement is left unchanged at the
default of 0x1a0 (full duplex + pause + asymmetric pause).

Instead, set the advertisement to reflect the current configuration for
1000Base-X and 2500Base-X. Nothing needs to be done for SGMII, as the
advertisement register is ignored in that case.

Testing shows that negotiation of flow control works for 1000Base-X and
2500Base-X (tested with RTL930x on both ends of the link).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/21869
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-06 10:23:43 +01:00
Jan Hoffmann
6dae444ee9 realtek: pcs: rtl93xx: implement restarting auto-negotiation
Add a new SerDes operation for restarting in-band negotiation including
an implemenation for RTL93xx, and call it from .pcs_an_restart.

This is a prerequisite for configuration of the in-band advertisement,
as changing it requires triggering a restart of auto-negotiation.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/21869
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-06 10:23:43 +01:00
Bjørn Mork
3972aeaf7c realtek: dsa: remove storm control
Commit 78bf3a5f44 ("realtek: dsa: Fix rate control initialization") enabled
code setting up the "storm control" feature. This casued a speed regression
on rtl838x, reducing the effective max speed per port from line rate to around
500 Mbits/s.

Storm control is a policy feature with a number of input parameters depending
on use case and environment.  It is not possible to define a meaningful static
policy in the driver. The problem isn't just the arbitrary limits in the
current code.  Such features require userspace interfaces.

Drop this code for now. It wasn't missed while it was disabled.

Cc: Sven Eckelmann <se@simonwunderlich.de>
Fixes: 78bf3a5f44 ("realtek: dsa: Fix rate control initialization")
Link: https://github.com/openwrt/openwrt/issues/21692
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-06 10:15:36 +01:00
George Moussalem
483d2f1756 qualcommax: ipq50xx: backport v6.20 patches
Replace the following pending patches which have now been merged in
kernel v6.20:
- arm64: dts: qcom: ipq5018: Remove tsens v1 fallback compatible
- clk: qcom: gcc-ipq5018: flag sleep clock as critical
- arm64: dts: qcom: ipq5018: Correct USB DWC3 wrapper interrupts

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21883
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-06 10:06:18 +01:00
Kenneth Kasilag
01fb4a6daa qualcommbe: update pwm patches and add missing symbol
Update PWM patch set to v20 which resolves some bugs related to the
duty cycle / frequency calculation; and add missing config symbol
CONFIG_PWM.

Fixes: #21727
Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/21889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-06 10:05:14 +01:00
Markus Stockhausen
336ffdf631 realtek: dsa: convert trailer tag hack into separate module
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
DSA tagging currently works with a tuned trailer tagging. That means:

- realtek target uses tag_trailer for tagging
- there is a patch for the trailer tagger to write the target port not
  as a bitfield but as an integer

Make the tagging independent from upstream and hacky patches by providing
a new downstream driver. This can be aligned easier for future development.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21815
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-05 11:45:51 +01:00
Markus Stockhausen
fb5aa0485a realtek: dsa: make use of device_get_match_data()
The SoC specific configuration structure is currently manually
assigned depending on the family_id. This will be removed in
the future. Make use of device_get_match_data() instead.

While we are here rename the structure prefix.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21866
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-05 11:40:24 +01:00
Bjørn Mork
47ce4d8a71 realtek: dsa: rtl838x: drop redundant SMI_GLB_CTRL accesses
Bit 15 of the rtl838x SMI_GLB_CTRL register is set early during mdio reset
and never cleared.  There is no need to set it again.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21868
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-05 11:38:13 +01:00
Bjørn Mork
054785b161 realtek: mdio: rtl838x: re-enable phy control via SoC
Commit 17f12695d0 ("realtek: mdio: rtl838x: activate combo PHY media detection")
dropped setting bit 15 of the SMI_GLB_CTRL register without any explanation.  This
broke the Netgear GS108Tv3, causing phy patching to fail:

 Firmware loaded. Size 1184, magic: 83808380
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: patch
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: package not ready for patch.
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:0f: probe with driver Realtek RTL8218B (internal) failed with error -5

None of the internal phys was able to detect a link after this error.

Some rtl8380 devices, like the Zyxel GS1900-10HP A1, were not affected by the bug
because their boot loader always sets bit 15. The bug could also be worked around
on affected devices by running "rtk network on" before booting OpenWrt, setting
bit 15 as a side effect.

Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: Robert Marko <robimarko@gmail.com>
Fixes: 17f12695d0 ("realtek: mdio: rtl838x: activate combo PHY media detection")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21868
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-05 11:38:13 +01:00
st7105
e94d4f2022 mediatek: filogic: increase flash speed on Netcore N60 Pro
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
This commit increases the SPI bus frequency from 20 to 52 MHz. Reduces boot
time by 2s. Below is a performance comparison.

spi-max-frequency = <20000000>
> time dd if=/dev/mtd4 of=/dev/null bs=10M count=1
> 1+0 records in
> 1+0 records out
> real    0m 1.86s
> user    0m 0.00s
> sys     0m 0.28s

spi-max-frequency = <52000000>
> time dd if=/dev/mtd4 of=/dev/null bs=10M count=1
> 1+0 records in
> 1+0 records out
> real    0m 1.04s
> user    0m 0.00s
> sys     0m 0.27s

Signed-off-by: st7105 <st7105@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21802
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-05 00:20:01 +01:00
Markus Stockhausen
78a0ef2389 realtek: phy: drop last soc_info/family usage
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The internal RTL8218B gets detected cleanly. No need for
additional checks of the bus address or the SoC type.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21857
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 23:52:29 +01:00
Jonas Jelonek
38803fc110 realtek: pcs: rtl930x: add standalone XSGMII setup
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Add everything that's needed to have a standalone setup of the XSGMII
mode without having to rely on previous U-boot setup. This includes
patch sequences for the SerDes and extensions of symbol error reset and
reading.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 01:08:25 +01:00
Jonas Jelonek
0d2d9ecb7f realtek: pcs: rtl93xx: handle XSGMII autoneg
The XSGMII mode is special in several regards. The inband
autonegotiation for this mode is called 'XSG N-way'. It is controlled
using different bits and location, and using XSG operations.

Add support for this by enhancing the set_autoneg implementation shared
by RTL930x and RTL931x. This can stay shared since it works the same for
both variants.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 01:08:25 +01:00
Jonas Jelonek
fb23888376 realtek: pcs: make set_autoneg a SerDes operation
Instead of having all kinds of SerDes-related operations in the global
pcs config structure, there's now a SerDes ops structure which is
intended to cover and separate this.

Move the set_autoneg hook to the SerDes ops to adhere to this desired
separation. Calling the operation is further encapsulated with a small
convenience helper.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 01:08:25 +01:00
Anton Danilov
31f30f5a6c mediatek: add Motorcomm PHY support to Cudy AP3000 v1
Newer Cudy AP3000 v1 routers feature a Motorcomm YT8821 PHY
instead of the Realtek PHY [1]. Support for the YT8821
was recently introduced for the Cudy WR3000H router [2].
On the AP3000, the changes allow the PHY to be autodetected.

[1]: https://forum.openwrt.org/t/cudy-ap3000-v1-indoor-wan-motorcomm-yt8821-support/245491
[2]: https://github.com/openwrt/openwrt/pull/21399

Signed-off-by: Anton Danilov <frimen.c@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 00:58:22 +01:00
Shiji Yang
43068360e6 kernel: mtd: limit Macronix lock feature to MX25L6405D only
Though most Macronix Flash support the lock feature, the generic lock
implementation is not fully compatible with the Macronix series Flash.
Enabling the lock feature globally is unsafe. These hack patches are
used to unlock the Flash of ubnt devices on the ath79 target. Rework
these patches and move it to the ath79 target to prevent the potential
risk.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21754
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 00:55:50 +01:00
Rosen Penev
618f741494 treewide: remove of_platform.h include
This header is deprecated and typically platform_device.h should be
used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21164
[Adapted the lantiq patches a bit]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 00:50:06 +01:00
Rongzeng Cai
3a795bd100 kernel: mtd: spinand: add support for SkyHigh S35ML-3
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
This introduces support for the SkyHigh S35ML-3 series SPI NAND flash
devices by importing two key patches:
 - 430-v6.14-mtd-spinand-Introduce-a-way-to-avoid-raw-access.patch
 - 431-v6.14-mtd-spinand-Add-support-for-SkyHigh-S35ML-3-family.patch

Additionally, refresh all existing patches.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Rongzeng Cai <cairongzeng@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21808
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-04 00:09:22 +01:00
Linus Walleij
eb0a1a3a89 kernel: Add necessary CONFIG_MTD_SPLIT config option
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Buils break without this new config, mea culpa.

Link: https://github.com/openwrt/openwrt/pull/21855
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-03 18:25:10 +01:00
Linus Walleij
c579e1d04c gemini: sl93512r: override SL93512R partitions for firmware
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

All reference design-based machines are now converted and we can
drop the legacy set-up code.

It turns out that the reference design also uses the flash layout
with a 3072KB kernel so augment the sysupgrade to do the right
thing also here.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-03 13:33:12 +01:00
Linus Walleij
81215f55e2 gemini: sq201: override SQ201 partitions for firmware
This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-03 13:33:12 +01:00
Linus Walleij
387752dc76 gemini: override IB-4220-B partitions for firmware
To optimize the flash usage and to make firmware upgrades
simpler, catenate the three firmware partitions "Kern",
"Ramdisk" and "Application" into one, and use all of this
for the combined MTD-splitted kernel+rootfs.

This works fine as long as the kernel is placed in the
beginning of this firmware partition and we leave the
RedBoot partition as is, so the boot loader still can load
the kernel from the first two RedBoot partitions.

Using the RedBoot partitions "as is" can be considered
harmful, because when you flash to a RedBoot partition the
file size is used for downsizing of the partition and make
firmware upgrades fail if they are larger than the RedBoot
partition size after flashing, despite there is actually
flash there. So overriding with fixed partitions is just
generally a good idea.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-03 13:33:12 +01:00
Linus Walleij
5ac8f14ccb kernel: mtdsplit: create executable prolog splitter
The problem is the following: we have three fixed partitions
in a RedBoot partition for kernel, initrd and rootfs. On the
surface this looks good.

But we have little flash and want to use it efficiently. We want
to use the OpenWrt "firmware" partition scheme where the kernel,
initramfs and sqashfs+jffs2 rootfs is appended, leaving maximum
space for a writeable rootfs.

To do this we will override the existing RedBoot partition table
with one that merges the three separate partitions into one
"firmware" partition.

RedBoot is still booting the system. It still needs to read the
first two parts "as if" these were the kernel and initrd. This
works fine, because the kernel still comes first.

We already have hacks in place to merge the two kernel and initrd
into one binary image and execute it. This is done by prepending
a "prolog" to the kernel that does the necessary copying in
memory and then jumps to execute the kernel.

Since this "prolog" copying routine is just 92 bytes but has 512
bytes allocated, we can trivially create a firmware format that
can be used for splitting the image into kernel and rootfs
using a tagging scheme that can be done directly by scripting
so we don't need any special binary programs.

This splitter implements that idea.

This will be used on the Gemini platform and was tested on the
Raidsonic IB-4220-B.

Link: https://github.com/openwrt/openwrt/pull/21820
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-03 13:33:12 +01:00
Markus Stockhausen
428c0c3635 realtek: eth: define hardware receive rings in config
Do not derive the number of hardware receive rings from the SoC
family. Instead add the information to the configuration
structure. Make use of it during ethernet driver probing.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21706
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-03 10:00:07 +01:00
Mikhail Zhilkin
2651a6ced9 mediatek: routerich be7200: fix usb issue
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
This commit fixes non-working USB port:
---
[    5.294036] xhci-mtk 11200000.usb: error -EPERM: Failed to get supply 'vbus'
[    5.301163] xhci-mtk 11200000.usb: error -EPERM: Failed to get regulators
[    5.307938] xhci-mtk 11200000.usb: probe with driver xhci-mtk failed with error -1
---

While testing the USB power on/off functionality during the previous
commit, I didn't sufficiently test the actual operation of the USB
devices.

Fixes: ff5e66a920 ("mediatek: add support for Routerich BE7200")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21795
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-03 00:33:24 +01:00
Jonas Jelonek
6adcd5fa3b realtek: eth: rtl931x: reduce logging of special packet trap
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
For packets trapped to the CPU for a special reason (not normal
forward), the RTL931x tag decoding always print a log message with level
INFO. This is not needed and just spams the log, e.g. when LLDP packets
are running through the network, each of them causes a log message.

Make that a debug message instead of an info message. We can keep it,
just change when it's printed.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21844
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 21:54:56 +01:00
Markus Stockhausen
c1a9e35a77 realtek: drop legacy I/O functions
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Remove the unneeded sw_xxx() macros.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00
Markus Stockhausen
d76eb4113b realtek: mdio: convert RTL93xx reset to regmap
Make use of regmap in the RTL93xx reset functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00
Markus Stockhausen
7d222e69f7 realtek: mdio: convert RTL83xx reset to regmap
Make use of regmap in RTL83xx reset functions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00
Markus Stockhausen
1c0ffd816b realtek: mdio: convert debug output to regmap
Some straight forward conversion ...

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00
Markus Stockhausen
9362d6222b realtek: mdio: convert RTL931x I/O to regmap
Drop legacy sw_xxx() macros for RTL931x devices. While we are here
reorganize the access and avoid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00
Markus Stockhausen
9eeb7fe594 realtek: mdio: convert RTL930x I/O to regmap
Drop legacy sw_xxx() macros for RTL930x devices. While we are here
reorganize the access and avoid masked access where possible. So the
code is easier to read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21824
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-02 13:57:19 +01:00