Commit Graph

65395 Commits

Author SHA1 Message Date
Christian Marangi
08a616b216
generic: backport support for Aeonsemi AS21xxx PHY
Backport support for Aeonsemi AS121xxx PHY. The PHY require dedicated
firmware to be loaded to correctly work and support a big family of
Aeonsemi PHY that provide from 1G to 10G speed.

Automatically refresh all affected patch and file (rtl PHY).

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-09-03 00:58:48 +02:00
Christian Marangi
4f34c4c453
firmware: Add support for Aeonsemi AS21xxx firmware
Add support for Aeonsemi AS21xxx firmware blob. Firmware has been
submitted and accepted to linux-firmware. Current version is 1.8.2.

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-09-03 00:58:47 +02:00
Christian Marangi
a713260966
airoha: replace thermal patch with upstream version
Replace thermal patch with upstream version. The thermal maintainer
reported that the sysfs entry are considered deprecated and that slope
and offset should be handled internally to the driver.

Link: https://github.com/openwrt/openwrt/pull/19816
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-09-03 00:58:47 +02:00
Jonas Jelonek
b082f9f60e realtek: fix model for TP-Link TL-ST1008F v2.0
Fix the model name in DTS compatible, Makefiles and board scripts by
using dash instead of comma or underscore. This aligns it with other
examples in OpenWrt and makes in consistent in all places where the
board model is used.

'tplink,tl-st1008f,v2' --> 'tplink,tl-st1008f-v2'
'tplink,tl-st1008f_v2' --> 'tplink,tl-st1008f-v2'

Fixes: 39b9b491bb ("realtek: add support for TP-Link TL-ST1008F v2.0")
Fixes: #19930
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19934
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-03 00:51:49 +02:00
Hauke Mehrtens
c589fb7baf kernel: Fix kernel regression in local-broadcast routes
Backport a patch from upstream kernel 6.17-rc4 which fixes a regression
introduced in the latest stable kernel versions.

This is already in the Linus stable queues for the next minor kernel
updates.

Fixes: 1c92e468d5 ("kernel: bump 6.6 to 6.6.103")
Fixes: f39c7e103f ("kernel: bump 6.12 to 6.12.43")
Reported-by: Goetz Goerisch <ggoerisch@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-02 09:59:39 +02:00
Oldřich Jedlička
41aceb2de8 wifi-scripts: ucode: print unknown ssid as unknown
Currently it is printed as "null" (including quotes). Display it the same
as old iwinfo as unknown (no quotes).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2025-09-02 09:48:35 +02:00
Oldřich Jedlička
1756dddb9f wifi-scripts: ucode: fix dynamic_vlan value handling
The dynamic_vlan has values 0 (disabled), 1 (optional) and 2 (required).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2025-09-02 09:33:19 +02:00
Oldřich Jedlička
2146f5c31f wifi-scripts: ucode: set default wildcard mac for wifi-station
When creating the PSK file, the old script sets `mac` to
`00:00:00:00:00:00` when `mac` is not specified (see [here][1]),
creating hostapd configuration lines like:

  vlanid=10 00:00:00:00:00:00 MyStrongPassword

That matches any MAC address (a wildcard). The `ucode` script alternative
misses the default, so set it.

[1]: 9c26d14489/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh (L428)

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-02 09:31:56 +02:00
Markus Stockhausen
a8e3bff523 realtek: convert access to RTL931x "even CMU" serdes pages
Currently the calculation for the CMU (even) SerDes works similar
to this pseudo code.

analog_backend_serdes = get_analog_serdes(frontend_serdes);
even_backend_serdes = analog_backend_serdes & ~1;
write_to(even_backend_serdes);

Because of the SerDes layout and frontend/backend mapping this can
be swapped to the following order with the same resulting Serdes.

even_frontend_serdes = frontend_serdes ~1;
analog_backend_serdes = get_analog_serdes(even_frontend_serdes);
write_to(analog_backed_serdes);

In the later example the frontend/backend mapping code is already
in our new functions. So swap the calculation logic and use the
new access functions. This allows to finally drop the old access
functions without mapping.

From now on all RTL931x SerDes functions will use a consistent
frontend view.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19873
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-02 00:51:43 +02:00
Markus Stockhausen
207ab9c36a realtek: convert access to RTL931x "digital 2" serdes pages
The RTL931x has 14 frontend and at least 26 backend serdes. Currently
the programming functions always need to determine the right backend
serdes from the given frontend serdes on their own. We plan to provide
a consistent serdes mapping to all callers.

As the third step make use of these new functions whenever we want to
access the "digital 2" pages. The pages are mapped starting at 0x200.
So the function conversion is as simple as this:

Old:
dsds = (sds - 1) * 2;
rtmdio_931x_read_sds_phy(dsds + 1, page, ...)

New:
rtmdio_931x_read_sds_phy_new(sds, page + 0x200, ...)

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19873
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-02 00:51:43 +02:00
Markus Stockhausen
6802cd7f15 realtek: adapt RTl931x "digital 2" serdes page calculation
The more we step down into the SerDes deeps the more confusing it
gets. Nevertheless it is not to late to fix a wrong assumption.
Until now it seemed as if the frontend/backend SerDes mapping is
totally without intersection. This is not true.

The backend SerDes mapping is also dependent on the mode. Especially
the proprietary Realtek XSGMII mode stands out from all other
mappings. So fix the descriptions and the calculation of the third
page package (digital 2 aka XSGMII 2).

As it was not yet used it had no impact.

Fixes: a4cbb44c1b ("realtek: convert access to RTL931x analog serdes pages")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19873
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-02 00:51:43 +02:00
Markus Stockhausen
4063d90400 realtek: convert access to RTL931x "digital 1" serdes pages
The RTL931x has 14 frontend and at least 26 backend serdes. Currently
the programming functions always need to determine the right backend
serdes from the given frontend serdes on their own. We plan to provide
a consistent serdes mapping to all callers.

As the second step make use of these new functions whenever we
want to access the digital 1 pages. The pages are mapped starting
at 0x100. So the function conversion is as simple as this:

Old:
dsds = (sds - 1) * 2;
rtmdio_931x_read_sds_phy(dsds, page, ...)

New:
rtmdio_931x_read_sds_phy_new(sds, page + 0x100, ...)

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19873
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-02 00:51:43 +02:00
Felix Fietkau
8b2cff96fe bridger: update to Git HEAD (2025-09-01)
7a86ef53075a fix running bridger with stderr debug output
f6afcb04f2ef nl: add missing dump flag for RTM_GETTFILTER

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-09-01 19:40:24 +02:00
Markus Stockhausen
0008b4ed07 realtek: RTL838x: remove artifical mdio delays
For some reason 3 of the 4 mdio access functions contain an
artifical delay of 10ms. While it might have been part of
older Realtek SDKs it can no longer be found in current ones.
Remove the delays.

While we are here remove the pre-access bus ready checks.
It is sufficient to run them after the command start. If
anything fails the caller will get an error. This is the
same behaviour as for the other targets.

Finally cleanup the error handling. Something like this makes
no sense at all.

  err = rtmdio_838x_smi_wait_op(100000);
  if (err)
    goto errout;
  err = 0;
errout:

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19901
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-09-01 10:48:09 +02:00
Goetz Goerisch
1c92e468d5 kernel: bump 6.6 to 6.6.103
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.103

removed upstream patches:
generic-backport/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch [1]
generic-backport/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch [2]

update patch to upstream function change
bcm53x/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
changed function xhci_disable_and_free_slot() upstream [3]

All other patches auto-refreshed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=93879b3ba967a33834727abf34ea08764339fe0b
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=c66caf21b1d0a0847adc34d368e3f6753a2cbd53
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host?h=v6.6.103&id=e600de541c37f97482fea2a7a26f186141e7ddea

Suggested-by: Leo Barsky <leobrsky@proton.me>
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-01 02:05:24 +02:00
Felix Fietkau
cbfbac761a perf: fix disabling BUILD_BPF_SKEL
The makefile uses ifdef to check, so the variable needs to be empty

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-31 23:49:13 +02:00
Felix Fietkau
58a29752b1 perf: set NO_JEVENTS=1 to fix build
Needed for disabling the python requirement

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-31 23:49:12 +02:00
Felix Fietkau
f7d4036555 kernel: mtk_eth_soc: fix tx vlan tag for llc packets
When sending llc packets with vlan tx offload, the hardware fails to
actually add the tag. Deal with this by fixing it up in software.

Fixes: https://github.com/openwrt/openwrt/issues/19916
Reported-by: Thibaut VARENE <hacks@slashdirt.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-31 20:29:45 +02:00
Rosen Penev
e1564c4fab treewide: add const to struct of_device_id
Most drivers have this as const. Especially upstream in the kernel.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19911
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-31 19:21:36 +02:00
Daniel Golle
e181fee6a5 mediatek: backport patches fixing thermal on MT7988
Import upstream patches fixing issues with unreliable temperature
reading on some batches of the MediaTek MT7988 SoCs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-08-31 13:23:31 +01:00
Felix Baumann
cee13fc0a5 realtek: correct whitespace in hp dts files
Make whitespace consistent, replace 8 spaces by tab

Fixes: 502b2f4ee5 ("realtek: switch HP-1920-48G to new shared gpio driver")
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19887
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-31 13:19:50 +02:00
John Audia
b92bab633f kernel: bump 6.12 to 6.12.44
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.44

Removed upstreamed:
  generic-backport/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch[1]
  imx/patches-6.12/506-pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.44&id=e42ac65e257b875614dd8f435b026a3e379e92e6
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.44&id=90fa5884bc8f52cbf493492e32978c723c85e6ab

Build system: x86/64 (Intel N150 based)
Build-tested: flogic/gl.inet-gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
Run-tested: flogic/gl.inet-gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-31 13:07:49 +02:00
John Audia
be88c224fa pcre2: bump to 10.46
Update to latest version.

Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.46/ChangeLog

Tested with snort3, no regressions.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (Intel N150 based box)

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19904
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-08-31 12:23:24 +02:00
Felix Fietkau
16ba3fc379 wifi-scripts: ucode: fix starting without wpa_supplicant or hostapd
Fixes: 79f8a83eb9 ("wifi-scripts: ucode: unconditionally call hostapd/supplicant setup")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-30 18:45:01 +02:00
Damien Dejean
886382ba25 realtek: add 2500base-x patch sequence.
Adds the SerDes patch sequence for 2500base-x to improve the support of
devices with minimal bootloaders (like BootBase). The sequences were
imported from [1] for even lanes and [2] for odd lanes.

[1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641
[2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664

Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19834
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 01:12:05 +02:00
Damien Dejean
6bb1b7cbbf realtek: allow different serdes patch sequences
Prepare the SerDes patch function to allow different patch sequences
depending on the phy mode. Patches are required to allow devices with a
lightweight bootloader (one that doesn't have a "rtk network init"
command) to use the serdes. Some modes required a different patch
sequence than the one currently used.

Signed-off-by: Damien Dejean <dam.dejean@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19834
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 01:12:05 +02:00
Markus Stockhausen
a43330799b generic: fix c45 soft reset for RTL8221B
The addition of the soft_reset() function to the RTL8221B PHYs
missed to take care of C22/C45 standalone PHY versions. Especially
on RTL930x switch devices with these PHY the reset fails for the
C45 operation mode. This comes from the fact that the mdio bus
disables C22 read/writes when being set to C45.

Upstream has gained a proper C45 reset function. Use it for the
C45 PHY models.

Fixes: 7e3284eef7 ("generic: use genphy_soft_reset for RealTek 2.5G PHYs")

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19843
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:50:29 +02:00
Markus Stockhausen
a3d681d7f5 realtek: XGS1210-12: convert RTL8226 PHYs to 2500base-x
We reached the point of no return. Upstream has gained the final
bits for the RTL8226 PHYs. That means.

- RTL8226 MAC side behaves like RTL8221(B)
- It's serdes no longer uses proprietary HSGMII (2.5G SGMII)
- Instead it dynamically switches between SGMII and 2500base-x

This (partly) solves one of the central henn/egg problems of the
Realtek target. To change the MAC/PHY interface mode both sides
need to have all bits in place to do so. But where to start if
so much needs to be done?

Now the PHY side has created facts and it mitigates a lot of
problems. All downstream HSGMII patches and coding can be dropped
in the future.

For now only adapt the only DTS that still maps PHYs to HSGMII.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19843
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:50:29 +02:00
Markus Stockhausen
1673390905 generic: backport upstream v6.18 Realtek PHY patch
3a752e678 net: phy: realtek: enable serdes option mode for RTL8226-CG

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19843
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:50:29 +02:00
Markus Stockhausen
92a3dd9a96 generic: backport upstream v6.18 Realtek PHY patch
34167f1a0 net: phy: realtek: convert RTL8226-CG to c45 only

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19843
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:50:29 +02:00
Markus Stockhausen
d5ad59ffb1 realtek: phy: add RTL8214x/RTL8218x patch helper
The patching sequence of the RTL8214x/8218x is very similar.
Especially the preparation for readiness is always the same.
Provide a common helper to improve readability.

While we are here clean up the changed functions

- Sort variable definitions according to upstream
- simplify some messages

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:18:18 +02:00
Markus Stockhausen
6e416149d7 realtek: phy: drop use of mdio package functions
Our phy driver can handle some multiport phys (e.g. RTL8218B
or RTL8214FC). To access arbitrary ports some package access
functions have been defined. These were implemented in the
mdio bus with poor knowledge about the phy/mdio dependencies.
So they add unneeded complexity to the bus and the phy driver
must access these external functions directly.

Provide a new helper get_package_phy() that can derive any
phy device in a package from a given phy of that package.
Make use of this local helper and cut the mdio dependency.

While we refactor several firmware patching functions rename
the loop variables to "port" to better indicate what we are
working on.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:18:18 +02:00
Markus Stockhausen
fa1b362ae9 realtek: simplify RTL8214FC handling
Now that we have a get_base_phy() function a lot code of the RTL8214FC
handling can be cleaned up. To name a few:

- use phy_read/phy_write instead of mdiobus functions or the even worse
  phy_package_..._paged() helpers
- replace messages with phydev_info()
- remove if/else statements around copper/fibre handling

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:18:18 +02:00
Markus Stockhausen
a1043fda8b realtek: phy: late phy package patching
Currently phy packages (like RTL8214x/RTL8218x) are patched and
initialized as soon as the first phy of the package is found.
In this situation the shared structure is not finalized because
devm_phy_package_join() has only been called for the first phy.
This is no issue as the patching directly hammers the bus addresses
for the follow-up phys.

In the future we want to simplify the package handling and allow
to access all phy_device structures from only one phy_device of
the package. With this we can use normal phy_read/phy_write.

Switch the probing logic to "late patching". With this we will
initialize the firmware of the package when the last phy of the
package has been found and thus the shared structure is complete.

Provide get_base_phy() as the first package helper that allows
to determine the first phy of the package from any other phy.

While we are here drop the shared structure that only repeats the
phy name and has no other use.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19810
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-30 00:18:18 +02:00
Felix Fietkau
dcf6e9b0ed wifi-scripts: ucode: add missing fields to spec
Silence warnings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 19:26:19 +02:00
Felix Fietkau
79f8a83eb9 wifi-scripts: ucode: unconditionally call hostapd/supplicant setup
Ensure that interfaces can be deleted properly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 16:54:37 +02:00
Felix Fietkau
e116b423b8 wifi-scripts: default to sae_pwe=2 in client mode
Improves compatibility

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-29 15:10:37 +02:00
Felix Fietkau
a04b5fdcb6 mac80211: add support for MLD AP client probing
Select a link for outgoing probe packets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-28 22:09:23 +02:00
Hauke Mehrtens
34e1092e88 kernel: bump 6.6 to 6.6.102
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.102

Added backport to fix ipv6 breakage with the 6.12.42 release:
generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch[1]

All patches auto-refreshed.

1. https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1@honor.com

Link: https://github.com/openwrt/openwrt/pull/19876
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:12:10 +02:00
Hauke Mehrtens
9fbbcd16f7 kernel: bump 6.6 to 6.6.101
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.101
All patches auto-refreshed.

Manually modified:
   backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch

Link: https://github.com/openwrt/openwrt/pull/19876
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:12:10 +02:00
Harshal Gohel
cb4603688b realtek: rtl930x: Add support for Plasma Cloud PSX10 Switch
The Plasma Cloud PSX10 Switch is a 8 + 2 port multi-GBit switch with
8x 10/100/1000/2500BaseT Ethernet ports and 2x SFP+ module slot.

Hardware:

- RTL9302C SoC
- Macronix MX25L25645G (32MB flash)
- Winbond W632GU6NB-12 (256MB DDR3 SDRAM - only 128 MB configured*)
- 2x RTL8224 4x 10m/100m/1/2.5 Gigabit PHY
- SFP+ 2x 10GBit slot
- IC+ IP8008 POE+ PSE controller

The switch is powered by 54 Volts 2.77A barrel connector. The internal TTL
serial connector can be used to access the terminal. Pins from 1: TX RX
(unused) GND.  Serial connection is via 115200 baud, 8N1.

A reset button is accessible through a hole in the front panel.

*) Only 128 MB of RAM are currently configured because there were
infrequent random memory corruptions detected when using memtester with a
256 MB DT configuration. This could also be reproduced with RTLSDK.

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

* The device can be flashed by using sysupgrade command. Either from the
  original vendor firmware or using an initramfs (see "Debug")
* Connect serial as per the layout above. Connection parameters: 115200 8N1
* The image must be copied using scp to /tmp of the device

      scp openwrt-realtek-rtl930x-plasmacloud_psx10-squashfs-sysupgrade.bin root@[IP address of the device]:/tmp/

* start sysupgrade without saving the original vendor configuration

      sysupgrade -n /tmp/openwrt-realtek-rtl930x-plasmacloud_psx10-squashfs-sysupgrade.bin

Installation via u-boot
-----------------------

If you have an TFTP server connected to the switch, it is possible to
directly install the device using the factory image from u-boot

    # setup networking and IP of TFP server
    rtk network on
    setenv ipaddr 10.100.100.99
    setenv serverip 10.100.100.20

    # get factory image
    tftp 0x84000000 factory.bin

    # erase firmware partitions
    sf probe 0
    sf erase 0x100000 0x01f00000

    # write firmware to both partitions
    sf write ${fileaddr} 0x100000 ${filesize}
    sf write ${fileaddr} 0x1080000 ${filesize}

    # adjust the boot commands
    setenv bootargs "mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)"
    setenv bootcmd "rtk init; bootm 0xb5080000"

    # restart
    reset

Debug
-----

* Connect serial as per the layout above. Connection parameters: 115200 8N1.
* A tftp server is required, tftpd-hpa works well.
* Power the device, at U-Boot start rapidly hit Esc key to stop autoboot
* Enable network:

      rtk network on

* Change ip address of device:

      setenv ipaddr 192.168.1.6

* Download initramfs from TFTP server:

      tftpboot 0x84000000 192.168.1.111:openwrt-realtek-rtl930x-plasmacloud_psx10-initramfs-kernel.bin

* Boot loaded file:

      bootm 0x84000000

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:07:57 +02:00
Harshal Gohel
e677da90d1 realtek: rtl930x: Add support for Plasma Cloud PSX8 Switch
The Plasma Cloud PSX8 Switch is a 8 port multi-GBit switch with
8x 10/100/1000/2500BaseT Ethernet ports.

Hardware:

- RTL9302C SoC
- Macronix MX25L25645G (32MB flash)
- Winbond W632GU6NB-12 (256MB DDR3 SDRAM - only 128 MB configured*)
- 2x RTL8224 4x 10m/100m/1/2.5 Gigabit PHY
- IC+ IP8008 POE+ PSE controller

The switch is powered by 54 Volts 2.77A barrel connector. The internal TTL
serial connector can be used to access the terminal. Pins from 1: TX RX
(unused) GND.  Serial connection is via 115200 baud, 8N1.

A reset button is accessible through a hole in the front panel.

*) Only 128 MB of RAM are currently configured because there were
infrequent random memory corruptions detected when using memtester with a
256 MB DT configuration. This could also be reproduced with RTLSDK.

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

* The device can be flashed by using sysupgrade command. Either from the
  original vendor firmware or using an initramfs (see "Debug")
* Connect serial as per the layout above. Connection parameters: 115200 8N1
* The image must be copied using scp to /tmp of the device

      scp openwrt-realtek-rtl930x-plasmacloud_psx8-squashfs-sysupgrade.bin root@[IP address of the device]:/tmp/

* start sysupgrade without saving the original vendor configuration

      sysupgrade -n /tmp/openwrt-realtek-rtl930x-plasmacloud_psx8-squashfs-sysupgrade.bin

Installation via u-boot
-----------------------

If you have an TFTP server connected to the switch, it is possible to
directly install the device using the factory image from u-boot

    # setup networking and IP of TFP server
    rtk network on
    setenv ipaddr 10.100.100.99
    setenv serverip 10.100.100.20

    # get factory image
    tftp 0x84000000 factory.bin

    # erase firmware partitions
    sf probe 0
    sf erase 0x100000 0x01f00000

    # write firmware to both partitions
    sf write ${fileaddr} 0x100000 ${filesize}
    sf write ${fileaddr} 0x1080000 ${filesize}

    # adjust the boot commands
    setenv bootargs "mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)"
    setenv bootcmd "rtk init; bootm 0xb5080000"

    # restart
    reset

Debug
-----

* Connect serial as per the layout above. Connection parameters: 115200 8N1.
* A tftp server is required, tftpd-hpa works well.
* Power the device, at U-Boot start rapidly hit Esc key to stop autoboot
* Enable network:

      rtk network on

* Change ip address of device:

      setenv ipaddr 192.168.1.6

* Download initramfs from TFTP server:

      tftpboot 0x84000000 192.168.1.111:openwrt-realtek-rtl930x-plasmacloud_psx8-initramfs-kernel.bin

* Boot loaded file:

      bootm 0x84000000

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:07:57 +02:00
Harshal Gohel
7812d867b4 realtek: Introduce Plasma Cloud sysupgrade helper
Plasma Cloud devices use a dual-firmware regions/slots boot mechanism. On
APs, the u-boot is "intelligent" and checks the NOR/NAND partitions (kernel
+ rootfs) for corruption via "datachk". If validation fails, the bootloader
automatically switches to the fallback partition.

On Realtek-based switches, this "datachk" helper is not available.
However, the bootloader still supports two firmware regions/slots.

When flashing a new image, the "inactive" partition is written instead of
overwriting the active one. If no "inactive" partition exists but
"firmware1" is present, the bootloader always treats "firmware1" as
fallback. Only after a successful flash is the `u-boot-env` updated to
select the newly written partition.

On reboot, the bootloader loads the kernel from the new partition and
passes `mtdparts` information as the kernel cmdline. The Plasma Cloud
switch device tree does not override this with a `bootargs` property, so
the active partition layout is honored from cmdline.

Since offsets, sizes, and names of partitions match between the device tree
and cmdline (except the inactive slot), properties and nodes such as
`nvmem-cells` or `compatible` remain fully usable.

This mechanism also allows switching back to the old firmware slot.  For
example, if `firmware1` is currently active (`/proc/mtd` shows it), it can
be switched to slot 2 using:

    . /lib/upgrade/upgrade_dualboot.sh
    set_boot_part 2
    reboot

Firmware upgrades use standard `sysupgrade` tarballs, chosen for
compatibility with vendor images. In theory, one can switch between vendor
and OpenWrt with:

    sysupgrade -n /tmp/*-squashfs-sysupgrade.bin

Note: configuration files must not be preserved, as they are not compatible
with vanilla OpenWrt.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:07:57 +02:00
Harshal Gohel
ebb342af44 realtek: rtl930x: Enable parsing of u-boot nvmem layouts
To be able to read out the ethaddr from the u-boot environment for MAC
address configuration, it is required to also enable the NVMEM layout
parsing code for the U-Boot env layout.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:07:57 +02:00
Harshal Gohel
5880f345ba realtek: Fix nvmem support for ethernet device
The function of_get_mac_address is not taking care of evaluation the nvmem
address before trying to read out the mac-address properties. The driver
must check whether the return code is -EPROBE_DEFER and stop the probing
process in that case. If the nvmem-cell related driver code finished, the
probe can be redone ad the correct mac-address will appear for the device.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-08-28 21:07:57 +02:00
Igor Dyatlov
664424aaeb ath79: add calibtation variant for Xiaomi AIoT AC2350
Add calibration variant and ipq-wifi package for Xiaomi AIoT AC2350

Signed-off-by: Igor Dyatlov <dyatlov.igor@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19707
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-08-28 13:35:07 +02:00
Igor Dyatlov
c42f05bf36 ipq-wifi: add entry for Xiaomi AIoT AC2350
Add IPQ WiFi support for Xiaomi AIoT AC2350

Add board file suffixes .QCA9988/.qca9988.
These suffixes are mapped to QCA9984/hw1.0 path

Reference:
https://openwrt.org/toh/xiaomi/aiot_router_ac2350

Signed-off-by: Igor Dyatlov <dyatlov.igor@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19707
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-08-28 13:35:07 +02:00
Felix Fietkau
f43bf55b41 wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
When a wifi-iface section is used either for multiple vifs or MLD links,
make it possible to configure the per-radio/link macaddr.
When MLO is enabled, the main macaddr is used for the MLD interface.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-28 10:42:44 +02:00
Felix Fietkau
6fbf6d0cfd mac80211: extend connection monitoring for MLO
Required for latest mt76

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-27 15:24:30 +02:00
Felix Fietkau
2760a08b40 mt76: update to Git HEAD (2025-08-27)
d729307b5e8b mt76: mt7996: add missing null pointer check
fb22489fd738 wifi: mt76: do not add non-sta wcid entries to the poll list
fb7e0501b8f9 wifi: mt76: mt7996: add missing check for rx wcid entries
4cd64ad1283b wifi: mt76: mt7915: fix list corruption after hardware restart
ee538efba542 wifi: mt76: free pending offchannel tx frames on wcid cleanup
415b5a68878b wifi: mt76: fix list corruption
3ed2c4030d42 wifi: mt76: mt7925u: use connac3 tx aggr check in tx complete
a35af277873f wifi: mt76: mt7925: skip EHT MLD TLV on non-MLD and pass conn_state for sta_cmd
384d3a9bff2d wifi: mt76: mt7996: Use deflink for AMPDU rx reordering
9bae5f956e65 wifi: mt76: Remove dead code in mt76_scan_work
de1df8b888bd wifi: mt76: mt7996: Export MLO AP capabilities to mac80211

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-08-27 13:30:00 +02:00