Manually update the PCS driver with new proposed upstream version. This
can't be normally cherry-picked from main branch as main branch now use
standalone PCS feature that is problematic to port for very old kernel
(6.6)
Link: https://github.com/openwrt/openwrt/pull/24263
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 443ec4032a78cbeb52c5761b7702033904fa6a11)
Fix an error while building target/linux x64 on macOS 15.4 host,
due to the PATH_MAX macro being redefined:
mkdir -p /Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86/tools/objtool && make O=/Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86 subdir=tools/objtool --no-print-directory -C objtool
exec-cmd.c:15:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
15 | #define PATH_MAX 4096
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/syslimits.h:103:9: note: previous definition is here
103 | #define PATH_MAX 1024 /* max bytes in pathname */
| ^
exec-cmd.c is compiled as part of objtool to run on the host, and
therefore host headers are used, where PATH_MAX is already defined.
Using an old OpenWRT snapshot from 2025-02-16, where linux-6.6.77
used to build correctly, does not help. Reverting from Xcode 16.3 to
16.2 does not help either.
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18530
(cherry picked from commit b77e6cd6272d55af7ea64200dd2358666d25b6db)
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23710
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 33a8c1c96c25f870e5d86cbb1a3e66c2d388a83c)
The Extreme Networks AP3935's LAN1 port (gmac0/RGMII to AR8035 at MDIO
addr 1) fails to acquire a link if no Ethernet cable is connected at
power-on; the port stays dead even after a cable is later inserted, and
only a network restart recovers it.
The AR803x family enables hibernation mode by default, this setting
overrides it.
Signed-off-by: Grische <github@grische.xyz>
Link: https://github.com/openwrt/openwrt/pull/23208
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 33ed49c948b0a2cb90ef50ffe7afdcff8bb42c07)
(cherry picked from commit 8c3c253692ec5a97012261225695a2abc8dc3f1c)
This patch is not yet backported to the 6.6.y tree.
It is a prerequisite for kernel 6.6.140 to build for mpc85xx.
drivers/crypto/talitos.c: In function 'ahash_digest':
drivers/crypto/talitos.c:2204:16: error: 'struct talitos_ahash_req_ctx' has no member named 'last'
2204 | req_ctx->last = 1;
| ^~~~~
Link: https://lore.kernel.org/all/DIOA24QU02W5.2RSVK05RE7BJK@bootlin.com/
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23435
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit bcff9902c3db5e130ccd5f66fdc5c7cfbe71f8e8)
Backport upstream patch fixing offload support in the presence of GDM2
interface.
(cherry picked from commit b7aa0aa9bf603c01500f791df4636b35434c6224)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a8382a4821e8b845fe15dc357a86d1a33c5bdc55)
It was discovered that the internal PHY interrupt are not always connected
and PHY link up/down is not correctly detected.
This is the case of the Nokia Valyrian board that suffer from this problem.
To handle this, drop the internal PHY interrupt property from DTSI and add
it only to the Gemtek W1700K DTS where it was reported to work correctly.
(cherry picked from commit 89d8dc13d066e5dc44586e3db670cb8daabf7c23)
[ drop Gemtek W1700K ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit af35693db2ec3faa81ef2042135f14308e9b286d)
Backport new field_prep()/get() particularly useful to handle case where a
bitmask is not const and FIELD_PREP can't be used. This permit to replace
manual shift with these macro. (also needed to permit backport of some
patch without modification)
Backport reworked patch that drop the local field_prep()/get() macro in
favor of the global one.
Link: https://github.com/openwrt/openwrt/pull/22479
(cherry picked from commit 25f92aaae1795f992fc288c5c877724249d59296)
[ fix conflict error, drop invalid patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 72dbda434454c615979fbd8cc1f25bbd7860f487)
Backport more upstream patch to include all the fixes pushed upstream and
add all the preliminary patch for multi-serdes support.
While at it also move 2 patch in the 6xx numbering to the 000-1xx backport
numbering to keep things tidy.
All the affected patch manually and automatically refreshed.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ add comment, renumber patch, add more patch, fix PCS patch ]
Link: https://github.com/openwrt/openwrt/pull/22479
(cherry picked from commit c5a8ddd0acb3163d3c1a4ef13b9963cc0340557f)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6bbc109633252c04d59c227a6184c47d6637b2f2)
Initialize NPU Block Ack memory region if reserved via DTS.
Block Ack memory region is used by NPU MT7996 (Eagle) offloading.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/22289
(cherry picked from commit 305f685f83fc1332102273cb09bb386ff1561d94)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ecb7f66949bc9c52f5dc506c58f49d9c358add7f)
Implement the .get_link_ksettings to get the rate, duplex, and
auto-negotiation status.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21530
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 4953db3aeff052223e4588fe892f94a32e917a05)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 0c77a7d8dd1bdec2e7c1158eadd36ab2743aa227)
Renumber ASoC and PCS patch to 2xx and 3xx numbering to leave space for
more backport patch in the 000-1xx numbering.
Link: https://github.com/openwrt/openwrt/pull/22479
(cherry picked from commit 9b21478d961ae791e93b69ad460a97050ee2544b)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit eab260115a1f037786d1cc3f52cd08cababa2835)
Commit 8f1914053b24 ("airoha: replace I2S patch with upstream pending
version") introduced a kernel panic with I2S driver.
Add the fixed patch to fix the kernel panic.
Fixes: 8f1914053b24 ("airoha: replace I2S patch with upstream pending version")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit cc57e155a60891631c5040b9c4a3a2c0d1dbf38f)
(cherry picked from commit 62dc186272e3757d02e9cb43e530158b56e26cd2)
Replace I2S sound patch with upstream pending version. This adds ETDM
support and fix various bug in the downstream implementation.
(cherry picked from commit 8f1914053b24f56c101057390a0a83707864cf71)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6f66bee6ba189d014c9fb5f7834161d157037491)
'CONFIG_NET_AIROHA_FLOW_STATS=y' currently breaks NPU
offload for AN7581+MT7996, so disable it for now.
Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/22300
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit d09041eb8a8e791c399ce5c3ec0b517b9655ef23)
(cherry picked from commit 530d3329f4d070162c6cd53d6775edb42183f19e)
Drop airoha,x2-mode related property from the DTSI and enable them only in
the relevant devices that use a PCIe0 line. x2-mode should be enabled only
for the WiFi card that would use it as it might cause problem for WiFi card
that expect 2 single PCIe x1 line instead of a single PCIe x2 line.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 0bf18702459a9de160bb0ee599e4b3c8662fd9a7)
(cherry picked from commit 6bd5ed7254438214830b2d909abcbd83f5474d0b)
Fix two hardware initialization issues in the EN7581 PCIe controller
and add support for x2 (2-lane) link mode.
Fixes:
The upstream EN7581 PCIe initialization writes EQ presets and PIPE
configuration registers before clk_bulk_prepare_enable(). Since the
MAC clocks are not yet running at that point, these register writes
are silently dropped, leaving the hardware with default values. This
can cause link training failures or suboptimal equalization.
Additionally, after link training the MAC may only advertise Gen1-Gen2
capability in the Link Capabilities 2 register despite the PHY being
configured for Gen3. A serdes reset toggle forces the MAC to re-read
PHY capability, recovering Gen3 8GT/s link speed.
Both issues are addressed by separating PERST from the clock callbacks
(patch 911), allowing the PCIe controller driver to properly sequence
PERST, clock enable, and register writes (patch 912).
New feature:
PCIe x2 mode support for EN7581 using the NP_SCU system controller
for serdes mux routing, PERST management, and lane configuration.
Both bonded MACs are configured for x2 operation with proper EQ
presets before link training begins.
Signed-off-by: Ryan Chen <rchen14b@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21978
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 8b9bd686e7c705dca28849882f53cf416559e1df)
[ refresh patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit db4a0d5935899ac955a84fc1e9d60d419f4f9c93)
Add specific DTSI for NPU firmware based on the supported WiFi chip and
update the supported device by including the relevant new DTSI.
(cherry picked from commit f075c1148d992aa06d342fc64ac8f15b6b0db920)
[ drop W1700K dts change ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 4699a8ad45d12e3e2577ed87125ca5ff7b673a08)
Introduce the capability to read the firmware binary names from device-tree
using the firmware-name property if available.
This is a preliminary patch to enable NPU offloading for MT7996 (Eagle)
chipset since it requires a different binary with respect to the one
used for MT7992 on the EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/22289
(cherry picked from commit 123557f0e293169ca647f07fff527e45fcf8b7dc)
[ refresh patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 503ffed6c4c5cc0be35f7566b9f5b98dc2d50f14)
No need to add another aliases node just for the label-mac-device,
luckily DTC was smart enough to combine them together in the final DTB.
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 1f535037b19731cd37512ed00b648a35b40ad13c)
(cherry picked from commit fbca86e8bd815921a37d432f4007564974eb3fc5)
The correct label mac is needed in a downstream project.
Signed-off-by: Steffen Förster <nemesis@chemnitz.freifunk.net>
Link: https://github.com/openwrt/openwrt/pull/22802
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit beaf298c4cb6f0d678cfdc251060af207ee4bab8)
The Xiaomi Redmi/Mi Router AC2100 does have the correct label mac on the WAN interface.
This MAC is available as gmac1.
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/22567
(cherry picked from commit b1713d623be30d26da0bd48ecff9032881ce5684)
Link: https://github.com/openwrt/openwrt/pull/22624
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a64f028d39597448f5949c34b4fdd646deca92d8)
Release previously allocated memory and OF node before return.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22276
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 4778e35464d4ae38f2dc508be5caf3861e1799b3)
Link: https://github.com/openwrt/openwrt/pull/22348
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2120db27b569d5242ba9d1baef645d578678dc25)
The bootcount init script is missing the executable bit (644 instead of 755),
causing the script to not be executable:
/etc/preinit: line 44: /etc/init.d/bootcount: Permission denied
Fixes: c3b8108a2be4 ("ramips: Add support for Xiaomi MiWiFi 3A")
Signed-off-by: Oliver Sedlbauer <os@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/22446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit a15b224e8309fa203dcc23fe95c8cf8dd748255d)
(cherry picked from commit 81be8a8869a36828ded87c8f5de09214d594d433)
The MIPS code assigns the clock node based on the device tree node name.
This name was renamed with kernel 6.12.58 and v6.6.117. Adapt our out of
tree device tree files to this rename to fix loading the STP GPIO
driver.
Without this fix the driver fails like this:
```
[ 0.320000] gpio-stp-xway 1e100bb0.stp: Failed to get clock
[ 0.330000] gpio-stp-xway 1e100bb0.stp: probe with driver gpio-stp-xway failed with error -2
```
Link: https://git.kernel.org/linus/b0d04fe6a633ada2c7bc1b5ddd011cbd85961868
Fixes: https://github.com/openwrt/openwrt/issues/21697
Co-Authored-By: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22444
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d405685b44c61b8d0f1ec046d58adfd8b1426893)
[Fix danube.dtsi too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3214b8a3289bfa219706447804a2f1daad3521d9)
The MT7531 has an incorrect interrupt number described in the DTS.
This commit also adds PHY interrupts. They work the same as on
the MT7988.
Tested on Gemtek W1700k.
Suggested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21016
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 788958880b66dd3f451d53801c8d25e5e6cfe1b8)
[ fix conflict error, adapt for kernel 6.6 ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 6f55a705896900d199a338a82d2e5e3238b74681)
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>
(cherry picked from commit 077120fb64450f6780f07139faccd67e587560a5)
(cherry picked from commit 2045b37953a8dccd8adb6b0c85d3b2be8d3aff26)
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>
(cherry picked from commit ea54b6a4786c1f6e687010a46e9f22a4d19e8219)
(cherry picked from commit 0dbc3f8a3c01afb5141f4feb80a0d6edfd04c247)
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>
(cherry picked from commit e2f7ad08c76593c8cb5abb70088b0813005aa09c)
(cherry picked from commit 90b84588082233019268ab14c6ab60727756159a)
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>
(cherry picked from commit 007aa5a51ce8bd596d35d8e2c7bec2240dbca94d)
(cherry picked from commit ef3c7ee1fbd4deafecdeaaf420bebd51078e9d53)